Skip to content

Commit 9a75593

Browse files
committed
feat: improve videos preview
1 parent 7b91081 commit 9a75593

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

public/data/events.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,11 @@
282282
"fullDescriptionEn": "The last meetup of 2024 was held at CreationDose with a Christmas theme: latest Python news, expert talks, gift exchange, toast and a final PyDinner. A perfect way to bid farewell to the year together with the community.",
283283
"attendees": 44,
284284
"url": "https://www.meetup.com/python-catania/events/304691223/",
285-
"videos": ["c8URuoByeRY", "AavetGgMq40", "Kkd2cmjGub0?start=829"],
285+
"videos": [
286+
{ "id": "AavetGgMq40", "title": "PyCT - Meetup 06 Dicembre 2024 - Intro alla community Python Catania" },
287+
{ "id": "c8URuoByeRY", "title": "PyCT - Meetup 06 Dicembre 2024 - GUI desktop application development (with PySide6)" },
288+
{ "id": "Kkd2cmjGub0?start=829", "title": "PyCT - Meetup 06 Dicembre 2024 - PyDivertimento (AoC e SpeechLess)" }
289+
],
286290
"gallery": ["/images/events/event-304691223.jpg"],
287291
"speakers": [
288292
{
@@ -316,7 +320,12 @@
316320
"fullDescriptionEn": "Summer Edition 2024 was held at Paradigma SpA with the goal of sharing the latest Python news, listening to community expert talks and networking. The evening ended with a PyPizza together.",
317321
"attendees": 32,
318322
"url": "https://www.meetup.com/python-catania/events/302671524/",
319-
"videos": ["1HksMsb9Xho", "m0lCULOKqTc", "ymCyuHgP6h4", "yD2zhMWeJBM?start=1547"],
323+
"videos": [
324+
{ "id": "m0lCULOKqTc", "title": "Introduzione al Python Catania Meetup del 30/08/2024" },
325+
{ "id": "1HksMsb9Xho", "title": "Python Catania Meetup 30/08/24 - Introduzione a Odoo by Salvo Rapisarda" },
326+
{ "id": "ymCyuHgP6h4", "title": "Python Catania Meetup 30/08/24 - PyScript by Pietro Peterlongo" },
327+
{ "id": "yD2zhMWeJBM?start=1547", "title": "Python Catania Meetup 30/08/24 - Micropython by Salvatore Sanfilippo" }
328+
],
320329
"gallery": ["/images/events/event-302671524.jpg"],
321330
"speakers": [
322331
{

src/app/pages/events/event-detail/event-detail.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ interface MeetupEvent {
2828
readonly fullDescriptionEn: string;
2929
readonly attendees: number;
3030
readonly url: string;
31-
readonly videos?: string[];
31+
readonly videos?: { id: string; title: string }[];
3232
readonly gallery: string[];
3333
readonly speakers: Speaker[];
3434
}
@@ -65,7 +65,9 @@ export class EventDetailComponent {
6565

6666
protected videoWatchUrl(videoId: string): string {
6767
const [id, params] = videoId.split('?');
68-
return params ? `https://www.youtube.com/watch?v=${id}&${params}` : `https://www.youtube.com/watch?v=${id}`;
68+
return params
69+
? `https://www.youtube.com/watch?v=${id}&${params}`
70+
: `https://www.youtube.com/watch?v=${id}`;
6971
}
7072

7173
protected openLightbox(index: number): void {

0 commit comments

Comments
 (0)