aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes
diff options
context:
space:
mode:
authorfrosty <passedgoandgot200@disroot.org>2025-06-16 23:29:31 -0400
committerfrosty <passedgoandgot200@disroot.org>2025-06-16 23:29:31 -0400
commit862a61c145ad083521f3941c56fd6e914d051a95 (patch)
tree1b41dc3e850c08eb63d07c7dde577e0f56f53215 /themes
parentb9b380447b5722b58e21fda0ffaee2fd87e20635 (diff)
add stuff that rocks, enable table of contents, add og tags, and more
Diffstat (limited to 'themes')
-rw-r--r--themes/polaris/assets/css/style.css2
-rw-r--r--themes/polaris/layouts/_default/baseof.html27
-rw-r--r--themes/polaris/layouts/_default/single.html3
-rw-r--r--themes/polaris/layouts/_markup/render-heading.html4
4 files changed, 27 insertions, 9 deletions
diff --git a/themes/polaris/assets/css/style.css b/themes/polaris/assets/css/style.css
index 1ca72e4..230e5b8 100644
--- a/themes/polaris/assets/css/style.css
+++ b/themes/polaris/assets/css/style.css
@@ -84,7 +84,7 @@ a:hover {
font-style: italic;
}
-nav ul {
+.nav-over ul {
list-style-type: none;
margin: 0;
padding-left: 0;
diff --git a/themes/polaris/layouts/_default/baseof.html b/themes/polaris/layouts/_default/baseof.html
index 1b34f99..37a6059 100644
--- a/themes/polaris/layouts/_default/baseof.html
+++ b/themes/polaris/layouts/_default/baseof.html
@@ -1,17 +1,28 @@
+{{ $pageTitle := "" }}
+{{ if not .IsHome }}
+ {{ $pageTitle = printf "%s - %s" .Title .Site.Title }}
+{{ else }}
+ {{ $pageTitle = .Site.Title }}
+{{ end }}
+
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
- <title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
+ <title>{{ $pageTitle }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="icon" href="/img/pfp.png">
- {{ $notoSerif := resources.Get "css/noto-serif.css" | minify | fingerprint }}
- <link rel="stylesheet" href="{{ $notoSerif.Permalink }}">
- {{ $style := resources.Get "css/style.css" | minify | fingerprint }}
- <link rel="stylesheet" href="{{ $style.Permalink }}">
- {{ with .OutputFormats.Get "rss" }}
- {{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
+ <link rel="icon" href="{{ .Site.Params.iconURL }}">
+ {{ with resources.Get "css/noto-serif.css" | minify | fingerprint }}
+ <link rel="stylesheet" href="{{ .Permalink }}">
{{ end }}
+ {{ with resources.Get "css/style.css" | minify | fingerprint }}
+ <link rel="stylesheet" href="{{ .Permalink }}">
+ {{ end }}
+ <meta property="og:title" content="{{ $pageTitle }}">
+ <meta property="og:url" content="{{ .Page.RelPermalink }}">
+ <meta property="og:image" content="{{ .Site.Params.iconURL }}">
+ <meta property="og:site_name" content="{{ .Site.Title }}">
+ <meta property="og:description" content="{{ .Site.Params.subtext }}">
</head>
<body>
<nav>
diff --git a/themes/polaris/layouts/_default/single.html b/themes/polaris/layouts/_default/single.html
index 21b247d..56b9d9d 100644
--- a/themes/polaris/layouts/_default/single.html
+++ b/themes/polaris/layouts/_default/single.html
@@ -7,5 +7,8 @@
</p>
{{ end }}
{{ end }}
+ {{ if or (eq .Section "posts") (.Params.toc) }}
+ {{ with .TableOfContents }}{{ . }}{{ end }}
+ {{ end }}
{{ .Content }}
{{ end }}
diff --git a/themes/polaris/layouts/_markup/render-heading.html b/themes/polaris/layouts/_markup/render-heading.html
new file mode 100644
index 0000000..c4d156c
--- /dev/null
+++ b/themes/polaris/layouts/_markup/render-heading.html
@@ -0,0 +1,4 @@
+<h{{ .Level }} id="{{ .Anchor }}" {{ with .Attributes.class }} class="{{ . }}" {{ end }}>
+ {{ .Text }}
+{{ if and (ge .Level 2) (le .Level 3) }}<a href="#{{ .Anchor }}">#</a>{{ end }}
+</h{{ .Level }}>