Einheiten Reihenfolge wie in den JSON-Daten angegeben

This commit is contained in:
2026-06-01 20:06:12 +02:00
parent ec56a231e9
commit aff5b2cf12
17 changed files with 697 additions and 154 deletions

View File

@@ -82,11 +82,12 @@
@change="navigateWithValue(
$event.target.value)"
class="select mt-1 block w-full">
{{ range $unit, $unitData := $availableUnits }}
{{ if ne $unit $.Params.to }}
{{ range $catData.unitOrder }}
{{ $unitData := index $availableUnits . }}
{{ if and $unitData (ne . $.Params.to) }}
<option
value="/{{ $unit }}-in-{{ $.Params.to }}/"
{{ if eq $unit
value="/{{ . }}-in-{{ $.Params.to }}/"
{{ if eq .
$.Params.from }}selected{{ end }}>
{{ $unitData.name }}
</option>
@@ -127,11 +128,12 @@
@change="navigateWithValue(
$event.target.value)"
class="select mt-1 block w-full">
{{ range $unit, $unitData := $availableUnits }}
{{ if ne $unit $.Params.from }}
{{ range $catData.unitOrder }}
{{ $unitData := index $availableUnits . }}
{{ if and $unitData (ne . $.Params.from) }}
<option
value="/{{ $.Params.from }}-in-{{ $unit }}/"
{{ if eq $unit
value="/{{ $.Params.from }}-in-{{ . }}/"
{{ if eq .
$.Params.to }}selected{{ end }}>
{{ $unitData.name }}
</option>