wcag.html 931 B

123456789101112131415161718192021222324252627
  1. {{ $JSON := $.Site.Data.wcag }}
  2. {{ $included := split (.Get "include") ", " }}
  3. {{ $descriptions := .Get "descriptions" }}
  4. <ul class="wcag {{ if $descriptions }}with-desc{{ end }}">
  5. {{ range $JSON }}
  6. {{ if in $included .ref_id }}
  7. <li>
  8. <strong><a href="{{ .url }}">
  9. <svg class="wcag-icon" height="67.763" width="127.1" viewBox="0 0 127.09899 67.763" aria-hidden="true"><use xlink:href="#w3c"></use></svg>
  10. {{ .ref_id }} {{ .title }}</a> (level {{ .level }}){{ if $descriptions }}:{{ end }}
  11. </strong>
  12. {{ if $descriptions }}
  13. {{ .description }}
  14. {{ if .special_cases }}
  15. <ul>
  16. {{ range .special_cases }}
  17. <li><strong>{{ .title }}:</strong>
  18. {{ .description }}
  19. </li>
  20. {{ end }}
  21. </ul>
  22. {{ end }}
  23. {{ end }}
  24. </li>
  25. {{ end }}
  26. {{ end }}
  27. </ul>