refactor taxonomy layout and improve table styling
This commit is contained in:
@ -1,7 +1,36 @@
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ range .Pages }}
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
{{ end }}
|
||||
<section id="tools-list">
|
||||
<h2>Tools</h2>
|
||||
<table id="taxonomy-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tool</th>
|
||||
<th>Developers</th>
|
||||
<th>License</th>
|
||||
<th>Purposes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range .Pages }}
|
||||
<tr>
|
||||
<td><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></td>
|
||||
<td>
|
||||
{{ $sep := "" }}
|
||||
{{ range $key, $vals := .Params }}
|
||||
{{ if (in (slice "tags" "categories" "series") $key) }}
|
||||
{{ $sep }}
|
||||
<strong>{{ $key | title }}:</strong>
|
||||
{{ range $i, $val := $vals }}
|
||||
{{ if $i }}, {{ end }}{{ $val }}
|
||||
{{ end }}
|
||||
{{ $sep = "; " }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user