summaryrefslogtreecommitdiff
path: root/themes/orca/layouts
diff options
context:
space:
mode:
authorfrosty <passedgoandgot200@disroot.org>2025-08-22 08:54:40 -0400
committerfrosty <passedgoandgot200@disroot.org>2025-08-22 08:54:40 -0400
commitd0deda9b496f582374f71bf25dd97b8410387a21 (patch)
tree881986978be30b30635e543218c1cecbc74ac21f /themes/orca/layouts
downloadwww-d0deda9b496f582374f71bf25dd97b8410387a21.tar.gz
www-d0deda9b496f582374f71bf25dd97b8410387a21.zip
initial commit
Diffstat (limited to 'themes/orca/layouts')
-rw-r--r--themes/orca/layouts/_default/_markup/render-heading.html6
-rw-r--r--themes/orca/layouts/_default/baseof.html19
-rw-r--r--themes/orca/layouts/_default/blog.html8
-rw-r--r--themes/orca/layouts/_default/home.html3
-rw-r--r--themes/orca/layouts/_default/music.html7
-rw-r--r--themes/orca/layouts/_default/single.html7
-rw-r--r--themes/orca/layouts/_shortcodes/all-posts.html4
-rw-r--r--themes/orca/layouts/_shortcodes/latest-posts.html5
-rw-r--r--themes/orca/layouts/partials/header.html14
-rw-r--r--themes/orca/layouts/partials/post-item.html11
10 files changed, 84 insertions, 0 deletions
diff --git a/themes/orca/layouts/_default/_markup/render-heading.html b/themes/orca/layouts/_default/_markup/render-heading.html
new file mode 100644
index 0000000..d8a820e
--- /dev/null
+++ b/themes/orca/layouts/_default/_markup/render-heading.html
@@ -0,0 +1,6 @@
+<h{{ .Level }} {{ if le .Level 3 }} id="{{ .Anchor | safeURL }}" {{ end }}>
+{{ .Text | safeHTML }}
+{{ if le .Level 3 }}
+ <a href="#{{ .Anchor | safeURL }}">#</a>
+{{ end }}
+</h{{ .Level }}>
diff --git a/themes/orca/layouts/_default/baseof.html b/themes/orca/layouts/_default/baseof.html
new file mode 100644
index 0000000..034b6a1
--- /dev/null
+++ b/themes/orca/layouts/_default/baseof.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.Language }}">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>{{ if not .IsHome }}{{ .Title | title }} - {{ end }}{{ .Site.Title }}</title>
+ {{ $stylesheet := resources.Get "style.css" | minify | fingerprint }}
+ <link rel="stylesheet" type="text/css" href="{{ $stylesheet.Permalink }}">
+ <link rel="icon" href="/favicon.ico">
+</head>
+<body>
+ {{ partial "header.html" . }}
+ <main>
+{{ block "main" . }}
+ {{ .Content }}
+{{ end }}
+ </main>
+</body>
+</html>
diff --git a/themes/orca/layouts/_default/blog.html b/themes/orca/layouts/_default/blog.html
new file mode 100644
index 0000000..0f73423
--- /dev/null
+++ b/themes/orca/layouts/_default/blog.html
@@ -0,0 +1,8 @@
+{{ define "main" }}
+<h1>{{ .Title }}</h1>
+ {{ .TableOfContents }}
+ {{ .Content }}
+ {{ with .Lastmod }}
+<p>Last modified {{ .Format "January 2nd, 2006" }}.</p>
+ {{ end }}
+{{ end }}
diff --git a/themes/orca/layouts/_default/home.html b/themes/orca/layouts/_default/home.html
new file mode 100644
index 0000000..e0e8308
--- /dev/null
+++ b/themes/orca/layouts/_default/home.html
@@ -0,0 +1,3 @@
+{{ define "main" }}
+ {{ .Content }}
+{{ end }}
diff --git a/themes/orca/layouts/_default/music.html b/themes/orca/layouts/_default/music.html
new file mode 100644
index 0000000..a59ecb7
--- /dev/null
+++ b/themes/orca/layouts/_default/music.html
@@ -0,0 +1,7 @@
+{{ define "main" }}
+<h1>{{ .Title }}</h1>
+ {{ .Content }}
+ {{ with .Lastmod }}
+<p>Last modified {{ .Format "January 2nd, 2006" }}.</p>
+ {{ end }}
+{{ end }}
diff --git a/themes/orca/layouts/_default/single.html b/themes/orca/layouts/_default/single.html
new file mode 100644
index 0000000..a59ecb7
--- /dev/null
+++ b/themes/orca/layouts/_default/single.html
@@ -0,0 +1,7 @@
+{{ define "main" }}
+<h1>{{ .Title }}</h1>
+ {{ .Content }}
+ {{ with .Lastmod }}
+<p>Last modified {{ .Format "January 2nd, 2006" }}.</p>
+ {{ end }}
+{{ end }}
diff --git a/themes/orca/layouts/_shortcodes/all-posts.html b/themes/orca/layouts/_shortcodes/all-posts.html
new file mode 100644
index 0000000..dab993a
--- /dev/null
+++ b/themes/orca/layouts/_shortcodes/all-posts.html
@@ -0,0 +1,4 @@
+{{ $pages := where site.RegularPages "Type" "eq" (.Get "type") }}
+{{ range $pages }}
+ {{ partial "post-item" . }}
+{{ end }}
diff --git a/themes/orca/layouts/_shortcodes/latest-posts.html b/themes/orca/layouts/_shortcodes/latest-posts.html
new file mode 100644
index 0000000..44ff9d4
--- /dev/null
+++ b/themes/orca/layouts/_shortcodes/latest-posts.html
@@ -0,0 +1,5 @@
+{{ $limit := .Get "limit" }}
+{{ $pages := first $limit (where site.RegularPages "Type" "in" site.Params.mainSections) }}
+{{ range $pages }}
+ {{ partial "post-item" . }}
+{{ end }}
diff --git a/themes/orca/layouts/partials/header.html b/themes/orca/layouts/partials/header.html
new file mode 100644
index 0000000..77d2a39
--- /dev/null
+++ b/themes/orca/layouts/partials/header.html
@@ -0,0 +1,14 @@
+<header>
+ <div class="title">
+ <img src="/icon.png"/>
+ <h2><a href="/">{{ .Site.Title }}</a></h2>
+ </div>
+ <nav>
+{{ range site.Menus.main }}
+ <span>[<a href="{{ .URL }}">{{ .Name }}</a>]</span>
+{{ end }}
+{{ range site.Menus.right_main }}
+ <span class="right">[<a href="{{ .URL }}">{{ .Name }}</a>]</span>
+{{ end }}
+ </nav>
+</header>
diff --git a/themes/orca/layouts/partials/post-item.html b/themes/orca/layouts/partials/post-item.html
new file mode 100644
index 0000000..183dd28
--- /dev/null
+++ b/themes/orca/layouts/partials/post-item.html
@@ -0,0 +1,11 @@
+<div class="post">
+ <small class="right"><a href="/{{ .Type }}/">{{ .Type }}</a></small>
+ <b><a href="{{ .Permalink }}">{{ .Title }}</a></b>
+ <br>
+ <i>{{ .Date.Format "January 2nd, 2006" }}</i>
+ <br>
+ <br>
+ <span>
+ {{ range $i, $t := .Params.tags }}{{ if $i }}, {{ end }}<a href="">{{ $t }}</a>{{ end }}
+ </span>
+</div>