diff --git a/astro.config.mjs b/astro.config.mjs index 0faed7a..39e5622 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -16,6 +16,26 @@ export default defineConfig({ integrations: [sitemap()], + // Content-Security-Policy. Astro kennt seine eigenen gebuendelten Skripte und + // Styles und traegt deren SHA-256-Hashes automatisch nach - deshalb wird die + // Policy hier gesetzt und nicht im Reverse-Proxy: der weiss von den Hashes + // nichts und wuerde die Inline-Module blockieren. + security: { + csp: { + directives: [ + "default-src 'self'", + "img-src 'self' data:", + "font-src 'self'", + "connect-src 'self'", + "form-action 'self'", + "base-uri 'self'", + "object-src 'none'", + ], + scriptDirective: { resources: ["'self'"] }, + styleDirective: { resources: ["'self'"] }, + }, + }, + image: { // Bilder werden beim Build zu AVIF/WebP konvertiert. responsiveStyles: true, diff --git a/src/components/About.astro b/src/components/About.astro index 0d91d79..96fbef2 100644 --- a/src/components/About.astro +++ b/src/components/About.astro @@ -3,13 +3,9 @@ import { Image } from 'astro:assets'; import banner from '../assets/hero-banner.jpg'; import { ABOUT, GENRES, CONTACT } from '../data/site'; -const accentVar: Record<(typeof GENRES)[number]['accent'], string> = { - magenta: 'var(--color-laser-magenta)', - cyan: 'var(--color-laser-cyan)', - gold: 'var(--color-gold-400)', - violet: 'var(--color-laser-violet)', - lime: 'var(--color-laser-lime)', -}; +// Die Akzentfarbe kommt ueber die Klasse accent- aus dem diff --git a/src/components/Hero.astro b/src/components/Hero.astro index 67e11cf..a8cac53 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -4,14 +4,11 @@ import club from '../assets/hero-club.jpg'; import nizz from '../assets/nizz-cutout.png'; import { CONTACT, GENRES } from '../data/site'; -// Laserstrahlen: Position in %, Start-/Endwinkel, Farbe, Startverzoegerung -const beams = [ - { x: 18, from: '-26deg', to: '-13deg', color: 'var(--color-laser-cyan)', delay: '0s' }, - { x: 32, from: '-12deg', to: '-3deg', color: 'var(--color-laser-magenta)', delay: '-2.6s' }, - { x: 47, from: '9deg', to: '19deg', color: 'var(--color-gold-400)', delay: '-5.1s' }, - { x: 61, from: '22deg', to: '11deg', color: 'var(--color-laser-violet)', delay: '-1.3s' }, - { x: 74, from: '31deg', to: '20deg', color: 'var(--color-laser-cyan)', delay: '-6.7s' }, -]; +// Fuenf Laserstrahlen. Position, Winkel, Farbe und Verzoegerung stehen im +//