Files
site/src/components/Mark.astro
T
yigid 2cfe29f197
Device pages / generate (push) Failing after 43s
initial commit
Signed-off-by: Yigit BALABAN <balaban@yigid.dev>
2026-11-01 07:16:27 +03:00

17 lines
601 B
Plaintext

---
// Inlined peacock mark. The original site fetched these SVGs at runtime and
// swapped `fill:#...` for `fill:currentColor`; Astro can inline them at build
// time instead, which produces the same DOM without a network round-trip.
import headMark from '../assets/peacock-head.svg?raw';
import fullMark from '../assets/peacock-full.svg?raw';
const { name = 'head' } = Astro.props;
const source = name === 'full' ? fullMark : headMark;
const markup = source
.replace(/<\?xml[^>]*\?>/g, '')
.replace(/fill:#[0-9a-fA-F]{3,8}/g, 'fill:currentColor')
.trim();
---
<Fragment set:html={markup} />