From 4562d084410bc4b2c64b21530dd71ef35999d3b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Sun, 8 Jul 2018 19:14:13 +0200 Subject: Content div into templates --- layouts/_default/baseof.html | 2 -- layouts/_default/single.html | 21 +++++++++++++-------- layouts/index.html | 14 ++++++++------ 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f38999e..c4963da 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,9 +3,7 @@ {{- partial "head.html" . -}} {{- partial "header.html" . -}} -
{{- block "main" . }}{{- end }} -
{{- partial "footer.html" . -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 9343abd..6c10095 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,13 +1,18 @@ {{ define "main" }} -
-
-

- {{ .Title }}

+
+
+
+

+ {{ .Title }}

-
{{ .Date.Format "Mon, Jan 2, 2006" }}
-
-
- {{ .Content }} +
{{ .Date.Format "Mon, Jan 2, 2006" }}
+
+ + +
+
+ {{ .Content }} +
{{ end }} diff --git a/layouts/index.html b/layouts/index.html index 17c1d26..b4eaea0 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,11 +1,13 @@ {{ define "main" }} +
-

{{.Title}}

+

{{.Title}}

-

Posts

- +

Posts

+ - {{ range where .Data.Pages "Section" "post" }} - {{ .Render "summary" }} - {{ end }} + {{ range where .Data.Pages "Section" "post" }} + {{ .Render "summary" }} + {{ end }} +
{{ end }} -- cgit v1.2.3