Update layout for 'page' type
This commit is contained in:
parent
03cc689b01
commit
7cfe9ff9f1
|
@ -1,7 +1,6 @@
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
{{ partial "nav.html" . }}
|
{{ partial "nav.html" . }}
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
<i>{{ .Date.Format "January 2, 2006" }}</i>
|
{{ partial "date.html" . }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
{{ partial "modified.html" . }}
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Data.Pages }}
|
{{ range .Data.Pages }}
|
||||||
{{ if eq .Type "page" }}
|
{{ 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 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
6
layouts/page/single.html
Normal file
6
layouts/page/single.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
{{ partial "nav.html" . }}
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ .Content }}
|
||||||
|
{{ partial "date.html" . }}
|
||||||
|
{{ partial "footer.html" . }}
|
8
layouts/partials/date.html
Normal file
8
layouts/partials/date.html
Normal 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}}
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
<br>
|
|
||||||
<i>Page last updated at {{ .Lastmod.Format "Jan 2, 2006 15:04" }}</i>
|
|
Loading…
Reference in New Issue
Block a user