Notes: all-left, wider, lighter, numbered cards, connector polyline

This commit is contained in:
2026-11-15 10:33:27 +08:00
parent 210483763a
commit 9b56433db6
3 changed files with 140 additions and 66 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
{{- /*
边注 / 注释。
宽屏:显示在正文两侧的空白处(由 static/js/notes.js 定位)。
宽屏:显示在正文左侧的空白处,并用一条折线与原文所在行相连(由 static/js/notes.js 定位)。
窄屏:以虚线框内嵌在文章中。
用法:{{< note >}}注释内容{{< /note >}}
*/ -}}
{{- $n := add (.Page.Store.Get "noteCount" | default 0) 1 -}}
{{- .Page.Store.Set "noteCount" $n -}}
<sup class="post-note-mark">{{ $n }}</sup><span class="post-note" data-note="{{ $n }}">{{- .Inner | .Page.RenderString (dict "display" "inline") -}}</span>
<sup class="post-note-mark">{{ $n }}</sup><span class="post-note"><span class="post-note-num">{{ $n }}</span>{{- .Inner | .Page.RenderString (dict "display" "inline") -}}</span>