summaryrefslogtreecommitdiff
path: root/themes/trek/layouts/_default
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-05-19 15:33:26 +0200
committermms <michal@sapka.me>2024-05-19 15:33:26 +0200
commitf4bb92435d069f84ce41d4ecae51641872de2270 (patch)
treee830735f772bd789473884dafbeabc8cad63dc8f /themes/trek/layouts/_default
parente25abc08a5d3e7b94b638d837d26acbc0b79f14b (diff)
feat: themes
Diffstat (limited to 'themes/trek/layouts/_default')
-rw-r--r--themes/trek/layouts/_default/baseof.html17
-rw-r--r--themes/trek/layouts/_default/home.html7
-rw-r--r--themes/trek/layouts/_default/list.html8
-rw-r--r--themes/trek/layouts/_default/single.html10
4 files changed, 42 insertions, 0 deletions
diff --git a/themes/trek/layouts/_default/baseof.html b/themes/trek/layouts/_default/baseof.html
new file mode 100644
index 0000000..ce9613a
--- /dev/null
+++ b/themes/trek/layouts/_default/baseof.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
+<head>
+ {{ partial "head.html" . }}
+</head>
+<body>
+ <header>
+ {{ partial "header.html" . }}
+ </header>
+ <main>
+ {{ block "main" . }}{{ end }}
+ </main>
+ <footer>
+ {{ partial "footer.html" . }}
+ </footer>
+</body>
+</html>
diff --git a/themes/trek/layouts/_default/home.html b/themes/trek/layouts/_default/home.html
new file mode 100644
index 0000000..0df6597
--- /dev/null
+++ b/themes/trek/layouts/_default/home.html
@@ -0,0 +1,7 @@
+{{ define "main" }}
+ {{ .Content }}
+ {{ range site.RegularPages }}
+ <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
+ {{ .Summary }}
+ {{ end }}
+{{ end }}
diff --git a/themes/trek/layouts/_default/list.html b/themes/trek/layouts/_default/list.html
new file mode 100644
index 0000000..50fc92d
--- /dev/null
+++ b/themes/trek/layouts/_default/list.html
@@ -0,0 +1,8 @@
+{{ define "main" }}
+ <h1>{{ .Title }}</h1>
+ {{ .Content }}
+ {{ range .Pages }}
+ <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
+ {{ .Summary }}
+ {{ end }}
+{{ end }}
diff --git a/themes/trek/layouts/_default/single.html b/themes/trek/layouts/_default/single.html
new file mode 100644
index 0000000..7e286c8
--- /dev/null
+++ b/themes/trek/layouts/_default/single.html
@@ -0,0 +1,10 @@
+{{ define "main" }}
+ <h1>{{ .Title }}</h1>
+
+ {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
+ {{ $dateHuman := .Date | time.Format ":date_long" }}
+ <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
+
+ {{ .Content }}
+ {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
+{{ end }}