Update layout for 'page' type

This commit is contained in:
Christoffer Müller Madsen 2017-08-05 03:04:07 +02:00
parent 03cc689b01
commit 7cfe9ff9f1
5 changed files with 16 additions and 5 deletions

View File

@ -1,7 +1,6 @@
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
<h1>{{ .Title }}</h1>
<i>{{ .Date.Format "January 2, 2006" }}</i>
{{ partial "date.html" . }}
{{ .Content }}
{{ partial "modified.html" . }}
{{ partial "footer.html" . }}

View File

@ -18,7 +18,7 @@
<ul>
{{ range .Data.Pages }}
{{ if eq .Type "page" }}
<li><a href="{{ .Permalink }}">{{ .Title }} ({{ .Date.Format "Jan 2, 2006" }})</a></li>
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>

6
layouts/page/single.html Normal file
View File

@ -0,0 +1,6 @@
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ partial "date.html" . }}
{{ partial "footer.html" . }}

View File

@ -0,0 +1,8 @@
<i>
{{ if ne .Lastmod .Date}}Originally created {{end}}
{{ .Date.Format "January 2, 2006" }}
</i>
{{ if ne .Lastmod .Date}}
<br><i>Updated {{ .Lastmod.Format "January 2, 2006" }}</i>
{{end}}

View File

@ -1,2 +0,0 @@
<br>
<i>Page last updated at {{ .Lastmod.Format "Jan 2, 2006 15:04" }}</i>