Skip to content

Commit 7c8e867

Browse files
feat: add /schedule page (#15)
## Overview Adds a `/schedule` page with the grid/table view of scheduled activities copied from 2024.
1 parent 7718d51 commit 7c8e867

6 files changed

Lines changed: 516 additions & 3 deletions

File tree

cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"astropub",
1616
"astrojs",
1717
"Bluesky",
18+
"d'œuvres",
1819
"Devries",
1920
"dimitri",
2021
"Emscripten",

src/components/Header.astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function hrefProps(pathname: string) {
2424
<a {...hrefProps("/articles")}>Articles</a>
2525
<a {...hrefProps("/cfp")}>CFP</a>
2626
<a {...hrefProps("/faqs")}>FAQs</a>
27+
<a {...hrefProps("/schedule")}>Schedule</a>
2728
<a {...hrefProps(links.shop)}>Shop</a>
2829
<a {...hrefProps("/travel")}>Travel</a>
2930
<Button
@@ -44,6 +45,7 @@ function hrefProps(pathname: string) {
4445
<a {...hrefProps("/articles")}>Articles</a>
4546
<a {...hrefProps("/cfp")}>CFP</a>
4647
<a {...hrefProps("/faqs")}>FAQs</a>
48+
<a {...hrefProps("/schedule")}>Schedule</a>
4749
<a {...hrefProps(links.shop)}>Shop</a>
4850
<a {...hrefProps("/travel")}>Travel</a>
4951
<Button
@@ -150,7 +152,7 @@ function hrefProps(pathname: string) {
150152
display: flex;
151153
align-items: center;
152154
font-weight: var(--fontWeightLight);
153-
gap: clamp(0.75rem, 1.5vw, 2rem);
155+
gap: clamp(0.55rem, 1.25vw, 2rem);
154156
}
155157

156158
.header-link-inactive {
@@ -160,9 +162,10 @@ function hrefProps(pathname: string) {
160162
.header-button {
161163
justify-content: center;
162164
margin-left: 0.35rem;
165+
text-wrap: nowrap;
163166
}
164167

165-
@media (width >= 1017px) {
168+
@media (width >= 1117px) {
166169
.header-content-area-mobile {
167170
display: none;
168171
}
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
import { markdown } from "@astropub/md";
3+
4+
import { ActivityLocation } from "~/data/schedule";
5+
6+
import Heading from "./Heading.astro";
7+
import Arrow from "./Arrow.astro";
8+
9+
interface Props {
10+
at?: string;
11+
description?: string[];
12+
id?: string;
13+
location?: ActivityLocation;
14+
class?: string;
15+
level?: "h3" | "h4";
16+
title: string;
17+
}
18+
19+
const {
20+
at,
21+
class: className,
22+
description = [],
23+
id,
24+
location,
25+
level = "h3",
26+
title,
27+
...rest
28+
} = Astro.props;
29+
30+
const descriptionLines = await Promise.all(
31+
description.map(async (p) => await markdown(p)),
32+
);
33+
---
34+
35+
<div
36+
class:list={["scheduled-activity", "scheduled-activity-h3", className]}
37+
id={id}
38+
{...rest}
39+
>
40+
<Heading level={level} class="activity-title">
41+
{title}
42+
</Heading>
43+
<div class="activity-locators">
44+
<div class="activity-time">{at ?? "Time TBA"}</div>
45+
{
46+
location && (
47+
<a class="activity-location" href={location.href}>
48+
{location.text}
49+
</a>
50+
)
51+
}
52+
</div>
53+
{
54+
descriptionLines && (
55+
<div class="activity-description">{descriptionLines}</div>
56+
)
57+
}
58+
</div>
59+
60+
<style>
61+
.scheduled-activity {
62+
font-weight: var(--fontWeightLight);
63+
margin: 0 var(--widthBodyPadding);
64+
max-width: var(--widthBodyLean);
65+
scroll-margin-top: 2rem;
66+
}
67+
68+
.scheduled-activity-h3 {
69+
margin-top: 2rem;
70+
}
71+
72+
.activity-title {
73+
font-family: var(--fontFamilyLogo);
74+
font-size: var(--fontSizeMedium);
75+
font-weight: var(--fontWeightLogo);
76+
text-decoration: none;
77+
}
78+
79+
.activity-title-inner {
80+
display: inline;
81+
}
82+
83+
.activity-locators {
84+
display: flex;
85+
font-family: var(--fontFamilyLogo);
86+
font-weight: var(--fontWeightSemibold);
87+
gap: 0.75rem;
88+
justify-content: space-between;
89+
margin: 0.5rem 0;
90+
}
91+
92+
.activity-time {
93+
font-size: var(--fontSizeMedium);
94+
}
95+
96+
.activity-location {
97+
line-height: 1.25;
98+
text-align: right;
99+
}
100+
101+
.activity-description {
102+
display: flex;
103+
gap: 0.5rem;
104+
flex-direction: column;
105+
width: 100%;
106+
}
107+
108+
.activity-within {
109+
list-style: none;
110+
padding-left: 0;
111+
}
112+
113+
@media (min-width: 490px) {
114+
.scheduled-activity {
115+
display: grid;
116+
grid-template-columns: clamp(5rem, 20vw, 10rem) auto;
117+
grid-template-rows: auto auto auto;
118+
gap: 0.75rem 1rem;
119+
}
120+
121+
.activity-title {
122+
grid-area: 1 / 2 / 2 / 3;
123+
}
124+
125+
.activity-locators {
126+
grid-area: 1 / 1 / 3 / 2;
127+
flex-direction: column;
128+
margin: 0;
129+
justify-content: flex-start;
130+
text-align: right;
131+
}
132+
133+
.activity-description {
134+
grid-area: 2 / 2 / 3 / 3;
135+
}
136+
137+
.activity-within {
138+
grid-area: 3 / 1 / 4 / 3;
139+
}
140+
}
141+
</style>

0 commit comments

Comments
 (0)