diff --git a/.env.example b/.env.example deleted file mode 100644 index 64fc8df..0000000 --- a/.env.example +++ /dev/null @@ -1 +0,0 @@ -VITE_SITE_URL=https://crr.jcarreira.pt diff --git a/LogoCRR.png b/LogoCRR.png new file mode 100644 index 0000000..8957f02 Binary files /dev/null and b/LogoCRR.png differ diff --git a/README.md b/README.md index f732d05..62235b7 100644 --- a/README.md +++ b/README.md @@ -63,13 +63,13 @@ The final image contains nginx and static files only. Node.js is used only in th ## Managing events -Each event is one Markdown file in `src/content/events/`. Its YAML frontmatter is the source of structured data and its Markdown body is the event information shown on the page. +Each event is one Markdown file in `content/events/`, separate from the Vue application source. Its YAML frontmatter is the source of structured data and its Markdown body is the event information shown on the page. To add an event: -1. Copy `src/content/events/festas-2026.md` to a new kebab-case filename. -2. Update the title, slug, dates, poster path, Facebook post URL, and suggested text. -3. Add the poster to `public/images/events/`. +1. Copy `content/events/festas-2026.md` to a new kebab-case filename. +2. Update the title, slug, dates, poster filename, Facebook post URL, and suggested text. +3. Add the poster image next to that event's Markdown file in `content/events/`. 4. Set exactly one event to `active: true`; mark the previous event `false`. 5. Run `npm run validate` and rebuild the Docker image. @@ -90,7 +90,7 @@ date: location: name: "Centro Recreativo da Rebolaria" locality: "Rebolaria, Batalha" -poster: "/images/events/nome-do-evento-2027.jpg" +poster: "nome-do-evento-2027.jpg" facebook: url: "https://www.facebook.com/..." embed: true diff --git a/compose.yaml b/compose.yaml index f78b077..216fa3d 100644 --- a/compose.yaml +++ b/compose.yaml @@ -3,8 +3,8 @@ services: build: context: . args: - VITE_SITE_URL: ${VITE_SITE_URL:-https://crr.jcarreira.pt} + VITE_SITE_URL: "https://crr.jcarreira.pt" container_name: crr-share restart: unless-stopped ports: - - "8080:80" + - "8200:80" diff --git a/content/events/festas-2026.jpeg b/content/events/festas-2026.jpeg new file mode 100644 index 0000000..63de191 Binary files /dev/null and b/content/events/festas-2026.jpeg differ diff --git a/content/events/festas-2026.md b/content/events/festas-2026.md new file mode 100644 index 0000000..594a0b4 --- /dev/null +++ b/content/events/festas-2026.md @@ -0,0 +1,50 @@ +--- +title: "Festas do 66.º Aniversário" +slug: "festas-2026" +active: true +date: + start: "2026-09-05" + end: "2026-09-07" +location: + name: "Centro Recreativo da Rebolaria" + locality: "Batalha" +poster: "festas-2026.jpeg" +facebook: + url: "https://www.facebook.com/story.php?story_fbid=122327514458210862&id=61556325866671" + embed: true +share: + text: | + Já está tudo preparado para mais um grande fim de semana na Rebolaria! 🎉🥳 + + Dias 5, 6 e 7 de setembro, apareçam e venham festejar connosco! ❤️💚 + + Vejam o programa completo aqui em baixo 👇 +--- + +## Sobre o evento + +Nos dias **5, 6 e 7 de setembro de 2026**, o **Centro Recreativo da Rebolaria** celebra o seu **66.º aniversário** com três dias de festa, música, tradição e convívio. + +As comemorações contam com um programa pensado para todas as idades, incluindo o **Torneio de Penalty Cup**, jogos tradicionais, folclore, animação musical e serviço de restaurante. Ao longo dos três dias, o palco recebe vários artistas e grupos, com destaque para **Pedro Nobre**, **DJ Pinona**, a banda **Red Kiss**, o **Rancho Folclórico Rosas do Lena** e **Fábio Tacho**. + +### Sábado, 5 de setembro + +- **15h00** — Torneio de Penalty Cup +- **19h00** — Abertura do restaurante +- **22h00** — Atuação de **Pedro Nobre** +- Segue-se **DJ Pinona** + +### Domingo, 6 de setembro + +- **12h00** — Abertura do arraial +- **16h30** — Atuação do **Rancho Folclórico Rosas do Lena** +- **19h00** — Abertura do restaurante +- **22h00** — Atuação da banda **Red Kiss** + +### Segunda-feira, 7 de setembro + +- **18h30** — Jogos tradicionais +- **19h00** — Abertura do restaurante +- **22h00** — Atuação de **Fábio Tacho** + +Uma celebração especial dos **66 anos de história do Centro Recreativo da Rebolaria**, reunindo associados, famílias, amigos e toda a comunidade num ambiente de festa e tradição. \ No newline at end of file diff --git a/index.html b/index.html index 5e9bf0b..6342cdd 100644 --- a/index.html +++ b/index.html @@ -3,8 +3,7 @@
- - + diff --git a/nginx.conf b/nginx.conf index 98a2582..21ad117 100644 --- a/nginx.conf +++ b/nginx.conf @@ -6,6 +6,7 @@ server { root /usr/share/nginx/html; index index.html; charset utf-8; + absolute_redirect off; gzip on; gzip_vary on; diff --git a/public/favicon.svg b/public/favicon.svg deleted file mode 100644 index 9c635e3..0000000 --- a/public/favicon.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/public/images/events/festas-2026.png b/public/images/events/festas-2026.png deleted file mode 100644 index 6f4601e..0000000 Binary files a/public/images/events/festas-2026.png and /dev/null differ diff --git a/public/images/events/festas-2026.svg b/public/images/events/festas-2026.svg deleted file mode 100644 index 81b895d..0000000 --- a/public/images/events/festas-2026.svg +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/scripts/validate-events.ts b/scripts/validate-events.ts index f0ef214..c048336 100644 --- a/scripts/validate-events.ts +++ b/scripts/validate-events.ts @@ -3,8 +3,7 @@ import { resolve } from 'node:path'; import { parseEventSource } from '../src/data/event-parser'; import { validateEventCollection } from '../src/data/event-schema'; -const eventDirectory = resolve(process.cwd(), 'src/content/events'); -const publicDirectory = resolve(process.cwd(), 'public'); +const eventDirectory = resolve(process.cwd(), 'content/events'); const eventFiles = readdirSync(eventDirectory).filter((file) => file.endsWith('.md')).sort(); if (eventFiles.length === 0) { @@ -14,10 +13,10 @@ if (eventFiles.length === 0) { const events = eventFiles.map((file) => { const filePath = resolve(eventDirectory, file); const event = parseEventSource(readFileSync(filePath, 'utf8'), file); - const posterPath = resolve(publicDirectory, `.${event.poster}`); + const posterPath = resolve(eventDirectory, event.poster); - if (!posterPath.startsWith(`${publicDirectory}/`) || !existsSync(posterPath)) { - throw new Error(`${file}: poster does not exist in public/: ${event.poster}`); + if (!posterPath.startsWith(`${eventDirectory}/`) || !existsSync(posterPath)) { + throw new Error(`${file}: poster does not exist next to the event Markdown file: ${event.poster}`); } return event; diff --git a/src/App.vue b/src/App.vue index de488ea..7566cc9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,12 @@ diff --git a/src/components/AppHeader.vue b/src/components/AppHeader.vue index 1f2e694..a970c50 100644 --- a/src/components/AppHeader.vue +++ b/src/components/AppHeader.vue @@ -1,8 +1,12 @@ + +