Skip to content

Commit

Permalink
Reorder metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
clementbiron committed Dec 6, 2024
1 parent 9872099 commit f08e0c0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions themes/opentermsarchive/layouts/collections/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,6 @@ <h1>{{ .Title }}</h1>
{{ 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) }}
Expand All @@ -93,6 +85,14 @@ <h1>{{ .Title }}</h1>
{{ $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 . }}
Expand Down

0 comments on commit f08e0c0

Please sign in to comment.