{{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }}
{{- $tags := slice -}}
{{ range $pages }}
  {{- if .Params.tags -}}
    {{- $tags = $tags | append .Params.tags -}}
  {{ end }}
{{ end }}
{{- $tags := $tags | uniq -}}
{{ partial "orga/generator/partials/expand" (dict "id" "tags" "name" "opentag" "translation" "aufklappen" ) }}
<div style="flex-direction: column;" class="visibleIf" data-visibleif-rule="opentag == 'true'">
  <fieldset style="display: flex; flex-direction: column; max-width: 58.5rem;" id="tags" name="tags">
    {{ range sort $tags }}
      {{ $n := . | i18n }}
      {{ if not $n }}
        {{ $n = . }}
      {{ end }}
        <div style="display: flex; flex-direction: row;">
          <input type="checkbox" name="tags" id="{{ . }}-tag" value="{{ . }}"><label style="width: 20rem;" for="{{ . }}-tag">{{ strings.FirstUpper $n }}</label>
        </div>
    {{ end }}
  </fieldset>

  <label style="width: 12vw;" for="newtag">{{ i18n "new" }}</label>
  <input style="max-width: 58.5rem;" type="text" class="f" name="newtag" id="newtag" placeholder="" />
</div>