summaryrefslogtreecommitdiff
path: root/layouts/_partials/scripts
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-08-29 14:38:02 +0800
committerEltrac <hi@guhub.cn>2025-08-29 14:38:02 +0800
commit3c577e8ca28662e44297d0735b9b21b121a569b1 (patch)
tree9398b6c6e716dc9ce97676a44c87345db52df9b0 /layouts/_partials/scripts
parentd099099a3f7180457e86bb5d9bd54e04484a41a0 (diff)
feat: tweak littlefoot style
- use numerical footnotes - vertically align footnote buttons to the top - smaller popover
Diffstat (limited to 'layouts/_partials/scripts')
-rw-r--r--layouts/_partials/scripts/littlefoot-js.html12
1 files changed, 11 insertions, 1 deletions
diff --git a/layouts/_partials/scripts/littlefoot-js.html b/layouts/_partials/scripts/littlefoot-js.html
index 2601b7c4..69c9ce14 100644
--- a/layouts/_partials/scripts/littlefoot-js.html
+++ b/layouts/_partials/scripts/littlefoot-js.html
@@ -1,6 +1,16 @@
<script>
littlefoot.littlefoot({
dismissOnUnhover: true,
- activateOnHover: true
+ activateOnHover: true,
+ scope: '.markdown-body',
+ buttonTemplate: `
+ <button
+ aria-label="Footnote <% number %>"
+ class="littlefoot__button"
+ id="<% reference %>"
+ />
+ <% number %>
+ </button>
+ `
});
</script>