Welcome to mirror list, hosted at ThFree Co, Russian Federation.

render-heading.html « _markup « _default « layouts - github.com/gohugoio/gohugoioTheme2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d6825decfaa6272020abe0ad3f48e1da3ff16fc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{{ $tagOpen := printf "<h%d>" .Level | safeHTML }}
{{ $tagClose := printf "</h%d>" .Level | safeHTML }}
{{ $tagOpen }}
{{ .Text | safeHTML }}
{{- if and (ge .Level 2) (le .Level 4) }}
  {{"&nbsp;" | safeHTML -}}
  <a class="anchor" name="{{ .Anchor }}"></a>
  <a class="inline-flex items-center" href="#{{ .Anchor | safeURL }}">
    <svg class="fill-current opacity-60 hover:text-steel-500" height="22px" viewBox="0 0 24 24" width="22px" xmlns="http://www.w-16.org/2000/svg">
      <path d="M0 0h24v24H0z" fill="none"/>
      <path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>
    </svg>
  </a>
{{- end -}}
{{ $tagClose }}