Add shared building-block components: header, footer, CTAs, topographic background
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
26
src/components/TopographicBg.astro
Normal file
26
src/components/TopographicBg.astro
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
interface Props {
|
||||
opacity?: number;
|
||||
lines?: number;
|
||||
}
|
||||
const { opacity = 0.12, lines = 8 } = Astro.props;
|
||||
|
||||
const paths: string[] = [];
|
||||
const stepY = 100 / (lines + 1);
|
||||
for (let i = 1; i <= lines; i++) {
|
||||
const y = i * stepY;
|
||||
const amp = 4 + (i % 3) * 2;
|
||||
paths.push(`M0,${y} Q25,${y - amp} 50,${y + amp * 0.6} T100,${y}`);
|
||||
}
|
||||
---
|
||||
<svg
|
||||
class="absolute inset-0 w-full h-full pointer-events-none"
|
||||
viewBox="0 0 100 100"
|
||||
preserveAspectRatio="none"
|
||||
aria-hidden="true"
|
||||
style={`opacity:${opacity}`}
|
||||
>
|
||||
<g fill="none" stroke="#f0b429" stroke-width="0.15" vector-effect="non-scaling-stroke">
|
||||
{paths.map((d) => <path d={d} />)}
|
||||
</g>
|
||||
</svg>
|
||||
Reference in New Issue
Block a user