aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
authorJJ <nicetry@noemail.com>2025-03-19 14:56:26 +0000
committerJJ <nicetry@noemail.com>2025-03-19 14:56:26 +0000
commit16f52b7bef745097f7076dde76715db378b54343 (patch)
treecfcacda8adced2059dcc120d2bc2446d3c4f960a /layouts/_default
first commit
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/baseof.html38
-rw-r--r--layouts/_default/list.html44
-rw-r--r--layouts/_default/single.html17
3 files changed, 99 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..56818d7
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,38 @@
+<!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" />
+ {{- 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" />
+ <link rel="stylesheet" href="/style.css" />
+ <link
+ href="https://unpkg.com/prismjs@1.20.0/themes/prism-okaidia.css"
+ rel="stylesheet"
+ />
+ {{ with .OutputFormats.Get "rss" -}} {{ printf `
+ <link rel="%s" type="%s" href="%s" title="%s" />
+ ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} {{-
+ partial "custom_head.html" . -}}
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
+ <link
+ href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap"
+ rel="stylesheet"
+ />
+ <script src="/index.js" defer></script>
+ </head>
+
+ <body>
+ <header>{{- partial "header.html" . -}}</header>
+ <main>{{- block "main" . }}{{- end }}</main>
+ <footer>{{- partial "footer.html" . -}}</footer>
+ </body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..49da071
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,44 @@
+{{ define "main" }}
+<content>
+ {{ if .Data.Singular }}
+ <h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3>
+ <small>
+ <a href="{{ "blog" | relURL }}">Remove filter</a>
+ </small>
+ {{ end }}
+ <ul class="blog-posts">
+ {{ range .Pages }}
+ <li>
+ <span>
+ <i>
+ <time datetime='{{ .Date.Format "2006-01-02" }}'>
+ {{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }}
+ </time>
+ </i>
+ </span>
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ </li>
+ {{ else }}
+ <li>
+ No posts yet
+ </li>
+ {{ end }}
+ </ul>
+ <small>
+ <div>
+ {{ $currentSection := .Section }}
+ {{ range $tag, $taxonomy := .Site.Taxonomies.tags }}
+ {{ $count:= 0 }}
+ {{ range $taxonomy.Pages }}
+ {{ if eq .Section $currentSection }}
+ {{ $count = add $count 1 }}
+ {{ end }}
+ {{ end }}
+ {{ if gt $count 0 }}
+ <a href="{{ $taxonomy.Page.Permalink }}">#{{ $taxonomy.Page.Title }}</a>&nbsp;
+ {{ end }}
+ {{ end }}
+ </div>
+ </small>
+</content>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..5d0d520
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,17 @@
+{{ define "main" }} {{ if eq .Type "blog" }}{{ if not .Params.menu }}
+<h1>{{ .Title }}</h1>
+<p>
+ <i>
+ <time datetime='{{ .Date.Format "2006-01-02" }}'>
+ {{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }}
+ </time>
+ </i>
+</p>
+{{ end }}{{ end }}
+<content> {{ .Content }} </content>
+<p>
+ {{ range (.GetTerms "tags") }}
+ <a href="{{ .Permalink }}">#{{ lower .LinkTitle }}</a>
+ {{ end }}
+</p>
+{{ end }}