From 453b8262eec861b06f0d18d5c98d04af3b6a9c90 Mon Sep 17 00:00:00 2001 From: cgasser Date: Fri, 22 May 2026 11:44:17 +0200 Subject: [PATCH] Add CLAUDE.md with repo guidance for Claude Code Co-Authored-By: Claude Sonnet 4.6 --- CLAUDE.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..523f074 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,55 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## What this repo is + +Static one-page website for **Marszalek Architekten** (Perchtoldsdorf, Austria). No build system, no framework — the entire site is a single `index.html` served by nginx inside Docker. A 2-page A4 PDF info sheet lives alongside it as a pre-generated static asset. + +## Key commands + +### Regenerate the PDF +Requires Node.js and Google Chrome installed locally. Close the PDF in any viewer first (Windows locks open files). +``` +node generate-pdf.js +``` +The script uses `puppeteer-core` with the system Chrome at `C:\Program Files\Google\Chrome\Application\chrome.exe`. If Chrome moves, update `executablePath` in `generate-pdf.js`. + +### Build and run via Docker +``` +docker compose up --build -d # build image and start on port 3080 +docker compose down # stop +``` + +### Install Node deps (only needed to regenerate the PDF locally) +``` +npm install +``` + +## Architecture + +``` +index.html ← entire website (HTML + CSS + JS, no external assets) +infosheet-template.html ← HTML source rendered to PDF by Puppeteer +generate-pdf.js ← Node script: opens template in Chrome → exports A4 PDF +marszalek-architekten-infosheet.pdf ← pre-generated output; committed to repo +nginx.conf ← serves index.html + PDF; sets caching & download headers +Dockerfile ← nginx:alpine, copies index.html + PDF + nginx.conf +docker-compose.yml ← single service, host port 3080 → container port 80 +``` + +### PDF workflow +`infosheet-template.html` is a self-contained 2-page A4 HTML document styled for print (mm units, `print-color-adjust: exact`, `page-break-after: always` between pages). `generate-pdf.js` loads it via a `file:///` URL in headless Chrome, waits 1.5 s for Google Fonts, then calls `page.pdf()`. The output PDF is committed directly — Docker does **not** regenerate it at build time. + +### Website structure +`index.html` is a single-page site with five anchor-linked sections: `#home` (hero), `#projekte` (portfolio grid with JS category filter), `#leistungen` (services), `#ueber-uns` (team), `#kontakt` (contact + download banner). All portfolio images load directly from the original WordPress CDN at `marszalekarchitekten.at`. Google Fonts (Cormorant Garamond + Inter) are loaded from `fonts.googleapis.com`. + +### Brand colours +- Green accent: `#99cc00` (matches original site — used in nav bar and PDF header) +- Near-black: `#0f0f0f` +- The green is defined in `index.html` as the nav `background` and hardcoded in `infosheet-template.html` as `--green: #99cc00`. + +## Deployment (Portainer) +Add a stack pointing at `https://git.stranto.com/cgasser/web_marszalekarchitekten`, branch `master`. Portainer pulls the repo and runs `docker compose up`. The site is available on the host at port **3080**. + +When content changes: edit `index.html` and/or `infosheet-template.html`, regenerate the PDF locally with `node generate-pdf.js`, commit both, and redeploy the stack in Portainer.