|
2 | 2 | <article class="o-list o-list__container"> |
3 | 3 | <h1 data-pagefind-meta="title">{{ .Title }}</h1> |
4 | 4 | {{ .Content }} |
5 | | - <div class="o-list__list"> |
6 | | - {{ range .Pages }} |
7 | | - <a href="{{ .RelPermalink }}" class="o-list__link"> |
8 | | - <div class="o-list__picture"> |
9 | | - {{ partial "flag" (dict "country" .File.ContentBaseName) }} |
| 5 | + <div class="o-list__countries"> |
| 6 | + <div> |
| 7 | + <h2>{{ T "countries.overview" }}</h2> |
| 8 | + <div class="o-list__list"> |
| 9 | + {{ range .Pages }} |
| 10 | + <a href="{{ .RelPermalink }}" class="o-list__link"> |
| 11 | + <div class="o-list__picture"> |
| 12 | + {{ partial "flag" (dict "country" .File.ContentBaseName) }} |
| 13 | + </div> |
| 14 | + <div> |
| 15 | + {{ .Title }} |
| 16 | + </div> |
| 17 | + </a> |
| 18 | + {{ end }} |
10 | 19 | </div> |
11 | | - <div> |
12 | | - {{ .Title }} |
| 20 | + </div> |
| 21 | + <div class="o-interactive-map"> |
| 22 | + <h2>{{ T "interactiveMap.title" }}</h2> |
| 23 | + <div class="o-interactive-map__wrapper"> |
| 24 | + <div id="interactive-map__container" class="o-interactive-map__container"> |
| 25 | + <p class="o-interactive-map--loading"><em>{{ T "interactiveMap.loading" }}</em></p> |
| 26 | + </div> |
| 27 | + <div class="o-interactive-map__controls"> |
| 28 | + <button class="o-interactive-map__zoom-in" title="{{ T "interactiveMap.zoomIn" }}" aria-label="{{ T "interactiveMap.zoomIn" }}"> |
| 29 | + {{ partial "icon" "add" }} |
| 30 | + </button> |
| 31 | + <button class="o-interactive-map__zoom-out" title="{{ T "interactiveMap.zoomOut" }}" aria-label="{{ T "interactiveMap.zoomOut" }}"> |
| 32 | + {{ partial "icon" "remove" }} |
| 33 | + </button> |
| 34 | + <button class="o-interactive-map__reset" title="{{ T "interactiveMap.resetZoom" }}" aria-label="{{ T "interactiveMap.resetZoom" }}"> |
| 35 | + {{ partial "icon" "crop_free" }} |
| 36 | + </button> |
| 37 | + </div> |
13 | 38 | </div> |
14 | | - </a> |
15 | | - {{ end }} |
| 39 | + </div> |
16 | 40 | </div> |
17 | 41 | </article> |
| 42 | + |
| 43 | + |
| 44 | + <script> |
| 45 | + window.availableCountries = [ |
| 46 | + {{- range .Pages -}} |
| 47 | + "{{ .File.ContentBaseName }}"{{ if not (eq . (index (last 1 $.Pages) 0)) }},{{ end }} |
| 48 | + {{- end -}} |
| 49 | + ]; |
| 50 | + |
| 51 | + window.currentLanguage = "{{ .Language.Lang }}"; |
| 52 | + |
| 53 | + fetch('/map_europe.svg') |
| 54 | + .then(response => response.text()) |
| 55 | + .then(svgContent => { |
| 56 | + document.getElementById('interactive-map__container').innerHTML = svgContent; |
| 57 | + |
| 58 | + window.initializeInteractiveMap(); |
| 59 | + }) |
| 60 | + .catch(error => { |
| 61 | + console.error('Error loading SVG:', error); |
| 62 | + }); |
| 63 | + </script> |
18 | 64 | {{ end }} |
0 commit comments