feat: Favicon für die Website hinzufügen
This commit is contained in:
1 parent
14425315e3
commit
9de675476d
32 files changed
+92
No files matched your search
@@ -349,6 +349,36 @@ if (wants('responsive')) {
|
||||
});
|
||||
}
|
||||
|
||||
if (wants('favicon')) {
|
||||
check('alle Top-Level-Seiten deklarieren das SVG-Favicon und den ICO-Fallback', () => {
|
||||
const files = readdirSync(PUBLIC).filter((file) => file.endsWith('.html')).sort();
|
||||
for (const file of files) {
|
||||
const html = pageHtml(file);
|
||||
assert.match(
|
||||
html,
|
||||
/<link rel="icon" href="assets\/favicon\.svg" type="image\/svg\+xml">/,
|
||||
`${file}: SVG-Favicon-Link fehlt`
|
||||
);
|
||||
assert.match(
|
||||
html,
|
||||
/<link rel="alternate icon" href="favicon\.ico" sizes="any">/,
|
||||
`${file}: ICO-Fallback-Link fehlt`
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
check('Favicon-Dateien enthalten ein kontrastreiches LT-Monogramm', () => {
|
||||
const svgAsset = path.join(PUBLIC, 'assets', 'favicon.svg');
|
||||
const icoAsset = path.join(PUBLIC, 'favicon.ico');
|
||||
assert.ok(existsSync(svgAsset), 'public/assets/favicon.svg fehlt');
|
||||
assert.ok(existsSync(icoAsset), 'public/favicon.ico fehlt');
|
||||
const svg = read('public/assets/favicon.svg');
|
||||
assert.match(svg, /viewBox="0 0 64 64"/);
|
||||
assert.match(svg, /aria-label="Leon Tonhäuser"/);
|
||||
assert.match(svg, />LT<\/text>/);
|
||||
});
|
||||
}
|
||||
|
||||
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.';
|
||||
|
||||
Reference in new issue
Block a user