hugo-xmin/layouts/_default/list.html

35 lines
765 B
HTML
Raw Normal View History

{{ partial "header.html" . }}
{{if not .IsHome }}
<h1>{{ .Title }}</h1>
{{ end }}
{{ .Content }}
<table class="sortable">
<tr>
<td>ID</td>
<td>名称</td>
<td>序列</td>
<td>创建日期</td>
<td>最后修改日期</td>
</tr>
{{ range (where .Data.Pages "Section" "!=" "") }}
<tr>
<td>{{ .Params.code }}</td>
<td><a href="{{ .URL }}">{{ .Title }}</a></td>
<td>
{{ if fileExists (printf "content/post/%s.json" .File) }}
<a href="{{ printf "post/%s.json" .File }}">{{ printf "%s.json" .File }}</a>
{{ else }}
暂无
{{ end }}
</td>
<td>{{ .Date.Format "2006/01/02" }}</td>
<td>{{ .Lastmod.Format "2006/01/02" }}</td>
</tr>
{{ end }}
</table>
{{ partial "footer.html" . }}