-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added current events section to home page #493
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
import '../../styles/Events.css'; | ||
import '../../styles/Home.css'; | ||
import hfamimg from '../../images/hack-fam-insta.png'; | ||
import schoolimg from '../../images/hack-school-insta.jpg'; | ||
|
||
const firstDescription = | ||
'Join us in our beginner-friendly web development workshop series, where you build a website using tools such as HTML, CSS, and ReactJS!'; | ||
|
||
const secondDescription = | ||
'Get placed in fam groups to meet people in the Hack community through smaller group socials!'; | ||
|
||
export default function CurrEvents() { | ||
return ( | ||
<div> | ||
<h1 className='section-title'>Current Events</h1> | ||
<div className='events-container'> | ||
<div className='event-column'> | ||
<h2 className='event-title'>Hack School</h2> | ||
<img className='event-img' src={schoolimg} alt='HackSchool' /> | ||
<p className='hack-description'>{firstDescription}</p> | ||
</div> | ||
<div className='event-column'> | ||
<h2 className='event-title'>Hack Fam</h2> | ||
<img className='event-img' src={hfamimg} alt='HackFam' /> | ||
<p className='hack-description'>{secondDescription}</p> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,3 +147,50 @@ | |
max-height: 8rem; | ||
} | ||
} | ||
|
||
/* ========== CurrEvents.jsx ========== */ | ||
.section-title { | ||
font-weight: bold; | ||
margin: 2rem 0; | ||
font-size: 2.5rem; | ||
margin-bottom: 0.2rem; | ||
} | ||
|
||
.events-container { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 1rem; | ||
margin-bottom: 2rem; | ||
} | ||
|
||
.event-column { | ||
flex: 1 1 45%; | ||
padding: 1rem; | ||
border-radius: 8px; | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add a CSS selector here for |
||
.event-title { | ||
text-align: center; | ||
font-size: 40px; | ||
font-weight: 600; | ||
background-image: linear-gradient( | ||
to right, | ||
#c960ff, | ||
#ea43d4, | ||
#f499da, | ||
#e16db9, | ||
#c960ff | ||
); | ||
color: transparent; | ||
background-clip: text; | ||
-webkit-background-clip: text; | ||
background-size: 200% auto; | ||
-webkit-text-fill-color: transparent; | ||
background-position: 0% center; | ||
transition: background-position 2s ease; | ||
} | ||
|
||
.event-title:hover { | ||
background-position: 100% center; | ||
transition: background-position 2s ease; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At the bottom of this file, we should have a section for media queries to make sure that the images are centered when the screen enters a smaller window size. I've recorded a Loom here to explain better how you can test this locally, if you need some more context: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename
hfamimg
andschoolimg
to something along the lines of "img1" and "img2" respectively-- this is just so there's more reusability in the future.