|
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 | | - {{ $object := replace .Path (printf "/%s/" .Page.Type) "" }} |
10 | | - {{ partial "flag" $object }} |
| 5 | + |
| 6 | + <div class="o-list__countries"> |
| 7 | + <div> |
| 8 | + <h2>{{ T "countries.overview" }}</h2> |
| 9 | + <div class="o-list__list"> |
| 10 | + {{ range .Pages }} |
| 11 | + <a href="{{ .RelPermalink }}" class="o-list__link"> |
| 12 | + <div class="o-list__picture"> |
| 13 | + {{ $object := replace .Path (printf "/%s/" .Page.Type) "" }} |
| 14 | + {{ partial "flag" $object }} |
| 15 | + </div> |
| 16 | + <div> |
| 17 | + {{ .Title }} |
| 18 | + </div> |
| 19 | + </a> |
| 20 | + {{ end }} |
11 | 21 | </div> |
12 | | - <div> |
13 | | - {{ .Title }} |
| 22 | + </div> |
| 23 | + <div class="o-interactive-map"> |
| 24 | + <h2>{{ T "interactiveMap.title" }}</h2> |
| 25 | + <div id="interactive-map__container" class="o-interactive-map__container"> |
| 26 | + <p class="o-interactive-map--loading"><em>{{ T "interactiveMap.loading" }}</em></p> |
14 | 27 | </div> |
15 | | - </a> |
16 | | - {{ end }} |
| 28 | + </div> |
17 | 29 | </div> |
18 | 30 | </article> |
| 31 | + |
| 32 | + |
| 33 | + <script> |
| 34 | + window.availableCountries = [ |
| 35 | + {{- range .Pages -}} |
| 36 | + "{{ .File.ContentBaseName }}"{{ if not (eq . (index (last 1 $.Pages) 0)) }},{{ end }} |
| 37 | + {{- end -}} |
| 38 | + ]; |
| 39 | + |
| 40 | + window.currentLanguage = "{{ .Language.Lang }}"; |
| 41 | + |
| 42 | + fetch('/map_europe.svg') |
| 43 | + .then(response => response.text()) |
| 44 | + .then(svgContent => { |
| 45 | + document.getElementById('interactive-map__container').innerHTML = svgContent; |
| 46 | + |
| 47 | + window.initializeInteractiveMap(); |
| 48 | + }) |
| 49 | + .catch(error => { |
| 50 | + console.error('Error loading SVG:', error); |
| 51 | + }); |
| 52 | + </script> |
19 | 53 | {{ end }} |
0 commit comments