wires

summary refs log tree commit diff
path: root/layouts/_default
diff options
context:
space:
mode:
authorwires <wires@noreply.wires.systems>2025-03-06 23:30:44 -0500
committerwires <wires@noreply.wires.systems>2025-03-06 23:30:44 -0500
commit2b4ca1a88e4df33269e0bd80b4b23ef40d276858 (patch)
treea8095a18864992d6aec712a02fce1db034b23362 /layouts/_default
parentinitial commit (diff)
downloadblog-2b4ca1a88e4df33269e0bd80b4b23ef40d276858.tar.gz
first draft of theme
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/_markup/render-codeblock.html1
-rw-r--r--layouts/_default/baseof.html29
-rw-r--r--layouts/_default/list.html10
-rw-r--r--layouts/_default/single.html16
4 files changed, 56 insertions, 0 deletions
diff --git a/layouts/_default/_markup/render-codeblock.html b/layouts/_default/_markup/render-codeblock.html
new file mode 100644
index 0000000..9bfc3b1
--- /dev/null
+++ b/layouts/_default/_markup/render-codeblock.html
@@ -0,0 +1 @@
+<pre class="chroma"><code class="language-{{ .Type }}" data-lang="{{ .Type }}">{{ (transform.HighlightCodeBlock .).Inner }}</code></pre>
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..ecac3b1
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.Language.LanguageCode }}">
+    <head>
+    {{ partial "head.html" . }}
+    <!-- this is here to make sure that if we can't load CSS the icons don't totally fuck up layout -->
+    <style>.icon svg { width: 1.25em; height: 1.25em; }</style>
+{{ range .AlternativeOutputFormats -}}
+{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+{{ end -}}
+</head>
+<body>
+<a href="#main" class="skip">Skip to content</a>
+<nav id="main-nav">
+<ul>
+<li><a href="{{.Site.BaseURL}}" id="site-title">{{.Site.Title}}</a></li>
+{{ with .Site.Menus.main }}
+        {{ range . }}
+        <li><a href="{{ .URL }}">{{ .Name }}</a></li>
+        {{ end }}
+{{ end }}
+</ul>
+</nav>
+
+<main id="main">
+{{ block "main" . }}{{ end }}
+</main>
+{{ partial "footer.html" . }}
+</body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..ea76a24
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,10 @@
+{{ define "main" }}
+<h2>{{ .Title }}</h2>
+<ul>
+{{ range .Pages }}
+<li>
+<a href="{{ .Permalink }}">{{ .Title }}</a>
+</li>
+{{ end }}
+</ul>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..60d1b41
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,16 @@
+{{ define "main" }}
+<header>
+    <h1>{{ .Title }}</h1>
+    <time datetime="{{ .Lastmod }}">{{ .Lastmod.Format "January 2, 2006" }}</time>
+</header>
+    {{ if .Params.toc }}
+    <aside id="toc">
+        <a class="skip" href="#post">Skip table of contents</a>
+        <h2 id="toc-title">Contents</h2>
+        {{ .TableOfContents }}
+    </aside>
+    <a id="post"></a>
+    {{ end }}
+    {{ .Content }}
+    {{ partial "tags.html" . }}
+{{ end }}