Welcome to mirror list, hosted at ThFree Co, Russian Federation.

wcag.html « shortcodes « layouts - github.com/zwbetz-gh/cupper-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 574af64a933d6c61024862312034990182649055 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{{ $JSON := $.Site.Data.wcag }}
{{ $included := replace (.Get "include") ", " "," }}
{{ $included := split $included "," }}
{{ $descriptions := .Get "descriptions" }}
<ul class="wcag {{ if and ($descriptions) (ne $descriptions "false") }}with-desc{{ end }}">
  {{ range $JSON }}
    {{ if in $included .ref_id }}
      <li>
        <strong><a href="{{ .url }}">
          <svg class="wcag-icon" viewBox="0 0 127.09899 67.763" aria-hidden="true" focusable="false">
            <use xlink:href="#w3c"></use>
          </svg>
          {{ .ref_id }} {{ .title }}</a> (level {{ .level }}){{ if $descriptions }}:{{ end }}
        </strong>
        {{ if and ($descriptions) (ne $descriptions "false") }}
          {{ .description }}
          {{ if .special_cases }}
            <ul>
              {{ range .special_cases }}
                <li><strong>{{ .title }}:</strong>
                  {{ .description }}
                </li>
              {{ end }}
            </ul>
          {{ end }}
        {{ end }}
      </li>
    {{ end }}
  {{ end }}
</ul>