Skip to content

Commit

Permalink
Reverting failed homepage change
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyatFocallocal committed Oct 18, 2023
1 parent 49ead75 commit 06fdb1e
Showing 1 changed file with 31 additions and 58 deletions.
89 changes: 31 additions & 58 deletions imports/client/ui/pages/Home/index.js
Original file line number Diff line number Diff line change
@@ -1,72 +1,45 @@
import React, { Component } from 'react';
import FirstSection from './FirstSection';
import SecondSection from './SecondSection';
import HowToHelpSection from './HowToHelpSection';
import MovementSection from './MovementSection';
import ProjectsSection from './ProjectsSection';
import EventsSection from './EventsSection';
import './styles.scss';
import React, { Component } from 'react'
import FirstSection from './FirstSection'
import SecondSection from './SecondSection'
import HowToHelpSection from './HowToHelpSection'
import MovementSection from './MovementSection'
import ProjectsSection from './ProjectsSection'
import EventsSection from './EventsSection'
import './styles.scss'

class Home extends Component {
componentDidMount() {
window.__setDocumentTitle('Home');
componentDidMount () {
window.__setDocumentTitle('Home')
}

render() {
let url;
let opacity;
render () {
let url
let opacity
if (window.__mapType === 'gatherings') {
url = '/images/Public-happiness-movement-new-banner-01.jpg';
url = '/images/Public-happiness-movement-new-banner-01.jpg'
// opacity = 0.5
} else {
url = '/images/focallocal-bgOG.jpg';
url = '/images/focallocal-bgOG.jpg'
}
let backgroundImage = {
backgroundImage: `url(${url})`,
opacity,
backgroundAttachment: 'fixed',
backgroundPosition: 'center top',
backgroundSize: 'cover',
};
let imgStyle = { width: '100%' };

let largeScreenStyle = `
@media (min-width: 768px) {
.home {
position: relative;
overflow: hidden;
}
.background-image {
position: fixed;
top: 4em; /* Push the background image down by 4em */
left: 0;
width: 100%;
height: 100%;
background-size: cover;
z-index: -1;
}
.home-content {
position: relative;
padding-top: 30vh;
text-align: center;
z-index: 1;
}
}
`;

let backgroundImage = { backgroundImage: 'url(' + url + ')', opacity }
let imgStyle = { width: '100%' }
return (
<main className="home">
<style>{largeScreenStyle}</style>
<div className="background-image" style={backgroundImage}></div>
<div className="home-content">
<MovementSection />
<ProjectsSection />
<EventsSection />
{/* Add the other content sections here */}
<main className='home'>
{/* <div id='hero-bg' style={backgroundImage} /> */}
<div>
<img src={url} style={imgStyle} />
</div>
<MovementSection />
<ProjectsSection />
<EventsSection />
{/*
<FirstSection />
<HowToHelpSection />
<SecondSection button/>
*/}
</main>
);
)
}
}

export default Home;
export default Home

0 comments on commit 06fdb1e

Please sign in to comment.