Skip to content

Commit 7cd6e1c

Browse files
committed
feat: add events pictures
1 parent 98b209a commit 7cd6e1c

File tree

13 files changed

+79
-65
lines changed

13 files changed

+79
-65
lines changed

public/data/events.json

Lines changed: 28 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,42 @@
11
[
22
{
3-
"id": 1,
4-
"title": "Python Catania #18 – AI & Machine Learning",
5-
"date": "2024-11-14",
6-
"image": "/images/events/event-18.jpg",
7-
"description": "Una serata dedicata all'intelligenza artificiale e al machine learning con Python. Talk su LLM, fine-tuning e casi d'uso reali.",
8-
"descriptionEn": "An evening dedicated to artificial intelligence and machine learning with Python. Talks on LLMs, fine-tuning and real use cases.",
3+
"id": 313050179,
4+
"title": "Meetup Python Catania - Python Coding Festival 🎶",
5+
"date": "2026-02-27",
6+
"image": "/images/events/event-313050179.jpg",
7+
"description": "La community di Python Catania si incontra per stare insieme e condividere del buon codice sorgente. Che tu sia uno sviluppatore principiante o esperto di Python, questo evento fa per te!",
8+
"descriptionEn": "The Python Catania community meets to spend time together and share great source code. Whether you are a beginner or an expert Python developer, this event is for you!",
99
"attendees": 45,
10-
"url": "https://www.meetup.com/python-catania/events/past/"
10+
"url": "https://www.meetup.com/python-catania/events/313050179/"
1111
},
1212
{
13-
"id": 2,
14-
"title": "Python Catania #17 – Web Frameworks",
15-
"date": "2024-09-19",
16-
"image": "/images/events/event-17.jpg",
17-
"description": "Confronto tra i principali framework web Python: Django, FastAPI e Flask. Casi d'uso, performance e quando scegliere l'uno o l'altro.",
18-
"descriptionEn": "Comparison of the main Python web frameworks: Django, FastAPI and Flask. Use cases, performance and when to choose one over the other.",
13+
"id": 312066711,
14+
"title": "Meetup Python Catania - Ho! Ho! Python Code! 🎅🎄",
15+
"date": "2025-12-09",
16+
"image": "/images/events/event-312066711.jpg",
17+
"description": "Edizione speciale natalizia della community Python Catania, dove condividere nuove tecnologie, buon codice sorgente e sempre nuove iniziative.",
18+
"descriptionEn": "A special Christmas edition of the Python Catania community, sharing new technologies, great source code and exciting new initiatives.",
1919
"attendees": 38,
20-
"url": "https://www.meetup.com/python-catania/events/past/"
20+
"url": "https://www.meetup.com/python-catania/events/312066711/"
2121
},
2222
{
23-
"id": 3,
24-
"title": "Python Catania #16 – Data Engineering",
25-
"date": "2024-06-13",
26-
"image": "/images/events/event-16.jpg",
27-
"description": "Talk su pipeline di dati, Apache Airflow e Pandas. Come gestire grandi volumi di dati con Python in maniera efficiente.",
28-
"descriptionEn": "Talks on data pipelines, Apache Airflow and Pandas. How to handle large volumes of data with Python efficiently.",
23+
"id": 311306942,
24+
"title": "Meetup Python Catania - PythObrata 2025 🌰🍷",
25+
"date": "2025-10-30",
26+
"image": "/images/events/event-311306942.jpg",
27+
"description": "Il mese di Ottobre è l'ideale per festeggiare l'arrivo dell'autunno e organizzare un nuovo meetup della community Python Catania, dove condividere nuove tecnologie, buon codice sorgente e sempre nuove iniziative.",
28+
"descriptionEn": "October is the perfect time to celebrate the arrival of autumn with a new Python Catania community meetup, sharing new technologies, great source code and exciting new initiatives.",
2929
"attendees": 42,
30-
"url": "https://www.meetup.com/python-catania/events/past/"
30+
"url": "https://www.meetup.com/python-catania/events/311306942/"
3131
},
3232
{
33-
"id": 4,
34-
"title": "Python Catania #15 – Testing & CI/CD",
35-
"date": "2024-03-21",
36-
"image": "/images/events/event-15.jpg",
37-
"description": "Best practice per il testing in Python: pytest, mocking, coverage e integrazione con pipeline CI/CD su GitHub Actions.",
38-
"descriptionEn": "Best practices for testing in Python: pytest, mocking, coverage and integration with CI/CD pipelines on GitHub Actions.",
33+
"id": 308969846,
34+
"title": "Meetup Python Catania - Con la calata del fresco",
35+
"date": "2025-07-17",
36+
"image": "/images/events/event-308969846.jpg",
37+
"description": "In una calda serata d'estate la community Python Catania si incontra alla ricerca di un poco di frescura e per condividere nuove tecnologie, buon codice sorgente e nuove iniziative.",
38+
"descriptionEn": "On a warm summer evening the Python Catania community meets in search of a little freshness, sharing new technologies, great source code and new initiatives.",
3939
"attendees": 35,
40-
"url": "https://www.meetup.com/python-catania/events/past/"
41-
},
42-
{
43-
"id": 5,
44-
"title": "Python Catania #14 – Containerization",
45-
"date": "2023-11-16",
46-
"image": "/images/events/event-14.jpg",
47-
"description": "Come containerizzare applicazioni Python con Docker e orchestrarle con Kubernetes. Demo pratiche e lessons learned.",
48-
"descriptionEn": "How to containerise Python applications with Docker and orchestrate them with Kubernetes. Practical demos and lessons learned.",
49-
"attendees": 40,
50-
"url": "https://www.meetup.com/python-catania/events/past/"
51-
},
52-
{
53-
"id": 6,
54-
"title": "Python Catania #13 – Open Source Contributions",
55-
"date": "2023-09-14",
56-
"image": "/images/events/event-13.jpg",
57-
"description": "Come contribuire a progetti open source in Python. Workflow con Git, come trovare issue adatte ai principianti e fare la prima pull request.",
58-
"descriptionEn": "How to contribute to open source Python projects. Git workflow, how to find beginner-friendly issues and make your first pull request.",
59-
"attendees": 30,
60-
"url": "https://www.meetup.com/python-catania/events/past/"
40+
"url": "https://www.meetup.com/python-catania/events/308969846/"
6141
}
6242
]

