fix(srcatch): fix srcatch bugs

This commit is contained in:
Dillon
2020-02-27 20:14:40 +08:00
parent 0dc5feb7f3
commit ae81e3767e
32 changed files with 370 additions and 210 deletions

View File

@@ -8,7 +8,7 @@
{{- with $avatar -}}
<div class="home-avatar">
<a href="/posts">
{{- partial "plugin/image.html" (dict "src-s" . "title" "avatar" "description" (T "home") "context" $) -}}
{{- partial "plugin/image.html" (dict "src_s" . "title" "avatar" "description" (T "home") "scratch" $scratch) -}}
</a>
</div>
{{- end -}}
@@ -16,11 +16,8 @@
{{- with .Site.Params.home.profile.subtitle -}}
<h2 class="home-description">
{{- if $.Site.Params.home.profile.typeit -}}
{{- $id := md5 . | printf "tp-%s" -}}
<div id={{ printf "r%s" $id }} hidden=true>
{{- . -}}
</div>
<div id={{ $id }} class="typeit"></div>
{{- $id := partial "function/id.html" (dict "content" . "scratch" $scratch) -}}
<div id="{{ $id }}" class="typeit"></div>
{{- $scratch.SetInMap "typeitMap" $id (slice $id) -}}
{{- else -}}
{{- . -}}