mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 01:51:54 +02:00
Merge pull request #1254 from SmileGuide/patch-4
🐛 Anchors Not Functioning Correctly for CJK Headings
This commit is contained in:
commit
a3583482b5
1 changed files with 4 additions and 2 deletions
|
@ -1,10 +1,12 @@
|
|||
{{ $strAnchor := urlize .Anchor }}
|
||||
{{ $replacedAnchor := replaceRE "%25" "" $strAnchor }}
|
||||
<h{{ .Level }} class="relative group">{{ .Text | safeHTML }}
|
||||
<div id="{{ .Anchor | safeURL }}" class="anchor"></div>
|
||||
<div id="{{ .Anchor | safeURL | urlize }}" class="anchor"></div>
|
||||
{{ if.Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}
|
||||
<span
|
||||
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
|
||||
<a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700"
|
||||
style="text-decoration-line: none !important;" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}">#</a>
|
||||
style="text-decoration-line: none !important;" href="#{{ $replacedAnchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}">#</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
</h{{ .Level }}>
|
||||
|
|
Loading…
Add table
Reference in a new issue