Skip to content

Commit 75f9b59

Browse files
add recordings page
1 parent 6eb2815 commit 75f9b59

File tree

7 files changed

+172
-15
lines changed

7 files changed

+172
-15
lines changed

fetch.mjs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ function isWorkshop(talk) {
99
return talk.track.en === 'Workshop';
1010
}
1111

12+
async function fetchMediaCCC() {
13+
let mediaCCCLink = "https://api.media.ccc.de/public/conferences/nixcon2023";
14+
let response = await fetch(mediaCCCLink);
15+
let data = await response.json();
16+
17+
writeFileSync(join(__dirname, 'src/content/data/recordings.json'), JSON.stringify(data, null, 2));
18+
}
19+
20+
1221
async function fetchPretalx() {
1322
let pretalxUrl = 'https://talks.nixcon.org/api/events/nixcon-2023/talks/';
1423
let result = [];
@@ -27,4 +36,5 @@ async function fetchPretalx() {
2736
writeFileSync(join(__dirname, 'src/content/schedule/workshops.json'), JSON.stringify(workshops, null, 2));
2837
}
2938

30-
fetchPretalx();
39+
fetchPretalx();
40+
fetchMediaCCC();

src/components/Layout/MenuBar.astro

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,24 @@ const menuData = [
3232
name: "Sponsors"
3333
},
3434
{
35-
icon: "calendar",
36-
link: "/talks",
37-
name: "Schedule"
38-
}]
35+
icon: "calendar",
36+
link: "/talks",
37+
name: "Schedule"
38+
},
39+
{
40+
icon: "record",
41+
link: "/recordings",
42+
name: "Recordings"
43+
}
44+
]
3945
---
4046

4147
<div class="nixcon-gradient pb-1">
4248
<div class="bg-gray-200 dark:bg-nixblue-900 py-2 px-4 flex flex-col md:flex-row justify-center gap-2">
4349
{menuData.map((e) => (
44-
<a href={e.link} class="no-underline hover:no-underline hover:bg-nixblue-700 py-2 md:px-2 rounded-md flex md:flex-col md:justify-center items-center transition-all duration-100 hover:text-nixblue-100">
45-
<Icon name={e.icon} />
50+
<a href={e.link}
51+
class="no-underline hover:no-underline hover:bg-nixblue-700 py-2 md:px-2 rounded-md flex md:flex-col md:justify-center items-center transition-all duration-100 hover:text-nixblue-100">
52+
<Icon name={e.icon}/>
4653
{e.name}
4754
</a>
4855
))}

src/components/common/Icon.astro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,9 @@ const clases = `mr-1 h-6 w-6 inline-block fill-current ${extraClasses}`;
8686
name == "twitter" ? (
8787
<path d="M22.46 6c-.77.35-1.6.58-2.46.69c.88-.53 1.56-1.37 1.88-2.38c-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29c0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15c0 1.49.75 2.81 1.91 3.56c-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07a4.28 4.28 0 0 0 4 2.98a8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21C16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56c.84-.6 1.56-1.36 2.14-2.23Z"/>) : null
8888
}
89+
90+
{
91+
name == "record" ? (
92+
<path fill="currentColor" d="M19 12c0 3.86-3.14 7-7 7s-7-3.14-7-7s3.14-7 7-7s7 3.14 7 7Z"/>) : null
93+
}
8994
</svg>

src/content/schedule/talks.json

