diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 97be7e6..03f2ce2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,7 +1,6 @@ {{ partial "header.html" . }} {{ partial "nav.html" . }}

{{ .Title }}

-{{ .Date.Format "January 2, 2006" }} +{{ partial "date.html" . }} {{ .Content }} -{{ partial "modified.html" . }} {{ partial "footer.html" . }} diff --git a/layouts/index.html b/layouts/index.html index 162a3dd..8d59183 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -18,7 +18,7 @@ diff --git a/layouts/page/single.html b/layouts/page/single.html new file mode 100644 index 0000000..7a4bc2b --- /dev/null +++ b/layouts/page/single.html @@ -0,0 +1,6 @@ +{{ partial "header.html" . }} +{{ partial "nav.html" . }} +

{{ .Title }}

+{{ .Content }} +{{ partial "date.html" . }} +{{ partial "footer.html" . }} diff --git a/layouts/partials/date.html b/layouts/partials/date.html new file mode 100644 index 0000000..f39ef37 --- /dev/null +++ b/layouts/partials/date.html @@ -0,0 +1,8 @@ + + {{ if ne .Lastmod .Date}}Originally created {{end}} + {{ .Date.Format "January 2, 2006" }} + +{{ if ne .Lastmod .Date}} +
Updated {{ .Lastmod.Format "January 2, 2006" }} +{{end}} + diff --git a/layouts/partials/modified.html b/layouts/partials/modified.html deleted file mode 100644 index 3626ff7..0000000 --- a/layouts/partials/modified.html +++ /dev/null @@ -1,2 +0,0 @@ -
-Page last updated at {{ .Lastmod.Format "Jan 2, 2006 15:04" }}