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
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1900 2307">
<title>Wappen Graubünden</title>
<path d="m1893 8.939v1387c0 498-422 902-943 902-520.7 0-942.9-404-942.9-902l0.005-1387z" stroke="#000" stroke-width="14.21" fill="#fff"/>
<path d="m477.6 1111h-469.6l0.037-1104 469.6 0.186v1104zm1094 247c-1-5-4-10-6-14 1-6 1-12-1-18-4-11-14-19-25-22 0-5 0-9-2-14-4-13-17-22-33-23 0-4 0-7-1-10-7-19-29-28-52-22 0-2 0-4-1-6-7-19-31-29-54-21-1 1-2 1-2 1 0-3-1-5-2-8-6-18-30-26-53-18-4 1-8 3-11 5 0-2 0-5-1-7-6-18-30-26-54-18-8 3-16 8-21 14-5-17-27-28-50-24-13 3-23 9-30 17-8-13-27-20-47-17-18 4-32 15-36 28-8-12-26-19-44-16-22 5-38 23-34 42 0 2 1 3 1 5 9-7 22-14 33-17 23-6 45-2 58 10 4-3 8-6 13-8 23-11 49-8 63 7 1 0 2-1 3-2 28-13 59-6 70 17v2c1-1 1-1 2-1 27-13 58-6 69 17 1 1 2 3 2 5 54-15 191 58 238 156 9-11 12-26 8-40m-716.7-104c0-4 3.8-7 9.6-9 1 7 7.6 13 15.6 13 8.7 0 15.8-7 15.8-16h-0.1c9.7 1 17.3 5 17.3 12 0 20-58.2 16-58.2 0m641.7 208c2-8 2-17-2-25-5-9-12-16-20-19 3-8 3-17-1-26-5-9-13-16-23-18 2-8 2-16-1-24-6-12-19-18-33-18 2-8 1-17-2-24-8-15-26-22-45-19 0-4-1-9-3-13-8-17-29-24-50-17 1-7 0-13-2-18-8-17-33-23-56-12-5 2-9 5-13 9 0-5 0-10-3-15-8-17-33-23-55-12-4 2-8 4-11 7-8-18-33-23-56-12-7 3-13 8-18 13-8-14-31-21-54-15-14 4-25 11-33 20-41.4-44-94.9-39-109.6-37-74.4 11-111.2 58-158 62-21.3 2-42.6-6-53.5-12-10.4 19 8.7 13 7.1 26-0.5 4-21.3 28 8.2 29 14.1 1 39.2-2 47.9 9-137.9 23-100.3-43-123.7-43-33.8 0-28.4 97 66.5 79 3.3 7 10.4 12 15.3 16 31.6-22 101.9-10 35.4 38 52.9 6 60.5-31 61-34 19.2-9 62.2 9 86.2 6 24-2 57.2-36 66.5-38 33.2 38 56.7 36 120.7 22-22-56-85-37-89.1-52 24.1-16 73.1-24 128.1-22 0 0 1 1 2 1 50 2 107 13 156 35 103 48 191 138 194 245 28-32 32-63 20-92m-357 266c25 27 27 80 95 132-42 39-50 12-53 10-69 4-19-69-24-87-92 84-34 149-34 149s15 25-9 30c-52 11-178.6 60-218.5 122-21 32-40.3-12-48.1-11-14.8 3-48.7 62-48.7 62s-79.4 12-81.7 9c-2.4-4 28.2-52 39.1-69-19.9-10-48.9 42-48.9 42l-42.9 6s67.8-69 71.2-81c3.2-8 153.9 6 248-123-170.8-149 112.5-205 155.5-191m-1036 30s27.2 7 33.2 10c5.9 4 53.3-39 56.9-39 3.7 1 7.1 3 7.9 7 0.7 4-65.5 68-65.5 68s57.7 3 90.8 1c33.2-3 32.3-24 41.6-43 12.6-13 19.6-16 19.6-16s8.8 13 29.1 16c22.1 4 44.6-47 103.8-87 38.2-27 149 7 149 7s165.7 51 175.3 69c49.6-13 53.5-109 72.3-102 32.9 13-7.6 41-6.4 59 26.5-5 277.1-15 298.1-5 2 0-57-31-57-31s80-51 153 125c24 59 93 57 135 76 122 18 82 170 87 189-1 3-8 10-10 12-8 9-32 13-32 13h-8s-11-3-21-3c-26-1-51 35-84 72 21 10 41-6 41-6s38-62 48-41c1 3-43 72-47 76 5 16 33-9 42-11 10-1 59-5 68-45 4-23 59-17 59-17s10-4 14-9c-16-19-1-182-9-207 12-31-2-47-2-47s-25 1-45-16c-35-17-74-165-100-178 2-5 4-9 8-11 35-15 70 18 73 42 1 17 56 24 56 24s3-4-13-23c-4-4 4-8 4-8s61 27 74-19c-70 23-116-96-216-17-41-36-129-93-388.5-133 78.5-88 58.4-143 26.7-158-71.9 55-95.4 14-121.1 22-20.9 90-248.1 18-258.8 215 3.6 0 65.3 3 74.2 3 3.2 12 7.9 12-24.6 20-17.9-5-112.6-7-155.9-20-45.9-9-91.7 30-91.7 30s-76.3 61-93.8 69c-17.4 8-55.7 16-66.1 21-10.2 4-30.3-2-30.3-2l-93.8 48zm479.4-297c4.4 6 20.6 14 20.6 14s-29 35-44.5 111c-20.4-1-33.5-2-33.5-2s-25.2 2-33.7-32c-21.5-85-23.6-121-45.6-151-10.8-15-39.4-23-65.7-31-27.4-9-52.5-17-52.5-17s-34.4-16-61.6 8c-3.1 3-9.7 2-10.6-14s-18.1-9-18.1-9-24.7 14-50.5 21c-32.4 9-84.3-55-101.4-54 25.2-1 98.9-2 98.9-2s10.4-8 2.9-15-63.7 10-69.7 1-16.8-26-16.8-26 31.2 10 77.6 4c35.4-5 56.5 1 60.1 3 72.4 45 199 50 219.1 47 28.4-4 42.4 22 48.3 31 7.8 13 11.7 24 11.7 24s33.1 46 65 89"/>
<path d="m1098 1763s21-18 63 0c4 9 5 10 11 22-12-17-60-15-74-22" fill="#e7423f"/>
<path d="m632.3 1267c8.2 1 4.8 36 44.7 43 21.9 4 48.4 4 79.1-1 0 4-0.3 6-0.6 10-64.2 12-80.3 17-107.1 5-31.7-13-26.3-58-16.1-57" fill="#e7423f"/>
<path d="m950.7 7.107v1104h941.3v-1104l-941.3 0.107z" stroke="#000" stroke-width="14.21" fill="#0083c2"/>
<g stroke="#000" stroke-width="14.21" fill="none">
<path d="m1276 1111h-325.3v-402.1h325.3v402.1z"/>
<path d="m1892 410.5h-325v-403l325 0.059v403z"/>
<path d="m7.813 7.108 0.218 1104h1884v-1104z" stroke-linecap="square" stroke-miterlimit="10"/>
</g>
<path d="m1892 410.5h-325v-403l325 0.059v403zm-616 700.5h-325.3v-402.1h325.3v402.1zm0-1103v402.9h-323.8l-0.2 149.2h469v-552.1l-145 0.021zm616 701.3v-149.8h-471v551.9h146v-402.1h325z" stroke="#000" stroke-width="14.21" fill="#ffd303"/>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB