wcag.html 1.0 KB

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