Skip to content
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

[feat] add nonprofits to the site #5

Merged
merged 9 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/nonprofits/1951-coffee-company.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/nonprofits/coming-soon.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/nonprofits/dancing-cat.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/nonprofits/street-soccer.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions src/components/NonProfit.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
const { name, description, image, startColor, endColor } = Astro.props;
---

<div class="card">
<h3>
{name}
</h3>
sampoder marked this conversation as resolved.
Show resolved Hide resolved
{description}
</div>
sampoder marked this conversation as resolved.
Show resolved Hide resolved

<style lang="scss" define:vars={{ image: `url(${image})`, startColor, endColor }}>
@use '../styles/breakpoints';
@use '../styles/colors';

.card {
background-image: linear-gradient(var(--startColor), var(--endColor)), var(--image);
background-size: cover;
background-position: center;
border-radius: 12px;
padding: 32px;
display: flex;
flex-direction: column;
justify-content: flex-end;
gap: 12px;
padding-top: 180px;
height: 360px;
color: white;
}

h3 {
font-family: "new-spirit", serif;
line-height: 1;
}
sampoder marked this conversation as resolved.
Show resolved Hide resolved
</style>
104 changes: 103 additions & 1 deletion src/components/NonProfits.astro
Original file line number Diff line number Diff line change
@@ -1 +1,103 @@
<section></section>
---
import NonProfit from './NonProfit.astro';
---

<section class="lead" id="nonprofits">
sampoder marked this conversation as resolved.
Show resolved Hide resolved
<h4>NON-PROFITS</h4>
sampoder marked this conversation as resolved.
Show resolved Hide resolved
<h3>We’re a hackathon with <b class="emphasis">social good</b> at its heart.</h3>
<p>
Our nonprofits have presented several problem areas and projects to tackle their most pressing needs. Here are the incredible organizations that we’ve partnered with:
</p>
</section>

<section class="nonprofits">
<NonProfit
name="Bay Area Street Soccer"
description="Building life-changing community-based sports programs reaching the least-served communities across the U.S."
image="/nonprofits/street-soccer.jpeg"
startColor="rgba(223, 114, 145, 0.3)"
endColor="rgba(223, 114, 145, 1)"
/>
<NonProfit
name="1951 Coffee"
description="Promoting the well-being of the refugee community in the U.S. through job training and employment"
image="/nonprofits/1951-coffee-company.jpg"
startColor="rgba(247, 207, 82, 0.3)"
endColor="rgba(247, 207, 82, 1)"
/>
<NonProfit
name="The Dancing Cat"
description="Animal rescue organization dedicated to saving at-risk cats from the San Jose Animal Care Center"
image="/nonprofits/dancing-cat.jpeg"
startColor="rgba(128, 211, 241, 0.3)"
endColor="rgba(128, 211, 241, 1)"
/>
<NonProfit
name="Coming soon..."
description="This amazing nonprofit will be announced soon!"
image="/nonprofits/coming-soon.jpeg"
startColor="rgba(120, 120, 120, 0.3)"
endColor="rgba(120, 120, 120, 1)"
/>
<NonProfit
name="Coming soon..."
description="This amazing nonprofit will be announced soon!"
image="/nonprofits/coming-soon.jpeg"
startColor="rgba(120, 120, 120, 0.3)"
endColor="rgba(120, 120, 120, 1)"
/>
<NonProfit
name="Coming soon..."
description="This amazing nonprofit will be announced soon!"
image="/nonprofits/coming-soon.jpeg"
startColor="rgba(120, 120, 120, 0.3)"
endColor="rgba(120, 120, 120, 1)"
/>
</section>

<style lang="scss">
@use '../styles/breakpoints';
@use '../styles/colors';

.lead {
width: 100%;
padding-left: 1rem;
position: relative;
display: flex;
flex-direction: column;
gap: 16px;
justify-content: center;
text-align: center;
color: #3D3935;
sampoder marked this conversation as resolved.
Show resolved Hide resolved

@media (min-width: breakpoints.$laptop) {
padding: 0 5rem 2rem 5rem;
grid-template-columns: 1fr 1fr 1fr;
max-width: 800px;
margin: auto;
}
}

.emphasis {
font-family: "new-spirit", serif;
font-weight: 600;
}
sampoder marked this conversation as resolved.
Show resolved Hide resolved

h3 {
font-weight: 300;
}
sampoder marked this conversation as resolved.
Show resolved Hide resolved

.nonprofits {
width: 100%;
padding-left: 1rem;
position: relative;
display: grid;
grid-template-columns: 1fr;
gap: 24px;

@media (min-width: breakpoints.$laptop) {
padding: 0 5rem 5rem 5rem;
grid-template-columns: 1fr 1fr 1fr;
}
}
</style>