cupper-hugo-theme/themes/infusion/layouts/shortcodes/tested.html

25 lines
883 B
HTML
Raw Normal View History

2017-07-08 13:21:43 +02:00
{{ $tested := replace (.Get "using") ", " "," }}
{{ $tested := replace $tested " + " "+" }}
{{ $tested := split $tested "," }}
<table class="tested">
<tr>
<th scope="row">Tested using</th>
{{ range $tested }}
<td>
{{ if in . "+" }}
{{ $parts := split . "+" }}
{{ $browser := index $parts 0 }}
{{ $additional := index $parts 1 }}
<img src="{{ $.Site.BaseURL }}images/browser-{{ replace $browser " " "-" }}.svg" alt="">
<span><strong>{{ $browser }}</strong></span>
<span class="additional">with <strong>{{ $additional }}</strong></span>
{{ else }}
{{ $browser := . }}
<img src="{{ $.Site.BaseURL }}images/browser-{{ replace $browser " " "-" }}.svg" alt="">
<span><strong>{{ $browser }}</strong></span>
{{ end }}
</td>
{{ end }}
</tr>
</table>