aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorericmarin <maarin.eric@gmail.com>2026-04-20 14:06:38 +0200
committerericmarin <maarin.eric@gmail.com>2026-04-21 12:24:41 +0200
commitd29af7ee395555e628ee0f3def31c748394cc93b (patch)
tree001c5420dfcc1262d2a5be3980d12e9eb9994933 /layouts
parent061585b540bae3c29a6c5b96c4616401cc7d5ed9 (diff)
downloadwww.ericmarin.dev-d29af7ee395555e628ee0f3def31c748394cc93b.tar.gz
www.ericmarin.dev-d29af7ee395555e628ee0f3def31c748394cc93b.zip
hugo!
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_partials/footer.html1
-rw-r--r--layouts/_partials/head.html5
-rw-r--r--layouts/_partials/header.html3
-rw-r--r--layouts/baseof.html19
-rw-r--r--layouts/home.html6
-rw-r--r--layouts/til/page.html9
-rw-r--r--layouts/til/section.html13
7 files changed, 56 insertions, 0 deletions
diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html
new file mode 100644
index 0000000..ea78525
--- /dev/null
+++ b/layouts/_partials/footer.html
@@ -0,0 +1 @@
+<p>© {{ now.Format "2006" }} Eric Marin - <a href="https://git.ericmarin.dev/www.ericmarin.dev.git/">Source (AGPLv3)</a></p>
diff --git a/layouts/_partials/head.html b/layouts/_partials/head.html
new file mode 100644
index 0000000..5c09651
--- /dev/null
+++ b/layouts/_partials/head.html
@@ -0,0 +1,5 @@
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}{{ end }}">
+<title>{{ .Title }}</title>
+<link rel="stylesheet" href="/css/style.css">
diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html
new file mode 100644
index 0000000..28d4b0a
--- /dev/null
+++ b/layouts/_partials/header.html
@@ -0,0 +1,3 @@
+<nav>
+ <a href="/">Home</a> | <a href="/til/">TIL</a> | <a href="https://git.ericmarin.dev/">Git</a>
+</nav>
diff --git a/layouts/baseof.html b/layouts/baseof.html
new file mode 100644
index 0000000..48c3d32
--- /dev/null
+++ b/layouts/baseof.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="{{ site.Language.Locale }}" dir="{{ or site.Language.Direction `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/layouts/home.html b/layouts/home.html
new file mode 100644
index 0000000..46dc417
--- /dev/null
+++ b/layouts/home.html
@@ -0,0 +1,6 @@
+{{ define "main" }}
+ <h1>{{ .Title }}</h1>
+ <section>
+ {{ .Content }}
+ </section>
+{{ end }}
diff --git a/layouts/til/page.html b/layouts/til/page.html
new file mode 100644
index 0000000..baf1fbd
--- /dev/null
+++ b/layouts/til/page.html
@@ -0,0 +1,9 @@
+{{ define "main" }}
+ <article>
+ <h1>{{ .Title }}</h1>
+ <aside>Published on: {{ .Date.Format "02 Jan 2006" }}</aside>
+ <section>
+ {{ .Content }}
+ </section>
+ </article>
+{{ end }}
diff --git a/layouts/til/section.html b/layouts/til/section.html
new file mode 100644
index 0000000..bd8c690
--- /dev/null
+++ b/layouts/til/section.html
@@ -0,0 +1,13 @@
+{{ define "main" }}
+ <section>
+ <h1>{{ .Title }}</h1>
+ {{ .Content }}
+ <ul>
+ {{ range .Pages }}
+ <li>
+ <span>{{ .Date.Format "2006-01-02" }}</span> - <a href="{{ .Permalink }}">{{ .Title }}</a>
+ </li>
+ {{ end }}
+ </ul>
+ </section>
+{{ end }}