From 717be35e8301c15e14826ed93aa286bbf0ca4e35 Mon Sep 17 00:00:00 2001 From: Anselm Josek Date: Wed, 5 Aug 2026 23:30:35 +0200 Subject: [PATCH] Website content v2, redesign fixes, and Playwright test suite Implements the remaining content-v2 prompt (subhead, data-privacy section, grouped features, annotated screenshot, open-source/for-whom sections, 7-item FAQ, /datenschutz page) plus the verified bugs from the redesign brief: centralizes the GitHub repo reference (was hardcoded to the wrong org in several places), turns /windows /macos /linux into thin redirects to /download#anchor instead of duplicating content, and fixes a duplicate id="download" that broke anchor scrolling. Also addresses issues found during manual + user testing: - Footer GitHub stats were refetching the API 3x per page x 6 pages per build, burning through the unauthenticated rate limit; memoized into src/lib/github-stats.ts so it fetches once per build/dev process. - /download page tabs used a non-existent `rounded-klein` Tailwind class and a `!important` legacy override, producing a cramped, unstyled layout; rebuilt as a proper pill tab-switcher with glass-card panels, removed the dead `!important` CSS and the unused legacy tailwind.config.mjs (Tailwind v4 uses the CSS-based @theme in global.css instead). - Hero rotating example replaced with a small vanilla-JS typewriter effect (delete-and-retype, 8 well-known example transactions) after establishing that no suitable off-the-shelf library exists (Typed.js/TypeIt are GPL-3.0, conflicting with this repo's MIT license; the MIT alternative requires React). Reduced-motion users get an instant hard-cut swap instead of per-character animation. - Removed 8 dead CSS files and an unused FeatureCard component that were never imported anywhere. Adds a Playwright smoke-test suite (21 tests) covering navigation/anchors, redirects, the FAQ accordion, download tabs and copy button, footer stats structure, and the typewriter effect's typing/deleting/cycling/reduced-motion behavior - wired into CI (new ci.yml for PRs, test step in the deploy workflow) so these regressions are caught automatically going forward. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/ci.yml | 32 +++ .github/workflows/deploy-website.yml | 6 + .gitignore | 6 + README.md | 9 +- package-lock.json | 66 ++++++ package.json | 6 +- playwright.config.ts | 21 ++ src/components/DataPrivacy.astro | 76 +++++++ src/components/DownloadButtons.astro | 8 +- src/components/FAQ.astro | 20 +- src/components/FeatureCard.astro | 11 - src/components/Features.astro | 149 +++++++++---- src/components/Footer.astro | 17 +- src/components/ForWhom.astro | 87 ++++++++ src/components/Header.astro | 3 +- src/components/Hero.astro | 229 ++++++++++++++------ src/components/OpenSource.astro | 64 ++++++ src/components/PrimaryDownload.astro | 58 ++++- src/components/Screenshots.astro | 89 +++++++- src/components/TrustBar.astro | 4 +- src/layouts/Layout.astro | 1 + src/lib/github-stats.ts | 50 +++++ src/lib/repo.ts | 4 +- src/pages/datenschutz.astro | 56 +++++ src/pages/download.astro | 307 ++++++++++++++++++++------- src/pages/index.astro | 6 + src/pages/linux.astro | 47 ++-- src/pages/macos.astro | 52 ++--- src/pages/windows.astro | 45 ++-- src/styles/accordion.css | 46 ---- src/styles/components.css | 7 - src/styles/feature.css | 42 ---- src/styles/flow.css | 33 --- src/styles/global.css | 13 -- src/styles/header.css | 64 ------ src/styles/hero.css | 113 ---------- src/styles/screenshot.css | 30 --- src/styles/trust.css | 20 -- tailwind.config.mjs | 19 -- tests/download.spec.ts | 37 ++++ tests/faq-accordion.spec.ts | 29 +++ tests/footer.spec.ts | 25 +++ tests/hero-carousel.spec.ts | 91 ++++++++ tests/navigation.spec.ts | 37 ++++ tests/redirects.spec.ts | 19 ++ 45 files changed, 1428 insertions(+), 726 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 playwright.config.ts create mode 100644 src/components/DataPrivacy.astro delete mode 100644 src/components/FeatureCard.astro create mode 100644 src/components/ForWhom.astro create mode 100644 src/components/OpenSource.astro create mode 100644 src/lib/github-stats.ts create mode 100644 src/pages/datenschutz.astro delete mode 100644 src/styles/accordion.css delete mode 100644 src/styles/components.css delete mode 100644 src/styles/feature.css delete mode 100644 src/styles/flow.css delete mode 100644 src/styles/header.css delete mode 100644 src/styles/hero.css delete mode 100644 src/styles/screenshot.css delete mode 100644 src/styles/trust.css delete mode 100644 tailwind.config.mjs create mode 100644 tests/download.spec.ts create mode 100644 tests/faq-accordion.spec.ts create mode 100644 tests/footer.spec.ts create mode 100644 tests/hero-carousel.spec.ts create mode 100644 tests/navigation.spec.ts create mode 100644 tests/redirects.spec.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7aa1d63 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: CI + +on: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Install dependencies + run: npm ci + + - name: Build Astro site + run: npm run build + + - name: Install Playwright browsers + run: npx playwright install --with-deps chromium + + - name: Run smoke tests + run: npm test diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml index 31da21b..e128ec0 100644 --- a/.github/workflows/deploy-website.yml +++ b/.github/workflows/deploy-website.yml @@ -32,6 +32,12 @@ jobs: - name: Build Astro site run: npm run build + - name: Install Playwright browsers + run: npx playwright install --with-deps chromium + + - name: Run smoke tests + run: npm test + - name: Setup Pages uses: actions/configure-pages@v5 diff --git a/.gitignore b/.gitignore index 16d54bb..0c4d7d2 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,9 @@ pnpm-debug.log* # jetbrains setting folder .idea/ + +# Playwright +test-results/ +playwright-report/ +blob-report/ +playwright/.cache/ diff --git a/README.md b/README.md index 83b1a6c..13ec6b8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Klarwert Website -Statische Marketing-/Download-Website für [Klarwert](https://github.com/AnselmJo/Klarwert) – gebaut mit [Astro](https://astro.build) + Tailwind CSS, deployt automatisch nach GitHub Pages. +Statische Marketing-/Download-Website für [Klarwert](https://github.com/Klarwert/Klarwert) – gebaut mit [Astro](https://astro.build) + Tailwind CSS, deployt automatisch nach GitHub Pages. ## Entwicklung @@ -13,10 +13,11 @@ npm run preview # Build lokal ansehen ## Struktur -- `src/pages/` – die vier Seiten (Startseite + Windows/macOS/Linux) -- `src/layouts/Layout.astro` – gemeinsames HTML-Grundgerüst inkl. Footer +- `src/pages/` – Startseite, `/download` (vollständige Windows/macOS/Linux-Inhalte), `/datenschutz`, sowie `/windows` `/macos` `/linux` als schlanke Redirects auf die jeweilige `/download`-Sektion +- `src/layouts/Layout.astro` – gemeinsames HTML-Grundgerüst inkl. Header/Footer - `src/components/` – Footer, Download-Buttons (mit clientseitiger OS-Erkennung) -- `src/lib/repo.ts` – zentrale Repo-Referenzen (Releases-/Issue-Links) +- `src/lib/repo.ts` – zentrale Repo-Referenzen (Releases-/Issue-Links) – **einzige Stelle**, an der die GitHub-Org/Repo-Referenz steht, nirgends hardcoden +- `tests/` – Playwright-Smoke-Tests (`npm test`) ## Deployment diff --git a/package-lock.json b/package-lock.json index ca7061c..3b0a149 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,9 @@ "astro": "^7.1.6", "tailwindcss": "^4.3.3" }, + "devDependencies": { + "@playwright/test": "^1.62.1" + }, "engines": { "node": ">=22.12.0" } @@ -1619,6 +1622,22 @@ "url": "https://github.com/sponsors/Boshen" } }, + "node_modules/@playwright/test": { + "version": "1.62.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.62.1.tgz", + "integrity": "sha512-DTcUc8qii+cpHvtOwggMtBRMjKZHXYWdw8syRYu2vtzuq4Wxphqq4NfCs5Zt44L6mA8rfDfj+PHnxFc/FeK6mQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright": "1.62.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/@rolldown/binding-android-arm64": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.1.tgz", @@ -4149,6 +4168,53 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/playwright": { + "version": "1.62.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.62.1.tgz", + "integrity": "sha512-0M+L3LAD8/nm554LOla9Ayx0j0tmFZ0FBcoQ7F1VuVHpM/XpiC8RcDzBQB8W5+hA8L22THxELzeF+2WcUzvcLg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.62.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.62.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.62.1.tgz", + "integrity": "sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/playwright/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/postcss": { "version": "8.5.25", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.25.tgz", diff --git a/package.json b/package.json index 92f0dd6..22988d3 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "dev": "astro dev --background", "build": "astro build", "preview": "astro preview", - "astro": "astro" + "astro": "astro", + "test": "playwright test" }, "dependencies": { "@fontsource/fraunces": "^5.3.0", @@ -19,5 +20,8 @@ "@tailwindcss/vite": "^4.3.3", "astro": "^7.1.6", "tailwindcss": "^4.3.3" + }, + "devDependencies": { + "@playwright/test": "^1.62.1" } } diff --git a/playwright.config.ts b/playwright.config.ts new file mode 100644 index 0000000..7c66ed8 --- /dev/null +++ b/playwright.config.ts @@ -0,0 +1,21 @@ +import { defineConfig, devices } from "@playwright/test"; + +export default defineConfig({ + testDir: "./tests", + fullyParallel: true, + retries: process.env.CI ? 1 : 0, + reporter: process.env.CI ? "list" : "html", + use: { + baseURL: "http://localhost:4321", + trace: "retain-on-failure", + }, + webServer: { + command: "npm run preview", + url: "http://localhost:4321", + reuseExistingServer: !process.env.CI, + timeout: 60_000, + }, + projects: [ + { name: "chromium", use: { ...devices["Desktop Chrome"] } }, + ], +}); diff --git a/src/components/DataPrivacy.astro b/src/components/DataPrivacy.astro new file mode 100644 index 0000000..2009327 --- /dev/null +++ b/src/components/DataPrivacy.astro @@ -0,0 +1,76 @@ +
+
+

