From 7cfe9ff9f15254dceb7f949c8496b87628325670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Sat, 5 Aug 2017 03:04:07 +0200 Subject: [PATCH] Update layout for 'page' type --- layouts/_default/single.html | 3 +-- layouts/index.html | 2 +- layouts/page/single.html | 6 ++++++ layouts/partials/date.html | 8 ++++++++ layouts/partials/modified.html | 2 -- 5 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 layouts/page/single.html create mode 100644 layouts/partials/date.html delete mode 100644 layouts/partials/modified.html 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" }}