summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html33
-rw-r--r--layouts/_default/list.html17
-rw-r--r--layouts/_default/single.html6
-rw-r--r--layouts/index.html17
4 files changed, 73 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..c665429
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>{{- block "title" . }}{{ .Site.Title }}
+ {{- if .Title }} - {{ .Title }}{{ end }}
+ {{- end }}</title>
+ {{- with .OutputFormats.Get "rss" }}
+ <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ site.Title }}">
+ {{- end }}
+ </head>
+ <body>
+ {{- block "header" . }}
+ {{- if .Title }}
+ <header>
+ <h1>{{ .Title }}</h1>
+ {{- if .PublishDate }}
+ <p><small>{{ .PublishDate | time.Format ":date_medium" }}</small></p>
+ {{- end }}
+ </header>
+ {{- end }}
+ {{- end }}
+
+ {{- block "main" . }}
+ {{- .Content }}
+ {{- end }}
+
+ {{- with .Parent }}
+ <nav>
+ <p>Go back to <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>.</p>
+ </nav>
+ {{- end }}
+ </body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..f8f44d1
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,17 @@
+{{- define "main" }}
+<main>
+ {{- .Content }}
+ {{- if .Pages }}
+ <ul>
+ {{ range .Pages }}
+ <li>
+ {{- if .LinkTitle }}
+ <p><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>.</p>
+ {{- end }}
+ {{ .Summary }}
+ </li>
+ {{ end }}
+ </ul>
+ {{- end }}
+</main>
+{{- end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..c023229
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,6 @@
+{{- define "main" }}
+{{/*
+ Yes, this is identical to baseof.html's definition. This template is still needed, in order for Hugo to actually generate single pages.
+*/}}
+{{- .Content }}
+{{- end }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..f9f48e1
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,17 @@
+{{- define "main" }}
+<main>
+ {{- if .Pages }}
+ <ul>
+ {{ range .Pages }}
+ <li>
+ {{- if .LinkTitle }}
+ <p><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>.</p>
+ {{- end }}
+ {{ .Summary }}
+ </li>
+ {{ end }}
+ </ul>
+ {{- end }}
+ {{- .Content }}
+</main>
+{{- end }}