diff options
author | claw0ry <me@claw0ry.net> | 2024-12-11 13:56:52 +0100 |
---|---|---|
committer | claw0ry <me@claw0ry.net> | 2024-12-11 13:56:52 +0100 |
commit | 4719cc03837490ed4bf1b9725d75a686e56e5a6a (patch) | |
tree | 769dd3a3a87153df049b3043196bd131495b10ad /themes/plaintext |
fresh start
Diffstat (limited to 'themes/plaintext')
18 files changed, 278 insertions, 0 deletions
diff --git a/themes/plaintext/archetypes/default.md b/themes/plaintext/archetypes/default.md new file mode 100644 index 0000000..c6f3fce --- /dev/null +++ b/themes/plaintext/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ 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 © {{ now.Year }} - claw0ry.net / <a + href="mailto:webmaster@claw0ry.net"><webmaster@claw0ry.net></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}} diff --git a/themes/plaintext/static/android-chrome-192x192.png b/themes/plaintext/static/android-chrome-192x192.png Binary files differnew file mode 100644 index 0000000..f3b10f4 --- /dev/null +++ b/themes/plaintext/static/android-chrome-192x192.png diff --git a/themes/plaintext/static/android-chrome-512x512.png b/themes/plaintext/static/android-chrome-512x512.png Binary files differnew file mode 100644 index 0000000..2225036 --- /dev/null +++ b/themes/plaintext/static/android-chrome-512x512.png diff --git a/themes/plaintext/static/apple-touch-icon.png b/themes/plaintext/static/apple-touch-icon.png Binary files differnew file mode 100644 index 0000000..6d403d3 --- /dev/null +++ b/themes/plaintext/static/apple-touch-icon.png diff --git a/themes/plaintext/static/favicon-16x16.png b/themes/plaintext/static/favicon-16x16.png Binary files differnew file mode 100644 index 0000000..25de952 --- /dev/null +++ b/themes/plaintext/static/favicon-16x16.png diff --git a/themes/plaintext/static/favicon-32x32.png b/themes/plaintext/static/favicon-32x32.png Binary files differnew file mode 100644 index 0000000..933a4f2 --- /dev/null +++ b/themes/plaintext/static/favicon-32x32.png diff --git a/themes/plaintext/static/favicon.ico b/themes/plaintext/static/favicon.ico Binary files differnew file mode 100644 index 0000000..dfe2de7 --- /dev/null +++ b/themes/plaintext/static/favicon.ico diff --git a/themes/plaintext/static/style.css b/themes/plaintext/static/style.css new file mode 100644 index 0000000..e4bdb08 --- /dev/null +++ b/themes/plaintext/static/style.css @@ -0,0 +1,88 @@ +* { + box-sizing: border-box; +} + +body { + /* font-family: Verdana, Geneva, Tahoma, sans-serif; */ + font-family: courier, monospace; +} + +header { + max-width: 600px; + margin: 0 auto; +} + +hr { + border-style: dashed; + margin: 40px 0; +} + +pre { + background: #f5f5f5; + overflow-x: auto; + padding: 10px; + font-size: 14px; +} + +p>code, +li>code { + font-size: 14px; + font-weight: bold; +} + +table, +table tr th, +table tr td { + border-collapse: collapse; +} + +table tr th { + padding: .2rem .5rem; + background-color: #f5f5f5; + border: 1px solid black; +} + +table tr td { + padding: .2rem .5rem; + border: 1px solid black; +} + +.content { + max-width: 600px; + margin: 0 auto 40px auto; +} + +.post-title a { + color: inherit; + text-decoration: none; +} + + +.article--body { + line-height: 1.5; +} + +.pagination { + display: flex; + justify-content: center; + gap: 1rem; +} + +.pagination .page-item { + display: inline-block; +} + +@media (prefers-color-scheme: dark) { + body { + background: #212121; + color: white; + } + + a { + color: #69f; + } + + a:visited { + color: #96f; + } +} diff --git a/themes/plaintext/theme.toml b/themes/plaintext/theme.toml new file mode 100644 index 0000000..3ba3164 --- /dev/null +++ b/themes/plaintext/theme.toml @@ -0,0 +1,31 @@ +name = 'Theme name' +license = 'MIT' +licenselink = 'https://github.com/owner/repo/LICENSE' +description = 'Theme description' + +# The home page of the theme, where the source can be found +homepage = 'https://github.com/owner/repo' + +# If you have a running demo of the theme +demosite = 'https://owner.github.io/repo' + +# Taxonomy terms +tags = ['blog', 'company'] +features = ['some', 'awesome', 'features'] + +# If the theme has multiple authors +authors = [ + {name = 'Name of author', homepage = 'Website of author'}, + {name = 'Name of author', homepage = 'Website of author'} +] + +# If the theme has a single author +[author] + name = 'Your name' + homepage = 'Your website' + +# If porting an existing theme +[original] + author = 'Name of original author' + homepage = 'Website of original author' + repo = 'https://github.com/owner/repo' |