aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÓscar Nájera <hello@oscarnajera.com>2018-07-08 19:14:13 +0200
committerÓscar Nájera <hello@oscarnajera.com>2018-07-08 19:14:13 +0200
commit4562d084410bc4b2c64b21530dd71ef35999d3b4 (patch)
treec87d2091aadda46ee7137c7caea5200c6808d120
parentb1cae597431053664bbc895a732c1a0d75c574bd (diff)
downloadhugo-minimalist-theme-4562d084410bc4b2c64b21530dd71ef35999d3b4.tar.gz
hugo-minimalist-theme-4562d084410bc4b2c64b21530dd71ef35999d3b4.tar.bz2
hugo-minimalist-theme-4562d084410bc4b2c64b21530dd71ef35999d3b4.zip
Content div into templates
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/_default/single.html21
-rw-r--r--layouts/index.html14
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" . -}}
<body>
{{- partial "header.html" . -}}
- <div id="content" class="mw7 center">
{{- block "main" . }}{{- end }}
- </div>
{{- partial "footer.html" . -}}
</body>
</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" }}
-<article class="ph2">
- <header class="bg-green pa5">
- <h1 class="f1 black-90">
- {{ .Title }}</h1>
+<article>
+ <div class="w-100 bg-green">
+ <header class="dt pa5 mw7 center">
+ <h1 class="f1 tc black-90">
+ {{ .Title }}</h1>
- <div class="gray tracked">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
- </header>
- <div class="f5 lh-copy pv4 ph2 black-80">
- {{ .Content }}
+ <div class="gray tracked">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
+ </header>
+ </div>
+
+ <div id="content" class="mw7 center">
+ <div class="f5 lh-copy pv4 ph2 black-80">
+ {{ .Content }}
+ </div>
</div>
</article>
{{ 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" }}
+<div id="content" class="mw7 center">
-<h1 class="f1">{{.Title}}</h1>
+ <h1 class="f1">{{.Title}}</h1>
-<h2 class="f2">Posts</h2>
-<!-- Note that .Data.Pages is the equivalent of .Site.Pages on the homepage template. -->
+ <h2 class="f2">Posts</h2>
+ <!-- Note that .Data.Pages is the equivalent of .Site.Pages on the homepage template. -->
- {{ range where .Data.Pages "Section" "post" }}
- {{ .Render "summary" }}
- {{ end }}
+ {{ range where .Data.Pages "Section" "post" }}
+ {{ .Render "summary" }}
+ {{ end }}
+</div>
{{ end }}