thrrgilag.net/themes/blackburn/layouts/shortcodes/pure_table.html

20 lines
392 B
HTML
Raw Normal View History

2018-11-24 21:02:48 +00:00
{{ $fields := (index .Params 0) }}
{{ $data := after 1 .Params }}
<table class="pure-table pure-table-striped">
<thead><tr>
{{ range split $fields "|"}}
<th>{{ . }}</th>
{{ end }}
</thead></tr>
<tbody>
{{ range $data}}
<tr>
{{ $items := split . "|" }}
{{ range $items }}
<td>{{ . }}</td>
{{ end }}
</tr>
{{ end }}
</tbody>
</table>