feat(hikes): inline cantonal Wappen next to region label

26 public-domain coats of arms fetched once from Wikimedia Commons
via scripts/download-cantons.ts and committed under static/cantons/.
$lib/data/cantons.ts maps Swisstopo's free-form name (German default,
French/Italian alternates for Romandie / Ticino) to the ISO code +
emblem URL.

Card shows an 18×22 emblem, detail page a 24×30 one — both with a
drop-shadow so they read against the dark hero gradient. Unknown
canton names fall back to plain text without the emblem.

The downloaded SVGs are written verbatim — earlier draft prepended a
provenance HTML comment but that breaks the leading `<?xml … ?>` and
browsers refuse to render the image. Provenance lives in the script's
CANTONS table instead.
This commit is contained in:
2026-05-19 08:44:30 +02:00
parent 2c3886296c
commit cfdd58fb18
31 changed files with 2371 additions and 3 deletions
+28
View File
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="407.257px" height="493.719px" viewBox="-176.486 -214.276 407.257 493.719"
enable-background="new -176.486 -214.276 407.257 493.719" xml:space="preserve">
<g>
<path fill="#FFFFFF" d="M26.987-212.749h202.277V84.49c0,106.844-90.508,193.422-202.141,193.422s-202.09-86.578-202.09-193.422
v-297.238L26.987-212.749L26.987-212.749z"/>
<polygon fill="#268BCC" points="-174.966,103.224 -174.966,-54.198 26.987,-54.198 229.264,-54.198 229.264,103.224 "/>
<g>
<g>
<g>
<g>
<defs>
<rect id="SVGID_1_" x="-176.486" y="-214.276" width="407.257" height="493.719"/>
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" overflow="visible"/>
</clipPath>
<path clip-path="url(#SVGID_2_)" fill="none" stroke="#010202" stroke-width="3.048" d="M26.987-212.749h202.277V84.49
c0,106.844-90.508,193.422-202.141,193.422s-202.09-86.578-202.09-193.422v-297.238L26.987-212.749L26.987-212.749z"/>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB