feat: transform catalogs into field atlas

This commit is contained in:
ik
2026-09-12 15:20:26 +07:00
parent a8b1775169
commit 966000b0b0
17 changed files with 73 additions and 17 deletions
@@ -0,0 +1,15 @@
---
const { name, size = 112 } = Astro.props as { name: string; size?: number };
const variant = [...name].reduce((sum, char) => sum + (char.codePointAt(0) ?? 0), 0) % 3;
const shores = [
"M8 57C22 42 34 48 47 34S75 20 91 34s16 7 25-3",
"M7 48c17-20 34 5 50-10s28-15 38 1 13 14 22 9",
"M5 54c14-4 20-24 39-18s27-9 40-14 20 11 33 10",
];
---
<svg class="waterbody-mark" width={size} height={Math.round(size * .62)} viewBox="0 0 124 72" aria-hidden="true">
<path class="waterbody-mark__shore" d={shores[variant]} />
<path d="M12 61c18-7 31 6 49-2s31-6 51 0" />
<path d="M24 68c13-4 25 3 39-2s25-3 37 0" />
<circle cx={variant === 1 ? 82 : 51} cy={variant === 2 ? 25 : 30} r="3" />
</svg>