aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
authorJan Raasch <jan@janraasch.com>2020-08-31 15:40:11 +0200
committerJan Raasch <jan@janraasch.com>2020-09-03 20:22:23 +0200
commit58805381571574f39ff3ddeaf98f64d708486ca7 (patch)
treec0c73917c2f507a505e993a3fd368f5ad4fd046a /layouts/_default
downloadhugo-bearcub-58805381571574f39ff3ddeaf98f64d708486ca7.tar.gz
hugo-bearcub-58805381571574f39ff3ddeaf98f64d708486ca7.tar.bz2
chore: initial commit
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/baseof.html43
-rw-r--r--layouts/_default/list.html57
-rw-r--r--layouts/_default/single.html20
3 files changed, 120 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..ae6f718
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
+
+<head>
+ <meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0" />
+ {{- partial "favicon.html" . -}}
+ <title>{{- block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{- end }}</title>
+
+ {{- partial "seo_tags.html" . -}}
+ <meta name="referrer" content="no-referrer-when-downgrade" />
+
+ {{ with .OutputFormats.Get "rss" -}}
+ {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+ {{ end -}}
+
+ {{- partial "style.html" . -}}
+
+ <!-- A partial to be overwritten by the user.
+ Simply place a custom_head.html into
+ your local /layouts/partials-directory -->
+ {{- partial "custom_head.html" . -}}
+</head>
+
+<body>
+ <header>
+ {{- partial "header.html" . -}}
+ </header>
+ <main>
+ {{- block "main" . }}{{- end }}
+ </main>
+ <footer>
+ {{- partial "footer.html" . -}}
+ </footer>
+
+ <!-- A partial to be overwritten by the user.
+ Simply place a custom_body.html into
+ your local /layouts/partials-directory -->
+ {{- partial "custom_body.html" . -}}
+</body>
+
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..bd3c972
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,57 @@
+{{ define "main" }}
+<style>
+ ul {
+ list-style-type: none;
+ padding: unset;
+ }
+
+ li {
+ display: flex;
+ }
+
+ li span {
+ flex: 0 0 130px;
+ }
+
+ li a:visited {
+ color: #6532dc;
+ }
+
+</style>
+<content>
+ {{ if .Data.Singular }}
+ <h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3>
+ <small>
+ <a href="{{ "/blog" | relURL }}">Remove filter</a>
+ </small>
+ {{ end }}
+ <ul>
+ {{ range .Pages }}
+ <li>
+ <span>
+ <i>
+ <time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
+ {{ .Date.Format "02 Jan, 2006" }}
+ </time>
+ </i>
+ </span>
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ </li>
+ {{ else }}
+ <li>
+ No posts yet
+ </li>
+ {{ end }}
+ </ul>
+ {{ if .Data.Singular }}
+ {{else}}
+ <small>
+ <div>
+ {{ range .Site.Taxonomies.tags }}
+ <a href="{{ .Page.Permalink }}">#{{ .Page.Title }}</a>&nbsp;
+ {{ end }}
+ </div>
+ </small>
+ {{ end }}
+</content>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..f993a0c
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,20 @@
+{{ define "main" }}
+{{ if eq .Type "blog" }}{{ if not .Params.menu }}
+<h1>{{ .Title }}</h1>
+<p>
+ <i>
+ <time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
+ {{ .Date.Format "02 Jan, 2006" }}
+ </time>
+ </i>
+</p>
+{{ end }}{{ end }}
+<content>
+ {{ .Content }}
+</content>
+<p>
+ {{ range (.GetTerms "tags") }}
+ <a href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
+ {{ end }}
+</p>
+{{ end }}