diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/shortcodes/pure_table.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/layouts/shortcodes/pure_table.html b/layouts/shortcodes/pure_table.html new file mode 100644 index 0000000..91236bc --- /dev/null +++ b/layouts/shortcodes/pure_table.html @@ -0,0 +1,20 @@ +{{ $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>
\ No newline at end of file |