Skip to content

Commit 6cb9876

Browse files
authored
Merge pull request #56 from rustnl/overview-page
overview page (start)
2 parents 3a3d3e8 + ddf4fae commit 6cb9876

30 files changed

+528
-87
lines changed

src/components/OneColumnText.astro

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
3+
---
4+
5+
<div>
6+
<slot />
7+
</div>
8+
9+
<style lang="scss">
10+
div {
11+
width: min(48rem, 100%);
12+
}
13+
</style>

src/components/event/Event.astro

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
import EventDate from "./EventDate.astro";
3+
import Divider from "../../components/Divider.astro";
4+
5+
interface Props {
6+
id?: string;
7+
title?: string;
8+
dates?: string[];
9+
startTime?: string;
10+
detailLink?: string;
11+
scheduleLink?: string;
12+
}
13+
14+
const { id = "", title, dates = [], startTime, detailLink, scheduleLink } = Astro.props;
15+
---
16+
17+
<div class="event" id={id.replace("/events/", "")}>
18+
<div class="kicker">
19+
{
20+
dates.map((date: string) =>
21+
new Date(date).toLocaleDateString("en-EN", { weekday: "long" }),
22+
).join(" & ")
23+
}
24+
</div>
25+
<h2>{title}</h2>
26+
{
27+
dates.map((date: string) => (
28+
<EventDate date={date} startTime={startTime} />
29+
))
30+
}
31+
<slot />
32+
{
33+
detailLink && (
34+
<div class="track-link">
35+
<a href={detailLink}>More details</a>
36+
</div>
37+
)
38+
}
39+
{
40+
scheduleLink && (
41+
<div class="track-link">
42+
<a href={scheduleLink}>Find in schedule</a>
43+
</div>
44+
)
45+
}
46+
</div>
47+
48+
<Divider />
49+
50+
<style lang="scss">
51+
@use "../../styles/variables.scss";
52+
53+
.kicker {
54+
color: variables.$color-red-400;
55+
font-weight: 700;
56+
text-transform: uppercase;
57+
}
58+
59+
h2 {
60+
padding-top: 0;
61+
}
62+
63+
.event {
64+
margin-block-start: 5rem;
65+
margin-block-end: 5rem;
66+
67+
.track-link a {
68+
font-weight: bold;
69+
color: variables.$color-red-400;
70+
}
71+
}
72+
</style>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
import { library, icon } from "@fortawesome/fontawesome-svg-core";
3+
import { faLocationDot, faClock } from "@fortawesome/free-solid-svg-icons";
4+
5+
library.add(faLocationDot, faClock);
6+
const clockIcon = icon({ prefix: "fas", iconName: faClock.iconName });
7+
8+
interface Props {
9+
date: string;
10+
startTime?: string;
11+
}
12+
13+
const { date, startTime } = Astro.props;
14+
15+
16+
---
17+
18+
<div class="date-time">
19+
<div class="icon">
20+
<Fragment set:html={clockIcon.html} />
21+
</div>
22+
<span>
23+
{new Date(date).toLocaleDateString(
24+
"en-EN",
25+
{ weekday: "short" },
26+
) +
27+
" " +
28+
startTime}
29+
</span>
30+
</div>
31+
32+
<style lang="scss">
33+
.date-time {
34+
display: flex;
35+
align-items: center;
36+
gap: 0.5rem;
37+
}
38+
</style>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
import EventDate from "./EventDate.astro";
3+
4+
interface Props {
5+
tracks: any[];
6+
date: string;
7+
}
8+
9+
const { tracks, date } = Astro.props;
10+
11+
12+
---
13+
{
14+
tracks.filter((track: any) => track.frontmatter.dates.includes(date) == true ).map((track: any) => (
15+
<div class="event track">
16+
<h3>{track.frontmatter.title}</h3>
17+
{track.frontmatter.dates.map((date: string) => (
18+
<EventDate
19+
date={date}
20+
startTime={track.frontmatter.startTime}
21+
/>
22+
))}
23+
<div set:html={track.compiledContent()} />
24+
{track.frontmatter.detailLink && (
25+
<div class="track-link">
26+
<a href={track.frontmatter.detailLink}>
27+
More details
28+
</a>
29+
</div>
30+
)}
31+
{track.frontmatter.scheduleLink && (
32+
<div class="track-link">
33+
<a href={track.frontmatter.scheduleLink}>
34+
Find in schedule
35+
</a>
36+
</div>
37+
)}
38+
</div>
39+
))
40+
}
41+
42+
<style lang="scss">
43+
@use "../../styles/variables.scss";
44+
45+
.event.track {
46+
margin-block-start: 3rem;
47+
h3 {
48+
margin-bottom: 0.5rem;
49+
}
50+
51+
.track-link a {
52+
font-weight: bold;
53+
color: variables.$color-red-400;
54+
}
55+
}
56+
57+
</style>
58+

