about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--layouts/404.html4
-rw-r--r--layouts/_default/baseof.html29
-rw-r--r--layouts/_default/list.html2
-rw-r--r--layouts/_default/single.html4
-rw-r--r--layouts/_default/terms.html4
5 files changed, 36 insertions, 7 deletions
diff --git a/layouts/404.html b/layouts/404.html
index c2e4e40..24a9633 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,5 +1,5 @@
-{{ partial "header.html" . }}
+{{ define "main" }}
 
 404 NOT FOUND
 
-{{ partial "footer.html" . }}
+{{- end }}
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..100293c
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.LanguageCode }}">
+  <head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <title>{{ .Title }} | {{ .Site.Title }}</title>
+    <link rel="stylesheet" href="{{ "/css/style.css" | relURL }}" />
+  </head>
+
+  <body>
+    <nav>
+      <ul class="menu">
+        {{ range .Site.Menus.main }}
+        <li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
+        {{ end }}
+      </ul>
+      <hr/>
+    </nav>
+
+    {{ block "main" . }}{{ end }}
+
+    <footer>
+      {{ with .Site.Params.footer }}
+      <hr/>
+      {{ . | markdownify }}
+      {{ end }}
+    </footer>
+  </body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 7ccfef6..bf0af50 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,4 +1,4 @@
-{{ partial "header.html" . }}
+{{ define "main" }}
 
 {{if not .IsHome }}
 <h1>{{ .Title | markdownify }}</h1>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 0372f1d..bde04ef 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,4 +1,4 @@
-{{ partial "header.html" . }}
+{{ define "main" }}
 <div class="article-meta">
 <h1><span class="title">{{ .Title | markdownify }}</span></h1>
 {{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
@@ -9,4 +9,4 @@
 {{ .Content }}
 </main>
 
-{{ partial "footer.html" . }}
+{{- end }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 71f47e7..15de7a9 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -1,4 +1,4 @@
-{{ partial "header.html" . }}
+{{ define "main" }}
 
 <h1>{{ .Title }}</h1>
 
@@ -10,4 +10,4 @@
   {{ end }}
 </ul>
 
-{{ partial "footer.html" . }}
+{{- end }}