feat(header): support header title typeit (#306)
This commit is contained in:
@@ -10,7 +10,13 @@
|
||||
{{- with .pre -}}
|
||||
<span class="header-title-pre">{{ . | safeHTML }}</span>
|
||||
{{- end -}}
|
||||
{{- if .typeit -}}
|
||||
{{- $id := dict "content" .name "scratch" $.Scratch | partial "function/id.html" -}}
|
||||
<span id="{{ $id }}" class="typeit"></span>
|
||||
{{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
|
||||
{{- else -}}
|
||||
{{- .name -}}
|
||||
{{- end -}}
|
||||
{{- with .post -}}
|
||||
<span class="header-title-post">{{ . | safeHTML }}</span>
|
||||
{{- end -}}
|
||||
@@ -88,7 +94,13 @@
|
||||
{{- with .pre -}}
|
||||
<span class="header-title-pre">{{ . | safeHTML }}</span>
|
||||
{{- end -}}
|
||||
{{- if .typeit -}}
|
||||
{{- $id := dict "content" .name "scratch" $.Scratch | partial "function/id.html" -}}
|
||||
<span id="{{ $id }}" class="typeit"></span>
|
||||
{{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
|
||||
{{- else -}}
|
||||
{{- .name -}}
|
||||
{{- end -}}
|
||||
{{- with .post -}}
|
||||
<span class="header-title-post">{{ . | safeHTML }}</span>
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user