From f08e0c081b1991d54c752f78feaa11130c9236e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Biron?= Date: Fri, 6 Dec 2024 11:08:06 +0100 Subject: [PATCH] Reorder metadata --- .../layouts/collections/single.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/themes/opentermsarchive/layouts/collections/single.html b/themes/opentermsarchive/layouts/collections/single.html index 50ffd163..6338c318 100644 --- a/themes/opentermsarchive/layouts/collections/single.html +++ b/themes/opentermsarchive/layouts/collections/single.html @@ -77,14 +77,6 @@

{{ .Title }}

{{ end }} {{ with .Params.tracking }} {{ $currentTracking := index (last 1 .) 0 }} - {{ with $currentTracking.serverLocation }} - {{ $location := split . "," }} - {{ $city := trim (index $location 0) " " }} - {{ $countryCode := trim (index $location 1) " " }} - {{ $countryName := index site.Data.display_names.regions site.Language.LanguageCode $countryCode }} - {{ $fullLocation := printf "%s, %s" $city $countryName }} - {{ partial "collection-metadata-item.html" (dict "title" (i18n "collections.metadata.server_location") "icon" "map-pin" "desc" $fullLocation) }} - {{ end }} {{ with $currentTracking.startDate }} {{ $formatedDate := ( . | time.Format ":date_long") }} {{ partial "collection-metadata-item.html" (dict "title" (i18n "collections.metadata.start_date") "icon" "power" "desc" $formatedDate) }} @@ -93,6 +85,14 @@

{{ .Title }}

{{ $formatedDate := ( . | time.Format ":date_long") }} {{ partial "collection-metadata-item.html" (dict "title" (i18n "collections.metadata.end_date") "icon" "power-off" "desc" $formatedDate) }} {{ end }} + {{ with $currentTracking.serverLocation }} + {{ $location := split . "," }} + {{ $city := trim (index $location 0) " " }} + {{ $countryCode := trim (index $location 1) " " }} + {{ $countryName := index site.Data.display_names.regions site.Language.LanguageCode $countryCode }} + {{ $fullLocation := printf "%s, %s" $city $countryName }} + {{ partial "collection-metadata-item.html" (dict "title" (i18n "collections.metadata.server_location") "icon" "map-pin" "desc" $fullLocation) }} + {{ end }} {{ with $currentTracking.schedule }} {{ $cronKey := printf "collections.metadata.cron.%s" . }} {{ $cronExpression := i18n $cronKey . }}