thrrgilag.net/themes/blackburn/layouts/shortcodes/pure_table.html
2018-11-24 13:02:48 -08:00

20 lines
No EOL
392 B
HTML

{{ $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>