feat: AGB und Lizenzbedingungen veröffentlichen

This commit is contained in:
Leon Tonhäuser committed 2026-08-11 16:13:41 +02:00
1 parent 03b7872811
commit d5a74f1288
34 files changed
+530 -2

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ function personBusinessGraph() {
function breadcrumbListGraph(p) {
const segs = p.split('/').filter(Boolean);
const labels = {
portfolio: 'Portfolio', leistungen: 'Leistungen', sportfotografie: 'Sportfotografie', eventfotografie: 'Eventfotografie', 'über-mich': 'Über mich', kontakt: 'Kontakt', blog: 'Blog', archiv: 'Archiv',
portfolio: 'Portfolio', leistungen: 'Leistungen', sportfotografie: 'Sportfotografie', eventfotografie: 'Eventfotografie', 'über-mich': 'Über mich', kontakt: 'Kontakt', agb: 'AGB & Lizenzbedingungen', blog: 'Blog', archiv: 'Archiv',
'portfolio-fc-st-pauli': 'FC St. Pauli', 'portfolio-hamburger-sv': 'Hamburger SV', 'portfolio-frauen-bundesliga': 'Frauen-Bundesliga',
'portfolio-hannover-96': 'Hannover 96', 'portfolio-sv-meppen': 'SV Meppen', 'portfolio-deutschland-u21': 'Deutschland U21',
'portfolio-nfv-pokalfinale-2026': 'NFV-Pokalfinale 2026', 'portfolio-yes-con-2026': 'YES!CON 2026',
+126
View File
@@ -349,6 +349,132 @@ if (wants('responsive')) {
});
}
if (wants('agb')) {
const expectedTitle = 'AGB & Lizenzbedingungen | Leon Tonhäuser';
const expectedDescription = 'Allgemeine Geschäftsbedingungen sowie Nutzungs- und Lizenzbedingungen von Leon Tonhäuser für Fotoaufträge, Bildlizenzen und das Redaktionsportal.';
const headings = [
'1. Anbieter und Geltungsbereich',
'2. Vertragsschluss und Kommunikation',
'3. Fotoaufträge',
'4. Redaktionsportal und Benutzerkonto',
'5. Urheberrecht und Umfang der Bildlizenz',
'6. Unzulässige Nutzungen und Bearbeitungen',
'7. Urhebervermerk und Metadaten',
'8. Rechte abgebildeter Personen und redaktioneller Kontext',
'9. Vergütung, Nutzungsnachweis und Rechnung',
'10. Mitwirkung, Archivierung und Datensicherung',
'11. Mängel und Beanstandungen',
'12. Haftung',
'13. Vertragsdauer und Beendigung des Portalzugangs',
'14. Datenschutz',
'15. Schlussbestimmungen'
];
check('AGB-Seite und SEO-Konfiguration sind vorhanden', () => {
assert.ok(existsSync(path.join(PUBLIC, 'agb.html')), 'public/agb.html fehlt');
const page = loadConfig().PAGES['/agb'];
assert.ok(page, 'SEO_CONFIG.PAGES[\'/agb\'] fehlt');
assert.equal(page.title, expectedTitle);
assert.equal(page.desc, expectedDescription);
assert.deepEqual(Array.from(page.jsonld), ['breadcrumb']);
assert.ok(
pageHtml('agb.html').includes('"name":"AGB & Lizenzbedingungen"'),
'gebackener Breadcrumb-Name ist nicht freigegeben'
);
});
check('AGB-Seite ist semantisch in 15 Abschnitte gegliedert', () => {
const html = pageHtml('agb.html');
assert.equal(count(html, /<h1\b/g), 1, 'H1-Anzahl');
assert.equal(count(html, /<h2\b/g), 15, 'H2-Anzahl');
assert.ok(html.includes('<h1 class="hero-title">AGB &amp; Lizenzbedingungen</h1>'));
for (const [index, heading] of headings.entries()) {
const section = index + 1;
assert.equal(count(html, new RegExp(`id="agb-${section}"`, 'g')), 1, `Abschnitt agb-${section}`);
assert.equal(count(html, new RegExp(`href="#agb-${section}"`, 'g')), 1, `Inhaltslink agb-${section}`);
assert.ok(html.includes(`<h2>${heading}</h2>`), heading);
}
});
check('AGB-Seite enthält die freigegebenen Vertragsdaten ohne interne Platzhalter', () => {
const html = pageHtml('agb.html');
const visible = visibleMainText(html);
for (const text of [
'Leon Tonhäuser | Sportfotografie',
'Tannenworthring 40, 29574 Ebstorf',
'mail@leon-tonhaeuser.de',
'Stand: 11. August 2026',
'Rechnungen sind innerhalb von 14 Kalendertagen ab Zugang ohne Abzug zahlbar',
'© Leon Tonhäuser',
'der Sitz des Fotografen ausschließlicher Gerichtsstand'
]) {
assert.ok(visible.includes(text), `${text} fehlt`);
}
assert.ok(html.includes('href="./datenschutz"'));
assert.ok(html.includes('href="./impressum"'));
assert.doesNotMatch(
html,
/\[(?:VOLLSTÄNDIGER|ANSCHRIFT|E-MAIL|UST-ID|ORT DES GERICHTSSTANDS|URL)|Arbeitsentwurf|Wichtiger Hinweis|Hinweise für die KI|Verwendete amtliche Grundlagen/i
);
});
check('AGB-Seite bietet eine druckfreundliche Ausgabe', () => {
const html = pageHtml('agb.html');
const css = read('public/custom/site.css');
assert.match(html, /<button\b[^>]*\btype="button"[^>]*\bonclick="window\.print\(\)"[^>]*>/);
const printRules = css.match(/@media\s+print\s*\{([\s\S]*?)\n\}/);
assert.ok(printRules, '@media print fehlt');
assert.match(printRules[1], /\.topbar/);
assert.match(printRules[1], /\.dock/);
assert.match(printRules[1], /\.footer/);
assert.match(printRules[1], /\.agb-drucken/);
assert.match(printRules[1], /display:\s*none/);
});
check('AGB-H1 bleibt mobil ohne Worttrennung lesbar', () => {
const html = pageHtml('agb.html');
const css = read('public/custom/site.css');
assert.match(html, /<body\s+class="agb-seite">/);
const mobileTitleRule = css.match(
/@media\s*\(max-width:\s*809\.98px\)\s*\{[\s\S]*?\.agb-seite\s+\.hero-title\s*\{([^}]*)\}/
);
assert.ok(mobileTitleRule, 'mobile AGB-H1-Regel fehlt');
assert.match(mobileTitleRule[1], /hyphens:\s*none;/);
assert.match(mobileTitleRule[1], /overflow-wrap:\s*normal;/);
});
check('jeder vorhandene Top-Level-Footer verlinkt die AGB genau einmal', () => {
const files = readdirSync(PUBLIC).filter((file) => file.endsWith('.html')).sort();
let footerCount = 0;
for (const file of files) {
const footer = pageHtml(file).match(/<footer\b[\s\S]*?<\/footer>/i);
if (!footer) continue;
footerCount += 1;
assert.equal(count(footer[0], /href="\.\/agb"/g), 1, `${file}: AGB-Link im Footer`);
}
assert.ok(footerCount >= 28, `nur ${footerCount} Footer geprüft`);
});
check('Kontaktformular verweist unmittelbar auf die AGB', () => {
const html = pageHtml('kontakt.html');
const form = html.match(/<form\b[^>]*id="kontaktformular"[\s\S]*?<\/form>/i);
assert.ok(form, 'Kontaktformular fehlt');
assert.match(
form[0],
/<button\b[^>]*type="submit"[\s\S]*?<p\b[^>]*class="kontakt-rechtshinweis"[^>]*>Für geschäftliche Anfragen gelten unsere <a href="\.\/agb">AGB &amp; Lizenzbedingungen<\/a>\.<\/p>/
);
});
check('Sitemap enthält die AGB mit aktuellem Versionsdatum', () => {
const xml = read('public/sitemap.xml');
assert.equal(count(xml, /<loc>https:\/\/leon-tonhaeuser\.de\/agb<\/loc>/g), 1);
assert.match(
xml,
/<loc>https:\/\/leon-tonhaeuser\.de\/agb<\/loc><lastmod>2026-08-11<\/lastmod><changefreq>yearly<\/changefreq><priority>0\.2<\/priority>/
);
});
}
if (failures.length) {
console.error(`\n${failures.length} Prüfung(en) fehlgeschlagen.`);
process.exit(1);