fix: fix toc css bug

This commit is contained in:
Dillon
2019-08-24 23:41:57 +08:00
parent 280ec376f4
commit 4f2ff40ef9
6 changed files with 36 additions and 33 deletions

View File

@@ -24,6 +24,6 @@
{{ partial "footer.html" . -}}
{{ partial "scripts.html" . -}}
</div>
<a href="#" class="dynamic-to-top" id="dynamic-to-top"><span>&nbsp;</span></a>
<a href="#" class="dynamic-to-top" id="dynamic-to-top" data-scroll><span>&nbsp;</span></a>
</body>
</html>

View File

@@ -110,6 +110,7 @@
{{ $res := resources.Get "js/lib/smooth-scroll/smooth-scroll.polyfills.min.js" | resources.Minify }}
{{ $smooth_scroll = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
{{ end }}
{{ $smooth_scroll = delimit (slice $smooth_scroll "<script>window.scroll = new SmoothScroll('[data-scroll]', {speed: 300, speedAsDuration: true});</script>") "" }}
{{ $jquery | safeHTML }}
{{ $lazysizes | safeHTML }}

View File

@@ -78,7 +78,13 @@
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<(h[23456]) (id=".+?")>` }}
{{ $REout = `<a class="post-title-target" $2></a><$1>` }}
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<(sup class="footnote-ref") (id="fnref:.+?")>` }}
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<(li) (id="fn:.+?")>` }}
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $content | safeHTML }}
</div>