Lines changed: 100 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,62 @@
11
[
2+
{
3+
"code": "TPLSLT",
4+
"speakers": [],
5+
"title": "NixOS Governance conversation (2nd session)",
6+
"submission_type": {
7+
"en": "Workshop/Training - Select this if you are planning on running a training for attendees"
8+
},
9+
"submission_type_id": 3115,
10+
"track": null,
11+
"track_id": null,
12+
"state": "confirmed",
13+
"abstract": "2nd session",
14+
"description": "",
15+
"duration": 60,
16+
"slot_count": 1,
17+
"do_not_record": false,
18+
"is_featured": false,
19+
"content_locale": "en",
20+
"slot": {
21+
"room_id": 2421,
22+
"room": {
23+
"en": "Workshop room (Room 24)"
24+
},
25+
"start": "2023-09-09T13:30:00+02:00",
26+
"end": "2023-09-09T14:30:00+02:00"
27+
},
28+
"image": null,
29+
"resources": []
30+
},
31+
{
32+
"code": "AH7JSC",
33+
"speakers": [],
34+
"title": "NixOS Governance conversation (hackday session)",
35+
"submission_type": {
36+
"en": "Workshop/Training - Select this if you are planning on running a training for attendees"
37+
},
38+
"submission_type_id": 3115,
39+
"track": null,
40+
"track_id": null,
41+
"state": "confirmed",
42+
"abstract": "Hackday governance session",
43+
"description": "",
44+
"duration": 90,
45+
"slot_count": 1,
46+
"do_not_record": false,
47+
"is_featured": false,
48+
"content_locale": "en",
49+
"slot": {
50+
"room_id": 2421,
51+
"room": {
52+
"en": "Workshop room (Room 24)"
53+
},
54+
"start": "2023-09-10T08:30:00+02:00",
55+
"end": "2023-09-10T10:00:00+02:00"
56+
},
57+
"image": null,
58+
"resources": []
59+
},
260
{
361
"code": "L3QVWC",
462
"speakers": [
@@ -203,7 +261,7 @@
203261
"en": "Lecture hall (Room 122)"
204262
},
205263
"start": "2023-09-08T10:00:00+02:00",
206-
"end": "2023-09-08T10:15:00+02:00"
264+
"end": "2023-09-08T10:10:00+02:00"
207265
},
208266
"image": null,
209267
"resources": []
@@ -496,8 +554,8 @@
496554
"room": {
497555
"en": "Lecture hall (Room 122)"
498556
},
499-
"start": "2023-09-08T14:50:00+02:00",
500-
"end": "2023-09-08T15:15:00+02:00"
557+
"start": "2023-09-09T10:40:00+02:00",
558+
"end": "2023-09-09T11:05:00+02:00"
501559
},
502560
"image": "https://talks.nixcon.org/media/nixcon-2023/submissions/8QMELJ/logo_iLwMeDd.png",
503561
"resources": []
@@ -1011,8 +1069,8 @@
10111069
"room": {
10121070
"en": "Lecture hall (Room 122)"
10131071
},
1014-
"start": "2023-09-09T10:40:00+02:00",
1015-
"end": "2023-09-09T11:05:00+02:00"
1072+
"start": "2023-09-08T14:50:00+02:00",
1073+
"end": "2023-09-08T15:15:00+02:00"
10161074
},
10171075
"image": null,
10181076
"resources": []
@@ -1095,7 +1153,7 @@
10951153
{
10961154
"code": "UEAXU3",
10971155
"name": "Sophie Tauchert",
1098-
"biography": "I'm working in IT-security and care a lot about privacy and data protection. To that end, I've been running and managing privacy-respecting services for multiple years now on catgirl.cloud with my entire infrastructure running on NixOS.",
1156+
"biography": "IT-security engineer, admin for catgirl.cloud, running NixOS everywhere and maintaining a few NixOS packages.",
10991157
"avatar": null
11001158
}
11011159
],
@@ -1233,6 +1291,42 @@
12331291
"image": null,
12341292
"resources": []
12351293
},
1294+
{
1295+
"code": "QVCJ7Y",
1296+
"speakers": [
1297+
{
1298+
"code": "XGGYJH",
1299+
"name": "zimbatm",
1300+
"biography": null,
1301+
"avatar": null
1302+
}
1303+
],
1304+
"title": "NixOS Governance conversation (1st session)",
1305+
"submission_type": {
1306+
"en": "Workshop/Training - Select this if you are planning on running a training for attendees"
1307+
},
1308+
"submission_type_id": 3115,
1309+
"track": null,
1310+
"track_id": null,
1311+
"state": "confirmed",
1312+
"abstract": "The question of how to more manage the project has come up once again. How do we structure ourselves to maximize participation, be effective and enjoy ourselves doing so?",
1313+
"description": "",
1314+
"duration": 60,
1315+
"slot_count": 1,
1316+
"do_not_record": false,
1317+
"is_featured": false,
1318+
"content_locale": "en",
1319+
"slot": {
1320+
"room_id": 2421,
1321+
"room": {
1322+
"en": "Workshop room (Room 24)"
1323+
},
1324+
"start": "2023-09-08T13:30:00+02:00",
1325+
"end": "2023-09-08T14:30:00+02:00"
1326+
},
1327+
"image": null,
1328+
"resources": []
1329+
},
12361330
{
12371331
"code": "7WYFPW",
12381332
"speakers": [

src/content/schedule/workshops.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"en": "Workshop room (Room 24)"
3333
},
3434
"start": "2023-09-09T15:00:00+02:00",
35-
"end": "2023-09-09T17:00:00+02:00"
35+
"end": "2023-09-09T18:20:00+02:00"
3636
},
3737
"image": "https://talks.nixcon.org/media/nixcon-2023/submissions/MYDSCP/logo-landscape_V2Eub3z.svg",
3838
"resources": []

src/layouts/LayoutDefault.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import MenuBar from "../components/Layout/MenuBar.astro";
2222
</style>
2323
</head>
2424
<body class="bg-gray-100 text-nixblue-800 dark:bg-gray-900 dark:text-nixblue-100">
25-
<div class="content md:px-[15vw] lg:px-[27vw] md:h-[83vh] lg:h-[85vh]">
25+
<div class="content md:px-[10vw] lg:px-[22vw] md:h-[83vh] lg:h-[85vh]">
2626
<div
2727
class="flex flex-col items-center justify-center text-center mt-10 pb-8"
2828
>

src/pages/recordings.astro

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
import {getEntry} from "astro:content";
3+
import LayoutDefault from "../layouts/LayoutDefault.astro";
4+
import Section from "../components/common/Section/Section.astro";
5+
import {marked} from 'marked';
6+
const {data: recordingData} = await getEntry('data', 'recordings');
7+
---
8+
9+
<LayoutDefault>
10+
<Section>
11+
<div class="flex flex-col gap-4">
12+
{recordingData.events.map((e) => (
13+
<div
14+
class="flex flex-col md:flex-row"
15+
>
16+
<img class="w-full md:w-56 object-cover" alt={e.title} src={e.thumb_url}>
17+
18+
<div class="nixcon-gradient p-0.5 pt-0 md:pt-0.5 md:pl-0 w-full">
19+
<div class="dark:bg-nixblue-900 bg-gray-200 h-full flex flex-col justify-between">
20+
<div class="p-2">
21+
<h2 class="font-bold line-clamp-1">
22+
{e.title}
23+
</h2>
24+
<div class="line-clamp-2">
25+
<p set:html={marked.parse(e.description)}/>
26+
</div>
27+
</div>
28+
<div class="flex dark:bg-nixblue-950 bg-gray-100 p-2 flex justify-end">
29+
<a
30+
rel="noopener"
31+
target="_blank"
32+
href={e.frontend_link}>Watch Talk</a>
33+
</div>
34+
</div>
35+
</div>
36+
</div>
37+
))}
38+
</div>
39+
</Section>
40+
</LayoutDefault>
41+

0 commit comments

Comments
 (0)