Deine Finanzdaten gehören dir.

+

+ Klarwert hat keinen Server, keine Cloud, kein Login. + Deine Bankumsätze werden auf deinem Gerät verarbeitet – und bleiben dort. +

+ + + +

✕ keine Cloud · ✕ kein Login · ✕ kein Tracking

+
+
+ + diff --git a/src/components/DownloadButtons.astro b/src/components/DownloadButtons.astro index b82d793..e217b51 100644 --- a/src/components/DownloadButtons.astro +++ b/src/components/DownloadButtons.astro @@ -1,17 +1,17 @@ --- --- -
- +
+ Windows - + macOS - + Linux diff --git a/src/components/FAQ.astro b/src/components/FAQ.astro index bd72726..32ce0bd 100644 --- a/src/components/FAQ.astro +++ b/src/components/FAQ.astro @@ -5,20 +5,24 @@ const faqs = [ a: "Ja, vollständig und für immer. Kein Abo, keine Pro-Version, keine versteckten Kosten. Klarwert ist Open Source und bleibt es.", }, { - q: "Wo werden meine Daten gespeichert?", - a: "Ausschließlich auf deinem Gerät, in einer lokalen Datenbank. Klarwert hat keine Cloud, keinen Server und kein Login.", + q: "Warum verbindet sich Klarwert nicht direkt mit meiner Bank?", + a: "Bewusste Entscheidung: der Export dauert bei den meisten Banken nur wenige Klicks. Dafür gibst du niemals deine Bankzugangsdaten weiter, und deine Daten landen auf keinem fremden Server.", }, { - q: "Verbindet sich Klarwert mit meiner Bank?", - a: "Nein, bewusst nicht. Du exportierst deine Umsätze als CSV oder Excel aus deinem Online-Banking und importierst sie manuell – so bleibt die Kontrolle bei dir, ohne dass du Bankzugangsdaten irgendwo hinterlegst.", + q: "Muss ich meine Umsätze jedes Mal komplett neu importieren?", + a: "Nein – Klarwert erkennt bereits importierte Buchungen automatisch und überspringt sie. Du kannst dieselbe Exportdatei jederzeit erneut importieren, ohne Duplikate zu erzeugen.", }, { - q: "Für welche Betriebssysteme gibt es Klarwert?", - a: "Windows, macOS und Linux.", + q: "Was passiert mit meinen Daten, wenn ich Klarwert lösche?", + a: "Nichts weiter – deine Daten liegen in einer einzelnen Datei auf deinem Gerät. Löschst du die App, bleibt diese Datei, bis du sie selbst löschst oder vorher exportierst.", + }, + { + q: "Was passiert, wenn Klarwert irgendwann nicht mehr weiterentwickelt wird?", + a: "Klarwert bleibt funktionsfähig, weil alles lokal auf deinem Gerät läuft, unabhängig von uns. Und weil der Code offen ist, kann jeder – auch du – die Entwicklung fortführen.", }, { - q: "Ist der Code einsehbar?", - a: "Ja, vollständig. Klarwert ist Open Source – du kannst jede Zeile Code auf GitHub nachlesen.", + q: "Für welche Betriebssysteme gibt es Klarwert?", + a: "Windows, macOS und Linux.", }, { q: "Unterstützt Klarwert andere Sprachen als Deutsch?", diff --git a/src/components/FeatureCard.astro b/src/components/FeatureCard.astro deleted file mode 100644 index c21ad00..0000000 --- a/src/components/FeatureCard.astro +++ /dev/null @@ -1,11 +0,0 @@ ---- -import "../styles/feature.css"; ---- -
-
- - -
-

{Astro.props.title}

-

{Astro.props.text}

-
diff --git a/src/components/Features.astro b/src/components/Features.astro index 059fc8c..de0f002 100644 --- a/src/components/Features.astro +++ b/src/components/Features.astro @@ -1,34 +1,47 @@ --- -const features = [ +const groups = [ { - icon: ``, - title: "Import & Kategorisierung", - text: "CSV oder Excel rein, Ordnung raus. Klarwert erkennt Händler und Kategorien automatisch – lernt dabei aus deinen eigenen Korrekturen." + title: "Verstehen", + subtitle: "Wo geht dein Geld hin?", + items: [ + { + icon: ``, + title: "Import & Kategorisierung", + text: "CSV oder Excel rein, Ordnung raus. Klarwert erkennt Händler und Kategorien automatisch – lernt dabei aus deinen eigenen Korrekturen." + }, + { + icon: ``, + title: "Verträge & Wiederkehrendes", + text: "Alle Abos und Daueraufträge an einem Ort. Klarwert erkennt wiederkehrende Zahlungen automatisch aus deinen Buchungen." + }, + ], }, { - icon: ``, - title: "Verträge & Wiederkehrendes", - text: "Alle Abos und Daueraufträge an einem Ort. Klarwert erkennt wiederkehrende Zahlungen automatisch aus deinen Buchungen." + title: "Planen", + subtitle: "Was willst du mit deinem Geld?", + items: [ + { + icon: ``, + title: "Sparen nach Zweck", + text: "Ob Rücklage, Urlaub oder Depot – jedes Sparziel sichtbar, mit echtem Fortschritt statt vager Vorsätze." + }, + { + icon: ``, + title: "Budgets", + text: "Grenzen setzen, die du auch einhältst – weil du sie siehst, bevor der Monat vorbei ist." + }, + ], }, { - icon: ``, - title: "Sparen nach Zweck", - text: "Ob Rücklage, Urlaub oder Depot – jedes Sparziel sichtbar, mit echtem Fortschritt statt vager Vorsätze." - }, - { - icon: ``, - title: "Budgets", - text: "Grenzen setzen, die du auch einhältst – weil du sie siehst, bevor der Monat vorbei ist." - }, - { - icon: ``, - title: "Steuer-Vorbereitung", - text: "Die Belege für deinen Steuerberater, schon sortiert. Kein Ordner-Chaos im März." - }, - { - icon: ``, - title: "Finanz-Rechner", - text: "FIRE, Zinseszins, Entnahmeplan – rechne durch, was dein Geld in 10, 20, 30 Jahren für dich tun kann." + title: "Vorausdenken", + subtitle: "Was bedeutet das für deine Zukunft?", + items: [ + { + icon: ``, + title: "Finanz-Rechner", + text: "FIRE, Zinseszins, Entnahmeplan – rechne durch, was dein Geld in 10, 20, 30 Jahren für dich tun kann." + }, + ], }, ]; --- @@ -40,15 +53,35 @@ const features = [

Alles, was du brauchst, um deine Finanzen im Griff zu behalten.

-
- {features.map((f) => ( -
-
-

{f.title}

-

{f.text}

-
+
+ {groups.map((group) => ( +
+
+

{group.title}

+

{group.subtitle}

+
+
+ {group.items.map((f) => ( +
+
+

{f.title}

+

{f.text}

+
+ ))} +
+
))}
+ +
+

Wenn im März die Steuererklärung ansteht

+

+ Klarwert hat deine relevanten Buchungen bereits kategorisiert und + zugeordnet. Ausgaben → Kategorien → steuerrelevante Positionen → + Unterlagen für den Steuerberater. Vorsichtig formuliert: Klarwert + bereitet vor, es ersetzt keine Steuerberatung. +

+
@@ -82,18 +115,36 @@ const features = [ margin: 0 auto; } - .features-grid { + .feature-groups { + display: flex; + flex-direction: column; + gap: 3rem; + } + + .group-header { + margin-bottom: 1.25rem; + } + + .group-header h3 { + font-family: var(--font-serif); + font-size: 1.375rem; + color: var(--petrol); + } + + .group-header p { + font-size: 0.9rem; + color: var(--slate); + margin-top: 0.2rem; + } + + .feature-group-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; } @media (min-width: 600px) { - .features-grid { grid-template-columns: repeat(2, 1fr); } - } - - @media (min-width: 1024px) { - .features-grid { grid-template-columns: repeat(3, 1fr); } + .feature-group-grid { grid-template-columns: repeat(2, 1fr); } } .feature-card { @@ -127,8 +178,9 @@ const features = [ display: block; } - .feature-card h3 { + .feature-card h4 { font-family: var(--font-serif); + font-weight: 500; font-size: 1.125rem; color: var(--charcoal); } @@ -138,4 +190,23 @@ const features = [ color: var(--slate); line-height: 1.6; } + + .scenario { + margin-top: 3rem; + padding: 1.75rem 2rem; + } + + .scenario h3 { + font-family: var(--font-serif); + font-size: 1.125rem; + color: var(--petrol); + margin-bottom: 0.6rem; + } + + .scenario p { + font-size: 0.9rem; + color: var(--slate); + line-height: 1.65; + max-width: 62ch; + } diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 84d44e3..628305a 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,20 +1,8 @@ --- import { ISSUES_BUG_URL, ISSUES_FEATURE_URL, DISCUSSIONS_URL } from "../lib/repo"; +import { getGithubStats } from "../lib/github-stats"; -let stars: string | number = "—"; -let lastRelease = "—"; -let lastCommit = "—"; - -try { - const [repoRes, releaseRes, commitRes] = await Promise.all([ - fetch("https://api.github.com/repos/AnselmJo/Klarwert"), - fetch("https://api.github.com/repos/AnselmJo/Klarwert/releases/latest"), - fetch("https://api.github.com/repos/AnselmJo/Klarwert/commits?per_page=1"), - ]); - if (repoRes.ok) { const d = await repoRes.json(); stars = d.stargazers_count ?? "—"; } - if (releaseRes.ok) { const d = await releaseRes.json(); lastRelease = d.tag_name ?? "—"; } - if (commitRes.ok) { const d = await commitRes.json(); lastCommit = (d[0]?.sha as string)?.slice(0, 7) ?? "—"; } -} catch { /* keep fallback values */ } +const { stars, lastRelease, lastCommit } = await getGithubStats(); ---