Add weeknote styles and integrate anchor.js for improved navigation

This commit is contained in:
Fundor333
2025-08-04 18:21:10 +02:00
parent 233b610f7e
commit bca3d31d20
8 changed files with 34 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
<h{{ .Level }} id="{{ .Anchor }}" class="no-underline ">
<a href="#{{ .Anchor }}">
{{ range seq (add .Level -1) }}<i class="fa-regular fa-hashtag"></i>{{ end }}
{{ range seq (add .Level -1) }}<i class="fa-whiteboard fa-semibold fa-angle-right"></i>{{ end }}
{{ .Text | safeHTML }}
</a>
</h{{ .Level }}>

View File

@@ -5,6 +5,8 @@
<link rel="stylesheet" href="/css/webmention.css" />
<script src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
<script src="https://kit.fontawesome.com/2f3b6e2e4c.js" crossorigin="anonymous"></script>
{{- $style := resources.Get "sass/add.scss" | resources.ExecuteAsTemplate "add.scss" . | toCSS (dict "targetPath" "add.css") | minify | fingerprint }}

View File

@@ -41,3 +41,25 @@
data-domains="fundor333.com,www.fundor333.com"
data-website-id="b8ad3dd1-2f32-4e1a-9e85-2d254aa59fb2">
</script>
<script>
anchors.options = {
placement: 'left',
icon: '❡'
};
anchors.add('.e-content > p',);
</script>
<script>
$(window).load(function(){
$.each($('u-photo'), function(){
// Set the height, hard-style!
$(this).attr('height', $(this).height());
});
});
</script>

View File

@@ -24,7 +24,7 @@
{{end}}
</header>
{{ partial "toc.html" .}}
<div class="page-content e-content">
<div class="page-content e-content weeknote">
{{- partial "bridgy.html" . -}}
{{ .Content }}
</div>