public/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"nav": {
33
"home": "PyCatania",
44
"nextMeetup": "Next Meetup",
5+
"callForSpeakers": "Propose a talk",
56
"contacts": "Contacts",
67
"supporters": "Supporters",
78
"community": "Community",

public/i18n/it.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"nav": {
33
"home": "PyCatania",
44
"nextMeetup": "Prossimo Meetup",
5+
"callForSpeakers": "Proponi un talk",
56
"contacts": "Contatti",
67
"supporters": "Sostenitori",
78
"community": "Community",
84 KB
Loading
145 KB
Loading
73.5 KB
Loading
85.3 KB
Loading

src/app/app.config.ts

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
import { DOCUMENT } from '@angular/common';
22
import { IMAGE_LOADER, ImageLoaderConfig } from '@angular/common';
33
import { provideHttpClient } from '@angular/common/http';
4-
import { ApplicationConfig, provideBrowserGlobalErrorListeners, isDevMode } from '@angular/core';
4+
import { ApplicationConfig, InjectionToken, provideBrowserGlobalErrorListeners, isDevMode } from '@angular/core';
55
import { provideRouter, withHashLocation } from '@angular/router';
66
import { provideTransloco } from '@jsverse/transloco';
77
import { routes } from './app.routes';
88
import { TranslocoHttpLoader } from './services/transloco-loader.service';
99

10+
export const BASE_URL = new InjectionToken<string>('BASE_URL');
11+
12+
function normalizeBase(document: Document): string {
13+
const base = document.querySelector('base')?.getAttribute('href') ?? '/';
14+
return base.endsWith('/') ? base.slice(0, -1) : base;
15+
}
16+
1017
export const appConfig: ApplicationConfig = {
1118
providers: [
1219
provideBrowserGlobalErrorListeners(),
@@ -21,16 +28,18 @@ export const appConfig: ApplicationConfig = {
2128
},
2229
loader: TranslocoHttpLoader,
2330
}),
31+
{
32+
provide: BASE_URL,
33+
useFactory: normalizeBase,
34+
deps: [DOCUMENT],
35+
},
2436
{
2537
provide: IMAGE_LOADER,
2638
useFactory:
27-
(document: Document) =>
28-
(config: ImageLoaderConfig): string => {
29-
const base = document.querySelector('base')?.getAttribute('href') ?? '/';
30-
const baseNormalized = base.endsWith('/') ? base.slice(0, -1) : base;
31-
return baseNormalized + config.src;
32-
},
33-
deps: [DOCUMENT],
39+
(baseUrl: string) =>
40+
(config: ImageLoaderConfig): string =>
41+
baseUrl + config.src,
42+
deps: [BASE_URL],
3443
},
3544
],
3645
};

src/app/components/header/header.component.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@
3434
>
3535
</li>
3636

37+
<!-- Call for Speakers -->
38+
<li class="flex list-none items-center">
39+
<a
40+
href="#call-for-speakers"
41+
(click)="scrollTo($event, 'call-for-speakers')"
42+
class="rounded-(--radius) px-3 py-[0.4rem] text-inherit no-underline transition-colors duration-150 hover:bg-(--surface)"
43+
>{{ 'nav.callForSpeakers' | transloco }}</a
44+
>
45+
</li>
46+
3747
<!-- Contacts -->
3848
<li class="flex list-none items-center">
3949
<a
@@ -161,6 +171,14 @@
161171
>{{ 'nav.nextMeetup' | transloco }}</a
162172
>
163173
</li>
174+
<li class="block">
175+
<a
176+
href="#call-for-speakers"
177+
(click)="scrollTo($event, 'call-for-speakers')"
178+
class="block rounded-[calc(var(--radius)-2px)] px-3 py-2 text-inherit no-underline hover:bg-(--surface)"
179+
>{{ 'nav.callForSpeakers' | transloco }}</a
180+
>
181+
</li>
164182
<li class="block">
165183
<a
166184
href="#contact"

src/app/pages/blog/blog.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/cor
22
import { toSignal } from '@angular/core/rxjs-interop';
33
import { HttpClient } from '@angular/common/http';
44
import { TranslocoModule, TranslocoService } from '@jsverse/transloco';
5+
import { BASE_URL } from '../../app.config';
56

67
interface BlogPost {
78
readonly id: number;
@@ -23,13 +24,14 @@ interface BlogPost {
2324
export class BlogComponent {
2425
private readonly http = inject(HttpClient);
2526
private readonly translocoService = inject(TranslocoService);
27+
private readonly baseUrl = inject(BASE_URL);
2628
protected readonly posts = signal<BlogPost[]>([]);
2729
protected readonly activeLang = toSignal(this.translocoService.langChanges$, {
2830
initialValue: this.translocoService.getActiveLang(),
2931
});
3032

3133
constructor() {
32-
this.http.get<BlogPost[]>('/data/blog-posts.json').subscribe((data) => {
34+
this.http.get<BlogPost[]>(`${this.baseUrl}/data/blog-posts.json`).subscribe((data) => {
3335
this.posts.set(data);
3436
});
3537
}

0 commit comments

Comments
 (0)