mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-21 20:30:39 +00:00
feat: add support for custom heading css class (#608)
This commit is contained in:
parent
d6f09016a3
commit
4ea6acc9d4
@ -4,7 +4,10 @@
|
||||
<!-- prettier-ignore-start -->
|
||||
{{- if $showAnchor -}}
|
||||
<div class="gdoc-page__anchorwrap">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
||||
class="{{ . }}"
|
||||
{{- end }}
|
||||
>
|
||||
{{ .Text | safeHTML }}
|
||||
<a data-clipboard-text="{{ .Page.Permalink }}#{{ .Anchor | safeURL }}" class="gdoc-page__anchor clip flex align-center" title="{{ i18n "title_anchor_prefix" }} {{ .Text | safeHTML }}" aria-label="{{ i18n "title_anchor_prefix" }} {{ .Text | safeHTML }}" href="#{{ .Anchor | safeURL }}">
|
||||
<svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg>
|
||||
@ -13,7 +16,10 @@
|
||||
</div>
|
||||
{{- else -}}
|
||||
<div class="gdoc-page__anchorwrap">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
||||
class="{{ . }}"
|
||||
{{- end }}
|
||||
>
|
||||
{{ .Text | safeHTML }}
|
||||
</h{{ .Level }}>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user