Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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/images/competitions/photo-1.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/images/competitions/photo-2.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/images/competitions/photo-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 53 additions & 54 deletions src/pages/competitions.astro
Original file line number Diff line number Diff line change
Expand Up @@ -59,62 +59,61 @@ const renderedPastCompetitions = await Promise.all(
description="Placeholder introduction to BMDIB competitions. Final content will be provided by the organization."
/>

<section class="competitions-upcoming">
<section class="py-5">
<div class="container">
<div class="row">
<div class="col-12">
<h2>Current &amp; Upcoming Competitions</h2>
<article class="competition-article mx-auto">
<h2 class="mb-4">BMDIB Competition Program</h2>

<p>
A message from our VP of Academic Programs:
</p>

<p>
BMDIB works closely with the district to promote our dual
language immersion programs by organizing and supporting key
events throughout the school year. One of our proudest
traditions is hosting the district-wide internal competition,
which features Pinyin typing, speech, calligraphy, and writing
for students from both Ruskin Elementary and Sierramont Middle
School. Winners from our internal competition will go on to
represent the Berryessa Union School District (BUSD) at the
statewide competition hosted by the Association of Northern
California Chinese Schools (ANCCS).
</p>

<div class="competition-gallery mt-5">
{
[
{
src: "/images/competitions/photo-1.jpg",
alt: "Competition photo 1",
caption: "Photo caption coming soon.",
},
{
src: "/images/competitions/photo-2.jpg",
alt: "Competition photo 2",
caption: "Photo caption coming soon.",
},
{
src: "/images/competitions/photo-3.jpg",
alt: "Competition photo 3",
caption: "Photo caption coming soon.",
},
].map((photo) => (
<figure class="mb-5">
<img
src={photo.src}
alt={photo.alt}
class="img-fluid rounded competition-photo"
/>
<figcaption class="text-muted mt-2">
{photo.caption}
</figcaption>
</figure>
))
}
</div>
</div>

<div class="row g-4">
{
renderedUpcomingCompetitions.map(
({ competition, Content }) => (
<div class="col-md-6 col-lg-4">
<CompetitionCard
title={competition.data.title}
date={competition.data.date}
time={competition.data.time}
location={competition.data.location}
>
<Content />
</CompetitionCard>
</div>
)
)
}
</div>
</div>
</section>

<section class="competitions-past">
<div class="container">
<div class="row">
<div class="col-12">
<h2>Past Competitions</h2>
</div>
</div>

<div class="row g-4">
{
renderedPastCompetitions.map(
({ competition, Content }) => (
<div class="col-md-6">
<CompetitionCard
title={competition.data.title}
date={competition.data.date}
time={competition.data.time}
location={competition.data.location}
images={competition.data.images}
>
<Content />
</CompetitionCard>
</div>
)
)
}
</div>
</article>
</div>
</section>
</BaseLayout>
85 changes: 12 additions & 73 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -438,89 +438,28 @@ h6 {
* Competitions page
*/

.competitions-upcoming,
.competitions-past {
padding: 3rem 0 5rem;
}

.competitions-upcoming {
background-color: var(--color-surface);
}

.competitions-past {
background-color: var(--color-background);
}

.competitions-upcoming h2,
.competitions-past h2 {
margin-bottom: 2rem;
color: var(--color-primary-dark);
}

.competition-card {
height: 100%;
background-color: var(--color-surface);
border: 1px solid rgba(41, 41, 41, 0.1);
border-radius: 0.5rem;
box-shadow: 0 0.125rem 0.5rem rgba(41, 41, 41, 0.06);
.competition-article {
max-width: 800px;
}

.competition-card-content {
padding: 1.5rem;
.competition-article p {
line-height: 1.8;
}

.competition-card-date {
margin-bottom: 0.5rem;
color: var(--color-primary);
font-size: 0.875rem;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
.competition-gallery figure {
margin-bottom: 2.5rem;
}

.competition-card-content h2 {
margin-bottom: 0.5rem;
font-size: 1.25rem;
color: var(--color-primary-dark);
}

.competition-card-location {
margin-bottom: 1rem;
color: var(--color-secondary);
font-weight: 600;
}

.competition-card-content > p:last-child {
margin-bottom: 0;
color: var(--color-text-muted);
}

.competition-card {
overflow: hidden;
}

.competition-card-image {
width: 100%;
aspect-ratio: 16 / 9;
object-fit: cover;
.competition-photo {
display: block;
}

.competition-card .carousel {
aspect-ratio: 16 / 9;
overflow: hidden;
}

.competition-card .carousel-inner,
.competition-card .carousel-item {
width: 100%;
height: 100%;
height: auto;
}

.competition-card .carousel-item img {
width: 100%;
height: 100%;
object-fit: cover;
.competition-gallery figcaption {
font-size: 0.9rem;
line-height: 1.5;
text-align: center;
}

/*
Expand Down
Loading