wcag.html 946 B

12345678910111213141516171819202122232425262728
  1. {{ $JSON := $.Site.Data.wcag }}
  2. {{ $included := replace (.Get "include") ", " "," }}
  3. {{ $included := split $included "," }}
  4. {{ $descriptions := .Get "descriptions" }}
  5. <ul class="wcag {{ if $descriptions }}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"><use xlink:href="#w3c"></use></svg>
  11. {{ .ref_id }} {{ .title }}</a> (level {{ .level }}){{ if $descriptions }}:{{ end }}
  12. </strong>
  13. {{ if $descriptions }}
  14. {{ .description }}
  15. {{ if .special_cases }}
  16. <ul>
  17. {{ range .special_cases }}
  18. <li><strong>{{ .title }}:</strong>
  19. {{ .description }}
  20. </li>
  21. {{ end }}
  22. </ul>
  23. {{ end }}
  24. {{ end }}
  25. </li>
  26. {{ end }}
  27. {{ end }}
  28. </ul>