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
+76
View File
@@ -0,0 +1,76 @@
<?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.469px" height="492.748px" viewBox="0 0 406.469 492.748" enable-background="new 0 0 406.469 492.748"
xml:space="preserve">
<g>
<g>
<g>
<g>
<g>
<path fill="#FFFFFF" d="M203.086,1.565h201.839v296.668c0,106.594-90.281,193.047-201.703,193.047
c-111.406,0-201.711-86.453-201.711-193.047V1.565H203.086z"/>
</g>
</g>
</g>
</g>
<g>
<g>
<g>
<g>
<path fill="#E8423F" d="M274.115,1.748v477.259c76.164-27.384,130.414-97.538,130.805-179.905V1.746L274.115,1.748
L274.115,1.748z"/>
</g>
</g>
</g>
</g>
<g>
<g>
<g>
<g>
<path fill="#16A74E" d="M1.52,1.756v296.477c0,85.461,58.031,157.922,138.43,183.313V1.757L1.52,1.756L1.52,1.756z"/>
</g>
</g>
</g>
</g>
<g>
<g>
<g>
<g>
<polygon fill="#FFFFFF" points="393.559,59.955 346.365,59.955 346.365,12.526 332.332,12.526 332.332,59.955 285.99,59.955
285.99,73.998 332.332,73.998 332.332,119.877 346.365,119.877 346.365,73.998 393.559,73.998 "/>
</g>
</g>
</g>
</g>
<g>
<g>
<g>
<g>
<g>
<g>
<g>
<g>
<g>
<g>
<defs>
<rect id="SVGID_1_" y="0.014" width="406.457" height="492.734"/>
</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="M203.086,1.533h201.839v296.668
c0,106.609-90.281,193.031-201.703,193.031c-111.406,0-201.711-86.422-201.711-193.031V1.533H203.086z"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB