feat: add support for custom heading css class (#608)
This commit is contained in:
parent
d6f09016a3
commit
4ea6acc9d4
1 changed files with 8 additions and 2 deletions
|
@ -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 a new issue