Erstes Commit
This commit is contained in:
18
hugo/layouts/partials/available-units.html
Normal file
18
hugo/layouts/partials/available-units.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{{ $category := .category }}
|
||||
{{ $units := .units }}
|
||||
{{ if eq $category "waehrungen" }}
|
||||
{{ $pb := partial "available-currencies.html" . }}
|
||||
{{ if $pb.ok }}
|
||||
{{ $filtered := dict }}
|
||||
{{ range $slug, $data := $units }}
|
||||
{{ $slugLower := lower $slug }}
|
||||
{{ if or (eq $slugLower "eur") (in $pb.currencies $slugLower) }}
|
||||
{{ $filtered = merge $filtered (dict $slug $data) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $units = $filtered }}
|
||||
{{ else }}
|
||||
{{ $units = dict }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ return $units }}
|
||||
Reference in New Issue
Block a user