Redesign Modern/Tijdreis, contactformulier via CMS, taalbestanden #17

Merged
Sluijsens merged 48 commits from feature/redesign-modern-timetravel into master 2026-11-16 11:51:47 +01:00
8 changed files with 2285 additions and 26 deletions
Showing only changes of commit 551b3fa101 - Show all commits
+63 -1
View File
@@ -40,6 +40,8 @@ concurrency:
env:
NODE_VERSION: '20'
PNPM_VERSION: '9'
# Chromium voor Lighthouse (zelfde aanpak als de ASF-site)
PLAYWRIGHT_VERSION: '1.55.0'
ARTIFACT_NAME: dist
ARTIFACT_NAME_PRODUCTION: dist-production
ARTIFACT_PATH: dist/
@@ -257,6 +259,66 @@ jobs:
- name: Unit tests
run: pnpm run test
# Lighthouse CI tegen de gebouwde site (dist/ uit de build-job; mobiel en desktop).
# Alle vier de categorieen moeten >= 0,9 halen (NFR-9). Deploy-test wacht hier
# bewust niet op (de testomgeving is om te testen, rapporten zie je in de
# artifacts); deploy-production wel: niets gaat live als Lighthouse faalt.
lighthouse:
needs: build
runs-on: linux
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Get pnpm store directory
id: pnpm-store
run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT"
- name: Restore pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_PATH }}
- name: Install Chromium
run: |
pnpm dlx playwright@${{ env.PLAYWRIGHT_VERSION }} install --with-deps chromium
CHROME_PATH="$(find "$HOME/.cache/ms-playwright" -path '*chrome-linux*' -name chrome -type f | head -n 1)"
test -x "$CHROME_PATH"
echo "CHROME_PATH=$CHROME_PATH" >> "$GITHUB_ENV"
"$CHROME_PATH" --version
# Chrome in een container: --no-sandbox (als root weigert Chrome anders te
# starten) en --disable-dev-shm-usage (/dev/shm is maar 64 MB).
- name: Lighthouse
env:
LIGHTHOUSE_CHROME_FLAGS: '--no-sandbox --headless=new --disable-dev-shm-usage'
run: pnpm run lighthouse
- name: Upload Lighthouse-rapporten
if: always()
uses: actions/upload-artifact@v3
with:
name: lighthouse-reports
path: lighthouse-reports/
retention-days: 14
deploy-test:
needs: [build, test, config]
# De push-naar-master-conditie hieronder is bewust ONAFHANKELIJK van het
@@ -285,7 +347,7 @@ jobs:
# niemand per ongeluk productie deployen door simpelweg naar master te
# pushen of de workflow handmatig te starten zonder dat vinkje.
deploy-production:
needs: [build-production, test, config]
needs: [build-production, test, lighthouse, config]
if: github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_production == 'true'
uses: ./.gitea/workflows/deploy.yaml
secrets: inherit
+4
View File
@@ -29,3 +29,7 @@ npm-debug.log*
# OS
.DS_Store
# Lighthouse CI
lighthouse-reports/
.lighthouseci/
@@ -32,14 +32,14 @@ Contact: **[OPEN: e-mailadres voor privacyvragen]**.
Ik gebruik je gegevens niet voor reclame en verkoop ze niet door.
### 3. Bewaartermijn
- Contactberichten: **12 maanden** na ontvangst, daarna worden ze automatisch verwijderd. Leidt je bericht tot een opdracht, dan bewaar ik de gegevens die nodig zijn voor de administratie zo lang als de wet vereist (fiscaal 7 jaar) **[OPEN: bevestigen]**.
- Contactberichten: **12 maanden** na ontvangst, daarna worden ze automatisch verwijderd. Leidt je bericht tot een opdracht, dan bewaar ik de gegevens die nodig zijn voor de administratie zo lang als de wet vereist (fiscaal 7 jaar). Besluit eigenaar.
- Statistieken: geanonimiseerd, geen persoonlijke profielen.
- Foutmeldingen: **[OPEN: bewaartermijn Sentry, bijv. 90 dagen]**.
- Foutmeldingen: **[OPEN: bewaartermijn Sentry controleren in de projectinstellingen, standaard 90 dagen]**.
### 4. Met wie deel ik gegevens
- Hosting van de website en het CMS: **[OPEN: eigen server thuis/Raspberry Pi of externe partij? Zo extern: naam en verwerkersovereenkomst]**.
- E-mail (ontvangst van contactberichten): **[OPEN: mailprovider invullen]**.
- Foutmonitoring: Sentry **[OPEN: eigen instantie of Sentry-cloud, en regio (EU?)]**.
- Hosting van de website en het CMS: een externe hostingpartij **[OPEN: naam invullen, vermoedelijk MijnHostingPartner; verwerkersovereenkomst afsluiten]**.
- E-mail (ontvangst van contactberichten): MijnHostingPartner (Nederland).
- Foutmonitoring: Sentry-cloud, EU-regio (Duitsland, de.sentry.io). Verwerkersovereenkomst: Sentry biedt een standaard-DPA aan **[OPEN: afsluiten/bevestigen]**.
- Statistieken: Umami, **zelf gehost** **[OPEN: bevestigen]**, dus geen gegevens naar derden.
Met verwerkers maak ik waar nodig een verwerkersovereenkomst. Ik geef geen gegevens door buiten de EU **[OPEN: bevestigen]**.
@@ -60,10 +60,10 @@ Deze verklaring kan wijzigen. De datum van de laatste wijziging staat onderaan:
## Open punten voor Bryan (samengevat)
1. Bedrijfsnaam/rechtsvorm en contactadres voor privacyvragen.
2. Waar draait de productiehost en wie levert de mail (verwerkers)?
3. Sentry: eigen instantie of cloud, bewaartermijn.
4. Wat legt de CMS-host vast bij het contactformulier (IP-adres, logs, bewaartermijn)?
5. Fiscale bewaartermijn bij opdrachten (7 jaar?).
2. Naam van de externe hostingpartij en verwerkersovereenkomsten (hosting/mail MijnHostingPartner, Sentry-DPA). Besloten: externe hosting, mail via MijnHostingPartner.
3. Sentry-bewaartermijn controleren (Sentry-cloud EU/Duitsland, besloten).
4. Wat legt de CMS-host vast bij het contactformulier (IP-adres, logs, bewaartermijn)? Dit zoek ik zelf uit bij de CMS-sessie.
5. Fiscale bewaartermijn bij opdrachten: 7 jaar (besloten).
6. Of je de tekst nog door iemand laat nalopen (aanrader vóór livegang).
## Technische vervolgstappen (na jouw goedkeuring van de tekst)
+23
View File
@@ -0,0 +1,23 @@
// Lighthouse CI tegen de gebouwde site (dist/, statisch geserveerd). Doel: NFR-9.
// Mobiele meting; lighthouserc.desktop.cjs bouwt hierop voort. `pnpm lighthouse`
// draait beide. Alle vier de categorieen moeten >= 0,9 halen (harde error).
module.exports = {
ci: {
collect: {
staticDistDir: './dist',
numberOfRuns: 1,
// In de CI-container draait Chrome als root en heeft het --no-sandbox nodig
// (LIGHTHOUSE_CHROME_FLAGS in de workflow).
settings: { chromeFlags: process.env.LIGHTHOUSE_CHROME_FLAGS ?? '' },
},
assert: {
assertions: {
'categories:performance': ['error', { minScore: 0.9 }],
'categories:accessibility': ['error', { minScore: 0.9 }],
'categories:best-practices': ['error', { minScore: 0.9 }],
'categories:seo': ['error', { minScore: 0.9 }],
},
},
upload: { target: 'filesystem', outputDir: 'lighthouse-reports/mobile' },
},
};
+13
View File
@@ -0,0 +1,13 @@
// Desktopmeting: zelfde pagina en doelen als mobiel (lighthouserc.cjs).
const base = require('./lighthouserc.cjs');
module.exports = {
ci: {
...base.ci,
collect: {
...base.ci.collect,
settings: { ...base.ci.collect.settings, preset: 'desktop' },
},
upload: { ...base.ci.upload, outputDir: 'lighthouse-reports/desktop' },
},
};
+2
View File
@@ -10,6 +10,7 @@
"test": "vitest run",
"test:watch": "vitest",
"lint": "eslint .",
"lighthouse": "lhci autorun && lhci autorun --config=lighthouserc.desktop.cjs",
"format": "prettier --write ."
},
"dependencies": {
@@ -26,6 +27,7 @@
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@lhci/cli": "0.15.1",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
+2143 -14
View File
File diff suppressed because it is too large Load Diff
+28 -2
View File
@@ -1,11 +1,37 @@
/// <reference types="vitest/config" />
import { defineConfig } from 'vite';
import { defineConfig, type Plugin } from 'vite';
import react from '@vitejs/plugin-react';
import { version } from './package.json';
// Preloads the latin display font (Archivo, used by the hero heading and the
// 2026 section) so it is requested with the HTML instead of after the CSS has
// been parsed. Build only: in dev the bundle is not available.
const preloadHeroFont = (): Plugin => ({
name: 'preload-hero-font',
transformIndexHtml: {
order: 'post',
handler(_html, ctx) {
if (!ctx.bundle) return [];
return Object.keys(ctx.bundle)
.filter((file) => /archivo-latin-wdth-normal-.*\.woff2$/.test(file))
.map((file) => ({
tag: 'link',
attrs: {
rel: 'preload',
as: 'font',
type: 'font/woff2',
href: `/${file}`,
crossorigin: '',
},
injectTo: 'head-prepend' as const,
}));
},
},
});
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [react(), preloadHeroFont()],
define: {
// Injected at build time, used as the Sentry `release` tag (see src/main.tsx).
__APP_VERSION__: JSON.stringify(version),