summaryrefslogtreecommitdiff
path: root/themes/plaintext/layouts
diff options
context:
space:
mode:
authorclaw0ry <me@claw0ry.net>2024-12-11 13:56:52 +0100
committerclaw0ry <me@claw0ry.net>2024-12-11 13:56:52 +0100
commit4719cc03837490ed4bf1b9725d75a686e56e5a6a (patch)
tree769dd3a3a87153df049b3043196bd131495b10ad /themes/plaintext/layouts
fresh start
Diffstat (limited to 'themes/plaintext/layouts')
-rw-r--r--themes/plaintext/layouts/_default/baseof.html36
-rw-r--r--themes/plaintext/layouts/_default/list.html8
-rw-r--r--themes/plaintext/layouts/_default/single.html10
-rw-r--r--themes/plaintext/layouts/index.html45
-rw-r--r--themes/plaintext/layouts/partials/footer.html2
-rw-r--r--themes/plaintext/layouts/partials/head.html9
-rw-r--r--themes/plaintext/layouts/partials/header.html9
-rw-r--r--themes/plaintext/layouts/posts/single.html33
-rw-r--r--themes/plaintext/layouts/shortcodes/rawhtml.html2
9 files changed, 154 insertions, 0 deletions
diff --git a/themes/plaintext/layouts/_default/baseof.html b/themes/plaintext/layouts/_default/baseof.html
new file mode 100644
index 0000000..2f38a78
--- /dev/null
+++ b/themes/plaintext/layouts/_default/baseof.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+
+{{ "<!--" | safeHTML }}
+
+ Hello, from the source code! :)
+
+ I'm sorry the source code is a little messy. Hugo does not indent correctly..
+
+ @claw0ry
+
+{{ "-->" | safeHTML }}
+
+<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}">
+
+<head>
+ {{ partial "head.html" . }}
+</head>
+
+<body>
+ <header>
+ {{ partial "header.html" . }}
+ </header>
+
+ <div class="content">
+ <main>
+ {{ block "main" . }}{{ end }}
+
+ </main>
+
+ <footer>
+ {{ partial "footer.html" . }}
+ </footer>
+ </div>
+</body>
+
+</html>
diff --git a/themes/plaintext/layouts/_default/list.html b/themes/plaintext/layouts/_default/list.html
new file mode 100644
index 0000000..50fc92d
--- /dev/null
+++ b/themes/plaintext/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/plaintext/layouts/_default/single.html b/themes/plaintext/layouts/_default/single.html
new file mode 100644
index 0000000..7e286c8
--- /dev/null
+++ b/themes/plaintext/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 }}
diff --git a/themes/plaintext/layouts/index.html b/themes/plaintext/layouts/index.html
new file mode 100644
index 0000000..da61394
--- /dev/null
+++ b/themes/plaintext/layouts/index.html
@@ -0,0 +1,45 @@
+{{ define "main" }}
+<h1>claw0ry.net</h1>
+
+<div class="intro">
+ <p>Hi, my name is Mads! *waves*</p>
+
+ <p>I'm a developer and Linux enthusiast from Norway. I mainly use this site as a personal reference, cause my brain
+ too smol. Maybe you'll find something interesting too.</p>
+
+ <ul>
+ <li>I grew up on the internet with Linux and open source in the early 2000s.</li>
+ <li>I believe the tech world has become to overengineered, abstracted and complicated.</li>
+ <li>I'm always searching for a deeper knowledge on how things work.</li>
+ </ul>
+
+ <p>
+ Bluesky: <a href="https://bsky.app/profile/claw0ry.net" rel="nofollow">claw0ry.net</a>
+ </p>
+</div>
+
+<hr />
+
+<section class="post-list">
+ {{ $pages := where site.RegularPages "Type" "posts" }}
+ {{ $paginator := .Paginate $pages.ByDate.Reverse 5 }}
+
+ {{ range $paginator.Pages }}
+ <article class="post-item">
+ <h2 class="post-title">
+ <a href="{{ .Permalink }}">* {{ .Title }}</a>
+ </h2>
+ <p class="post-byline">Posted: {{ .Date.Format "02-03-2006" }} | {{ .WordCount }} words</p>
+ <div class="post-body">{{ .Summary }}</div>
+ <p><a href="{{ .Permalink }}">Read more ยป</a></p>
+ </article>
+
+ <hr />
+
+ {{ end }}
+
+ {{ template "_internal/pagination.html" (dict "page" . "format" "terse") }}
+
+ <hr />
+</section> <!-- end .post-list -->
+{{ end }}
diff --git a/themes/plaintext/layouts/partials/footer.html b/themes/plaintext/layouts/partials/footer.html
new file mode 100644
index 0000000..ea1ae0b
--- /dev/null
+++ b/themes/plaintext/layouts/partials/footer.html
@@ -0,0 +1,2 @@
+<p>Copyright &copy; {{ now.Year }} - claw0ry.net / <a
+ href="mailto:webmaster@claw0ry.net">&lt;webmaster@claw0ry.net&gt;</a></p>
diff --git a/themes/plaintext/layouts/partials/head.html b/themes/plaintext/layouts/partials/head.html
new file mode 100644
index 0000000..1ba4902
--- /dev/null
+++ b/themes/plaintext/layouts/partials/head.html
@@ -0,0 +1,9 @@
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
+<link rel="stylesheet" href="/style.css">
+<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
+<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
+<link rel="alternate" type="application/rss+xml" href="{{.Site.BaseURL}}/index.xml" title="{{ .Site.Title }}">
+<link rel="me" href="https://bsky.app/profile/claw0ry.net">
+<link rel="me" href="https://github.com/moiaune">
diff --git a/themes/plaintext/layouts/partials/header.html b/themes/plaintext/layouts/partials/header.html
new file mode 100644
index 0000000..b96bd36
--- /dev/null
+++ b/themes/plaintext/layouts/partials/header.html
@@ -0,0 +1,9 @@
+<nav>
+ <p>
+ [<a href="/">blog</a>]
+ [<a href="http://github.com/moiaune">projects</a>]
+ [<a href="http://ipv4.claw0ry.net">ipv4</a>]
+ [<a href="http://ipv6.claw0ry.net">ipv6</a>]
+ [<a href="{{.Site.BaseURL}}index.xml">rss</a>]
+ </p>
+</nav>
diff --git a/themes/plaintext/layouts/posts/single.html b/themes/plaintext/layouts/posts/single.html
new file mode 100644
index 0000000..c4b5e80
--- /dev/null
+++ b/themes/plaintext/layouts/posts/single.html
@@ -0,0 +1,33 @@
+{{ define "main" }}
+
+<article class="article">
+ <h1 class="article--heading">* {{ .Title }}</h1>
+ <p class="article--metadata">
+ Posted: {{.Date.Format "02-03-2006"}} (<a
+ href="http://git.claw0ry.net/website/plain/content/posts/{{.File.LogicalName}}">raw</a> / <a
+ href="http://git.claw0ry.net/website/log/content/posts/{{.File.LogicalName}}">history</a>)
+
+ </p>
+
+ <hr />
+
+ {{ if .Params.toc }}
+ <div class="article--toc">
+ <h2>Table of Contents</h2>
+ {{ .TableOfContents }}
+ </div>
+
+ <hr />
+ {{ end }}
+
+ <div class="article--body">{{ .Content }}</div>
+</article>
+
+<hr />
+
+{{ with .GitInfo }}
+<p class="last-modified"><i>This page was last modified {{ .CommitDate.Format "15:04:05 02-01-2006"}}</i></p>
+{{ end }}
+
+
+{{ end }}
diff --git a/themes/plaintext/layouts/shortcodes/rawhtml.html b/themes/plaintext/layouts/shortcodes/rawhtml.html
new file mode 100644
index 0000000..b90bea2
--- /dev/null
+++ b/themes/plaintext/layouts/shortcodes/rawhtml.html
@@ -0,0 +1,2 @@
+<!-- raw html -->
+{{.Inner}}