From 645574822d2ce24b58342cb653d56435aefe6af0 Mon Sep 17 00:00:00 2001 From: Christian Gick Date: Thu, 9 Apr 2026 07:39:10 +0300 Subject: [PATCH] add sortable country table to global overview (EN/DE/FR) Sorted by country name by default. Clickable headers to sort by law, age, status, or year. All 20 countries from countries.json. Co-Authored-By: Claude Opus 4.6 (1M context) --- ...chutzgesetze-2026-weltweiter-ueberblick.md | 2 + ...ld-protection-laws-2026-global-overview.md | 2 + ...rotection-enfance-2026-panorama-mondial.md | 2 + layouts/shortcodes/country-table.html | 116 ++++++++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 layouts/shortcodes/country-table.html diff --git a/content/de/kinderschutzgesetze-2026-weltweiter-ueberblick.md b/content/de/kinderschutzgesetze-2026-weltweiter-ueberblick.md index 3a3fd83..e128360 100644 --- a/content/de/kinderschutzgesetze-2026-weltweiter-ueberblick.md +++ b/content/de/kinderschutzgesetze-2026-weltweiter-ueberblick.md @@ -15,6 +15,8 @@ Hier erfahren Sie, was Sie über die wichtigsten Kinderschutzgesetze wissen müs {{< stats-banner >}} +{{< country-table >}} + {{< world-map >}} diff --git a/content/en/child-protection-laws-2026-global-overview.md b/content/en/child-protection-laws-2026-global-overview.md index 5dadf95..23ed6ed 100644 --- a/content/en/child-protection-laws-2026-global-overview.md +++ b/content/en/child-protection-laws-2026-global-overview.md @@ -15,6 +15,8 @@ Here is what you need to know about the most important child protection laws tak {{< stats-banner >}} +{{< country-table >}} + {{< world-map >}} diff --git a/content/fr/lois-protection-enfance-2026-panorama-mondial.md b/content/fr/lois-protection-enfance-2026-panorama-mondial.md index fc07209..0191598 100644 --- a/content/fr/lois-protection-enfance-2026-panorama-mondial.md +++ b/content/fr/lois-protection-enfance-2026-panorama-mondial.md @@ -15,6 +15,8 @@ Voici ce que vous devez savoir sur les lois de protection de l'enfance les plus {{< stats-banner >}} +{{< country-table >}} + {{< world-map >}} diff --git a/layouts/shortcodes/country-table.html b/layouts/shortcodes/country-table.html new file mode 100644 index 0000000..1b88266 --- /dev/null +++ b/layouts/shortcodes/country-table.html @@ -0,0 +1,116 @@ +{{ $lang := .Page.Language.Lang }} +{{ $countries := hugo.Data.countries }} + + + +
+

{{ if eq $lang "de" }}Kinderschutzgesetze nach Land{{ else if eq $lang "fr" }}Lois de protection par pays{{ else }}Child Protection Laws by Country{{ end }}

+ + + + + + + + + + + + {{ range $countries }} + {{ $loc := index . $lang | default .en }} + + + + + + + + {{ end }} + +
{{ if eq $lang "de" }}Land{{ else if eq $lang "fr" }}Pays{{ else }}Country{{ end }}{{ if eq $lang "de" }}Gesetz{{ else if eq $lang "fr" }}Loi{{ else }}Law{{ end }}{{ if eq $lang "de" }}Mindestalter{{ else if eq $lang "fr" }}Âge min.{{ else }}Min. Age{{ end }}{{ if eq $lang "de" }}Status{{ else if eq $lang "fr" }}Statut{{ else }}Status{{ end }}{{ if eq $lang "de" }}Jahr{{ else if eq $lang "fr" }}Année{{ else }}Year{{ end }}
{{ .flag }} {{ $loc.name }}{{ $loc.law }}{{ .ageLimitSocial }}+ + {{ $color := "#667eea" }} + {{ if eq .status "enforced" }}{{ $color = "#764ba2" }} + {{ else if eq .status "passed" }}{{ $color = "#4a5ec7" }} + {{ else if eq .status "progress" }}{{ $color = "#8b9cf0" }} + {{ else if eq .status "guidelines" }}{{ $color = "#c5cefd" }}{{ end }} + + {{ if eq $lang "de" }}{{ if eq .status "enforced" }}In Kraft{{ else if eq .status "passed" }}Verabschiedet{{ else if eq .status "progress" }}In Bearbeitung{{ else }}Richtlinien{{ end }} + {{ else if eq $lang "fr" }}{{ if eq .status "enforced" }}En vigueur{{ else if eq .status "passed" }}Adopté{{ else if eq .status "progress" }}En cours{{ else }}Directives{{ end }} + {{ else }}{{ if eq .status "enforced" }}Enforced{{ else if eq .status "passed" }}Passed{{ else if eq .status "progress" }}In Progress{{ else }}Guidelines{{ end }} + {{ end }} + + {{ .year }}
+
+ +