From b74dd3744e5cf3f5f3e0d560c52f95cad7fd4252 Mon Sep 17 00:00:00 2001 From: mrwhiski Date: Tue, 25 Aug 2026 21:48:57 +0200 Subject: [PATCH] Fix SEO/a11y issues, add Impressum UID, stop tracking raw photos - Use absolute og:image URLs and add missing og:description on Impressum - Load Google Fonts via instead of blocking @import - Prevent default on shop request button to avoid stray URL hash - Guard optimize-images.js against silent filename collisions - Add real Umsatzsteuer-Identifikationsnummer (UID) to Impressum - Correct README's shop description to match actual empty state - Stop tracking images/fotowebsite/ (raw, uncompressed source photos) since only images/optimized/ is served by the site --- .gitignore | 1 + README.md | 9 +++++++-- css/style.css | 3 +-- impressum.html | 8 ++++++-- index.html | 5 ++++- js/script.js | 1 + pictures.html | 5 ++++- scripts/optimize-images.js | 11 +++++++++++ shop.html | 5 ++++- templates/impressum.html | 8 ++++++-- templates/index.html | 5 ++++- templates/pictures.html | 5 ++++- templates/shop.html | 5 ++++- 13 files changed, 57 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 7021b89..48abb6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ .claude/ +images/fotowebsite/ diff --git a/README.md b/README.md index 059aee4..3f783a8 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,15 @@ Tischlerei-Staffenberger/ │ ├── build.js # Baut templates/ + partials/ zu den Root-HTML-Dateien │ └── optimize-images.js # Erzeugt WebP/JPEG-Varianten aus images/fotowebsite/ └── images/ - ├── fotowebsite/ # Original-Fotos (Rohmaterial, unkomprimiert) + ├── fotowebsite/ # Original-Fotos (Rohmaterial, unkomprimiert) – nicht in git, siehe unten └── optimized/ # Generierte WebP/JPEG-Varianten (von optimize-images.js) ``` +**Hinweis zu `images/fotowebsite/`:** Die unkomprimierten Rohfotos (oft mehrere MB pro +Bild) sind bewusst nicht in git getrackt (`.gitignore`), um das Repository klein zu +halten – ausgeliefert wird ohnehin nur `images/optimized/`. Rohfotos bitte separat +sichern (z. B. externe Festplatte/Cloud-Speicher), bevor sie lokal gelöscht werden. + ### Seiten bearbeiten (Templates + Build) Header und Footer sind identisch auf allen Seiten und liegen daher nur einmal in @@ -93,7 +98,7 @@ Von dort aus funktionieren alle Links, Schriftarten und Platzhalter-Bilder. |-------------|--------| | **Start** | Banner, Willkommenstext, Über mich, Leistungen (Möbel, Küchen, Außen), CTA „Kontakt“. | | **Bilder** | Galerie mit Filter: Alle / Küche / Außenbereich / Sonderanfertigung. | -| **Shop** | 6 Beispielprodukte mit Bild, Beschreibung, Preis und Button „Anfragen“ (öffnet E-Mail). | +| **Shop** | Leer bis Artikel ergänzt werden (siehe `shop-item-template.html`); jede Karte zeigt Bild, Beschreibung, Preis und Button „Anfragen” (öffnet E-Mail). | | **Impressum** | Anbieter, Kontakt, USt-ID, Verantwortlichkeit, Haftungsausschluss (Platzhalter). | Navigation ist auf allen Seiten gleich; die aktuelle Seite wird hervorgehoben. diff --git a/css/style.css b/css/style.css index de49f13..5da67be 100644 --- a/css/style.css +++ b/css/style.css @@ -3,8 +3,7 @@ Traditional, warm, responsive design ============================================ */ -/* --- Google Fonts --- */ -@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@400;500;600&display=swap'); +/* Google Fonts are loaded via in each page's */ /* --- CSS Custom Properties --- */ :root { diff --git a/impressum.html b/impressum.html index 3633cd5..eb9c152 100644 --- a/impressum.html +++ b/impressum.html @@ -10,7 +10,11 @@ - + + + + + @@ -65,7 +69,7 @@

Umsatzsteuer-Identifikationsnummer (UID)

-

Liegt noch nicht vor und wird ergänzt, sobald vorhanden.

+

ATU52635509

diff --git a/index.html b/index.html index dc7c6e4..a8f53a3 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,10 @@ - + + + + diff --git a/js/script.js b/js/script.js index ee894fe..783aa12 100644 --- a/js/script.js +++ b/js/script.js @@ -173,6 +173,7 @@ var requestBtns = document.querySelectorAll('.product-card .btn[data-product]'); requestBtns.forEach(function (btn) { btn.addEventListener('click', function (e) { + e.preventDefault(); var product = this.getAttribute('data-product'); if (product) { // Open mail with subject line (no real checkout) – replace email with your address diff --git a/pictures.html b/pictures.html index 7e32d73..843228e 100644 --- a/pictures.html +++ b/pictures.html @@ -11,7 +11,10 @@ - + + + + diff --git a/scripts/optimize-images.js b/scripts/optimize-images.js index ab740aa..24170a6 100644 --- a/scripts/optimize-images.js +++ b/scripts/optimize-images.js @@ -67,9 +67,20 @@ async function main() { console.log(`[${inputSubdir}] – ${files.length} images`); + const usedNames = new Map(); // baseName -> source filename, to catch collisions for (const file of files) { const inputPath = path.join(inputDir, file); const baseName = safeName(file); + + const collidesWith = usedNames.get(baseName); + if (collidesWith) { + throw new Error( + `Filename collision in ${inputSubdir}: "${file}" and "${collidesWith}" both normalize to "${baseName}" ` + + `and would overwrite each other's optimized output. Rename one of the source files and re-run.` + ); + } + usedNames.set(baseName, file); + await processImage(inputPath, outputDir, baseName, GALLERY_SIZES); } } diff --git a/shop.html b/shop.html index c409ca4..8bac855 100644 --- a/shop.html +++ b/shop.html @@ -11,7 +11,10 @@ - + + + + diff --git a/templates/impressum.html b/templates/impressum.html index a1898fb..53026b3 100644 --- a/templates/impressum.html +++ b/templates/impressum.html @@ -10,7 +10,11 @@ - + + + + + @@ -47,7 +51,7 @@

Umsatzsteuer-Identifikationsnummer (UID)

-

Liegt noch nicht vor und wird ergänzt, sobald vorhanden.

+

ATU52635509

diff --git a/templates/index.html b/templates/index.html index 1dbd5ec..372d9db 100644 --- a/templates/index.html +++ b/templates/index.html @@ -11,7 +11,10 @@ - + + + + diff --git a/templates/pictures.html b/templates/pictures.html index b753269..03585a5 100644 --- a/templates/pictures.html +++ b/templates/pictures.html @@ -11,7 +11,10 @@ - + + + + diff --git a/templates/shop.html b/templates/shop.html index cf99afd..e51ed6d 100644 --- a/templates/shop.html +++ b/templates/shop.html @@ -11,7 +11,10 @@ - + + + +