tested.html 974 B

12345678910111213141516171819202122232425262728
  1. {{ $tested := replace (.Get "using") ", " "," }}
  2. {{ $tested := replace $tested " + " "+" }}
  3. {{ $tested := split $tested "," }}
  4. <table class="tested">
  5. <tr>
  6. <th scope="row">
  7. <svg viewBox="0 0 177.16535 177.16535" focusable="false" aria-hidden="true">
  8. <use href="#tick"></use>
  9. </svg>
  10. Tested using
  11. </th>
  12. {{ range $tested }}
  13. <td>
  14. {{ $browser := findRE "^[a-zA-Z ]+" . }}
  15. {{ $browser := index $browser 0 }}
  16. {{ $version := findRE "[0-9]+$" . }}
  17. {{ $slug := replace $browser " " "-" | lower }}
  18. <img src="{{ (printf "images/browser-%s" $slug) | relURL }}.svg" alt="">
  19. <span><strong>{{ $browser }} {{ index $version 0 }}</strong></span>
  20. {{ if in . "+" }}
  21. {{ $parts := split . "+" }}
  22. {{ $additional := index $parts 1 }}
  23. <span class="additional">with <strong>{{ $additional }}</strong></span>
  24. {{ end }}
  25. </td>
  26. {{ end }}
  27. </tr>
  28. </table>