src/components/page/footer.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</div>
88
<div class="menu">
99
<a href="/resources/sponsorship-prospectus-rustweek-2025.pdf">Sponsorships</a>
10-
<a href="/unconf">Unconf</a>
10+
<a href="/unconf-intro">Unconf</a>
1111
<!-- <a href="/workshops">Workshops</a> -->
1212
<a href="/code-of-conduct">Code of conduct</a>
1313
<!-- <a href="/directions">Directions</a> -->

src/components/page/menu.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ const { location }: Props = Astro.props;
2121
<ul class="submenu">
2222
<li class="child">
2323
<a
24-
href="/#schedule"
25-
onclick="document.querySelector('[data-menu-toggle]').click()"
24+
href="/overview"
2625
>Overview of the week</a
2726
>
2827
<a href="/schedule/tuesday">Tuesday talks</a>

src/components/schedule/MainSchedule.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import OrganizeOwnActivity from "./OrganizeOwnActivity.astro";
2323
<p>Laser tag</p>
2424
<p>Museum visit</p>
2525
<p>…</p>
26-
<OrganizeOwnActivity />
26+
<!-- <OrganizeOwnActivity /> -->
2727
</Fragment>
2828
</ScheduleItem>
2929
</ScheduleSection>
@@ -89,7 +89,8 @@ import OrganizeOwnActivity from "./OrganizeOwnActivity.astro";
8989
<span slot="time">09:00–13:00</span>
9090
<Fragment slot="activities">
9191
<p>7 workshops in total</p>
92-
<p><a href="/workshops">See workshop schedule</a></p>
92+
<br />
93+
<p><a href="/overview#workshops">See details</a></p>
9394
</Fragment>
9495
</ScheduleItem>
9596
<ScheduleItem align_end>

src/components/schedule/ScheduleItem.astro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ const {align_end = false}: Props = Astro.props;
8888
line-height: 1em;
8989
margin-bottom: 0;
9090
margin-top: 0;
91+
// background-color: blue;
92+
a {
93+
text-decoration: none!important;
94+
}
9195
}
9296
}
9397
</style>

src/components/timetable/Item.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ interface Props {
2525
striped?: boolean;
2626
description?: string;
2727
ticket?: string;
28+
id?: string | null;
2829
}
2930
3031
@@ -41,6 +42,7 @@ const {
4142
description,
4243
ticket,
4344
url,
45+
id = null,
4446
}: Props = Astro.props;
4547
4648
const matches = import.meta.glob("../../pages/talks/*.md", { eager: true });
@@ -69,7 +71,7 @@ const timetable_url = `/schedule/${Astro.url.pathname.split("/").filter(i => i !
6971
ticket={ticket}
7072
url={talk_url}
7173
>
72-
<div class="block">
74+
<div class="block" id={id}>
7375
<a class="title" href={talk_url}>{talk_title}</a>
7476
{
7577
talk_speakers.map((speaker: any) => (

src/components/timetable/Tuesday.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const breaks = [
5454
time="9:30"
5555
duration={10}
5656
room={secondary}
57+
id="ecosystem"
5758
striped
5859
/>
5960
<Item

0 commit comments

Comments
 (0)