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="406.425px" height="492.703px" viewBox="-176.197 -213.866 406.425 492.703"
enable-background="new -176.197 -213.866 406.425 492.703" xml:space="preserve">
<g>
<path fill="#FFFFFF" d="M26.881-212.346h201.824V84.306c0,106.594-90.281,193.016-201.688,193.016
c-111.398,0-201.695-86.422-201.695-193.016v-296.652H26.881z"/>
<polygon fill="#E8423F" points="-174.677,20.529 -174.677,-212.346 26.881,-212.346 228.707,-212.346 228.707,20.529 "/>
<g>
<g>
<g>
<g>
<defs>
<rect id="SVGID_1_" x="-176.197" y="-213.866" width="406.425" height="492.703"/>
</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.881-212.346h201.824V84.306
c0,106.594-90.281,193.016-201.688,193.016c-111.398,0-201.695-86.422-201.695-193.016v-296.652H26.881z"/>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB