2023-06-22 07:45:54 +00:00
|
|
|
{{- $showAnchor := (and (default true .Page.Params.geekdocAnchor) (default true .Page.Site.Params.geekdocAnchor)) -}}
|
2021-02-04 09:06:19 +00:00
|
|
|
|
2022-01-06 12:58:10 +00:00
|
|
|
|
|
|
|
<!-- prettier-ignore-start -->
|
2021-02-24 15:37:12 +00:00
|
|
|
{{- if $showAnchor -}}
|
2023-08-31 21:27:11 +00:00
|
|
|
<div class="flex align-center gdoc-page__anchorwrap">
|
2023-04-17 18:51:01 +00:00
|
|
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
|
|
|
class="{{ . }}"
|
|
|
|
{{- end }}
|
|
|
|
>
|
2021-02-04 09:06:19 +00:00
|
|
|
{{ .Text | safeHTML }}
|
|
|
|
</h{{ .Level }}>
|
2023-08-31 21:27:11 +00:00
|
|
|
<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>
|
|
|
|
</a>
|
2021-02-04 09:06:19 +00:00
|
|
|
</div>
|
2021-02-24 15:37:12 +00:00
|
|
|
{{- else -}}
|
2021-02-04 09:06:19 +00:00
|
|
|
<div class="gdoc-page__anchorwrap">
|
2023-04-17 18:51:01 +00:00
|
|
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
|
|
|
class="{{ . }}"
|
|
|
|
{{- end }}
|
|
|
|
>
|
2021-02-04 09:06:19 +00:00
|
|
|
{{ .Text | safeHTML }}
|
|
|
|
</h{{ .Level }}>
|
|
|
|
</div>
|
2021-02-24 15:37:12 +00:00
|
|
|
{{- end -}}
|
2022-01-06 12:58:10 +00:00
|
|
|
<!-- prettier-ignore-end -->
|