Device pages / generate (push) Failing after 43s
Signed-off-by: Yigit BALABAN <balaban@yigid.dev>
17 lines
601 B
Plaintext
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} />
|