Skip to content

Commit 77292cc

Browse files
committed
chore: minor update
1 parent a2b3375 commit 77292cc

3 files changed

Lines changed: 52 additions & 22 deletions

File tree

public/data/events.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"image": "/images/about/MatteoJacopoSchembri.jpeg",
3535
"slide": "https://pitch.com/v/phidias-mzj4tg",
3636
"project": "https://github.com/corradosantoro/phidias",
37+
"project2": "https://github.com/Giovannicampo/phidias_samples",
3738
"paper": "https://ceur-ws.org/Vol-2502/paper5.pdf"
3839
},
3940
{
@@ -43,6 +44,7 @@
4344
"image": "/images/events-speakers/GiovanniCampo.jpeg",
4445
"slide": "https://pitch.com/v/phidias-mzj4tg",
4546
"project": "https://github.com/corradosantoro/phidias",
47+
"project2": "https://github.com/Giovannicampo/phidias_samples",
4648
"paper": "https://ceur-ws.org/Vol-2502/paper5.pdf"
4749
}
4850
]

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

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ <h2 class="mb-4 text-xl font-semibold">{{ 'events.speakers' | transloco }}</h2>
5656
<p class="text-sm text-(--color-muted)">
5757
{{ activeLang() === 'en' ? speaker.topicEn : speaker.topic }}
5858
</p>
59-
@if (speaker.slide || speaker.project || speaker.paper) {
59+
@if (speaker.slide || speaker.project || speaker.project2 || speaker.paper) {
6060
<div class="mt-2 flex flex-wrap gap-3">
6161
@if (speaker.slide) {
6262
<a
@@ -65,12 +65,19 @@ <h2 class="mb-4 text-xl font-semibold">{{ 'events.speakers' | transloco }}</h2>
6565
rel="noopener"
6666
class="inline-flex cursor-pointer items-center justify-center gap-2 rounded-(--radius) border-2 border-(--color-secondary) bg-(--color-secondary) px-4 py-2 text-sm font-semibold text-white no-underline transition-colors hover:border-(--color-secondary-hover) hover:bg-(--color-secondary-hover) hover:text-white [&_svg]:shrink-0"
6767
>
68-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="h-4 w-4" aria-hidden="true">
69-
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
70-
<polyline points="14 2 14 8 20 8"/>
71-
<line x1="16" y1="13" x2="8" y2="13"/>
72-
<line x1="16" y1="17" x2="8" y2="17"/>
73-
<polyline points="10 9 9 9 8 9"/>
68+
<svg
69+
viewBox="0 0 24 24"
70+
fill="none"
71+
stroke="currentColor"
72+
stroke-width="2"
73+
class="h-4 w-4"
74+
aria-hidden="true"
75+
>
76+
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
77+
<polyline points="14 2 14 8 20 8" />
78+
<line x1="16" y1="13" x2="8" y2="13" />
79+
<line x1="16" y1="17" x2="8" y2="17" />
80+
<polyline points="10 9 9 9 8 9" />
7481
</svg>
7582
Slides
7683
</a>
@@ -82,11 +89,18 @@ <h2 class="mb-4 text-xl font-semibold">{{ 'events.speakers' | transloco }}</h2>
8289
rel="noopener"
8390
class="inline-flex cursor-pointer items-center justify-center gap-2 rounded-(--radius) border-2 border-(--color-secondary) bg-(--color-secondary) px-4 py-2 text-sm font-semibold text-white no-underline transition-colors hover:border-(--color-secondary-hover) hover:bg-(--color-secondary-hover) hover:text-white [&_svg]:shrink-0"
8491
>
85-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="h-4 w-4" aria-hidden="true">
86-
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
87-
<polyline points="14 2 14 8 20 8"/>
88-
<line x1="12" y1="17" x2="12" y2="11"/>
89-
<line x1="9" y1="14" x2="15" y2="14"/>
92+
<svg
93+
viewBox="0 0 24 24"
94+
fill="none"
95+
stroke="currentColor"
96+
stroke-width="2"
97+
class="h-4 w-4"
98+
aria-hidden="true"
99+
>
100+
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
101+
<polyline points="14 2 14 8 20 8" />
102+
<line x1="12" y1="17" x2="12" y2="11" />
103+
<line x1="9" y1="14" x2="15" y2="14" />
90104
</svg>
91105
Paper
92106
</a>
@@ -102,6 +116,17 @@ <h2 class="mb-4 text-xl font-semibold">{{ 'events.speakers' | transloco }}</h2>
102116
Project
103117
</a>
104118
}
119+
@if (speaker.project2) {
120+
<a
121+
[href]="speaker.project2"
122+
target="_blank"
123+
rel="noopener"
124+
class="inline-flex cursor-pointer items-center justify-center gap-2 rounded-(--radius) border-2 border-(--color-primary) bg-(--color-primary) px-4 py-2 text-sm font-semibold text-white no-underline transition-colors hover:border-(--color-primary-hover) hover:bg-(--color-primary-hover) hover:text-white [&_svg]:shrink-0"
125+
>
126+
<app-icon-github />
127+
Code
128+
</a>
129+
}
105130
</div>
106131
}
107132
</div>
@@ -121,7 +146,7 @@ <h2 class="mb-4 text-xl font-semibold">{{ 'events.videos' | transloco }}</h2>
121146
[href]="videoWatchUrl(video.id)"
122147
target="_blank"
123148
rel="noopener"
124-
class="group relative block overflow-hidden rounded-(--radius) shadow no-underline"
149+
class="group relative block overflow-hidden rounded-(--radius) no-underline shadow"
125150
>
126151
<div class="relative aspect-video w-full">
127152
<img
@@ -130,14 +155,18 @@ <h2 class="mb-4 text-xl font-semibold">{{ 'events.videos' | transloco }}</h2>
130155
class="h-full w-full object-cover transition-opacity group-hover:opacity-80"
131156
/>
132157
<div class="absolute inset-0 flex items-center justify-center">
133-
<div class="flex h-14 w-14 items-center justify-center rounded-full bg-black/60 text-white transition-colors group-hover:bg-black/80">
158+
<div
159+
class="flex h-14 w-14 items-center justify-center rounded-full bg-black/60 text-white transition-colors group-hover:bg-black/80"
160+
>
134161
<svg viewBox="0 0 24 24" fill="currentColor" class="h-7 w-7 translate-x-0.5" aria-hidden="true">
135-
<path d="M8 5v14l11-7z"/>
162+
<path d="M8 5v14l11-7z" />
136163
</svg>
137164
</div>
138165
</div>
139166
</div>
140-
<div class="flex h-16 items-center bg-(--surface) px-3 py-2 text-base font-medium leading-snug text-white">
167+
<div
168+
class="flex h-16 items-center bg-(--surface) px-3 py-2 text-base leading-snug font-medium text-white"
169+
>
141170
{{ video.title }}
142171
</div>
143172
</a>

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';
21
import { NgOptimizedImage } from '@angular/common';
3-
import { ActivatedRoute, RouterLink } from '@angular/router';
42
import { HttpClient } from '@angular/common/http';
3+
import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';
54
import { toSignal } from '@angular/core/rxjs-interop';
5+
import { ActivatedRoute, RouterLink } from '@angular/router';
66
import { TranslocoModule, TranslocoService } from '@jsverse/transloco';
77
import { BASE_URL } from '../../../app.config';
8-
import { LightboxComponent } from '../../../components/shared/lightbox/lightbox.component';
98
import { IconGithubComponent } from '../../../components/shared/icons/icon-github/icon-github.component';
9+
import { LightboxComponent } from '../../../components/shared/lightbox/lightbox.component';
1010

1111
interface Speaker {
1212
readonly name: string;
@@ -15,6 +15,7 @@ interface Speaker {
1515
readonly topicEn: string;
1616
readonly slide?: string;
1717
readonly project?: string;
18+
readonly project2?: string;
1819
readonly paper?: string;
1920
}
2021

@@ -66,9 +67,7 @@ export class EventDetailComponent {
6667

6768
protected videoWatchUrl(videoId: string): string {
6869
const [id, params] = videoId.split('?');
69-
return params
70-
? `https://www.youtube.com/watch?v=${id}&${params}`
71-
: `https://www.youtube.com/watch?v=${id}`;
70+
return params ? `https://www.youtube.com/watch?v=${id}&${params}` : `https://www.youtube.com/watch?v=${id}`;
7271
}
7372

7473
protected openLightbox(index: number): void {

0 commit comments

Comments
 (0)