From 498a724195695c837eb31d612df0d0365a9a6e1b Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Mon, 8 Jul 2019 07:05:23 +0200 Subject: [PATCH] layout: add default and partials * NEW Adds a section template. * NEW Adds a single page template. * NEW Fills in the header and footer templates. * BETTER Improves the global html head template. Co-Authored-by: Igor Milhit --- layouts/_default/section.html | 16 +++++++++++++ layouts/_default/single.html | 44 +++++++++++++++++++++++++++++++++++ layouts/partials/footer.html | 6 +++++ layouts/partials/head.html | 2 +- layouts/partials/header.html | 4 ++++ 5 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 layouts/_default/section.html diff --git a/layouts/_default/section.html b/layouts/_default/section.html new file mode 100644 index 0000000..6824feb --- /dev/null +++ b/layouts/_default/section.html @@ -0,0 +1,16 @@ +{{ define "main" }} +
+ {{ .Content }} + + {{/* {{ partial "pagination.html" . }} */}} +
+{{ end }} + diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e69de29..ddcb178 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -0,0 +1,44 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+

{{ .Date.Format "2006-01-02" }}

+
+
+ {{ .Content }} +
+
+ +{{/* + + +*/}} +{{ end }} + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index e69de29..c80889c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -0,0 +1,6 @@ + diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 0dd5838..795b51f 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -2,7 +2,7 @@ - {{ .Title }} + {{ .Title }} | {{ .Site.Title }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index e69de29..40bdece 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -0,0 +1,4 @@ +
+ {{ .Site.Title }} + Blog +