Remove trim blank charsets flag to improve speed.

This commit is contained in:
凡梦星尘
2023-01-01 21:12:58 +08:00
parent d0a6d943e0
commit a2f37c8470
55 changed files with 494 additions and 496 deletions

View File

@@ -1,42 +1,42 @@
{{- $root := . -}}
{{- with .Site.Params.comments }}
{{- $tc := and .storage (gt (len .nav) 1) }}
{{- $active := .active }}
{{- $fc := .active }}
{{- $sc := "" }}
{{- $sn := "" }}
{{ $root := . }}
{{ with .Site.Params.comments }}
{{ $tc := and .storage (gt (len .nav) 1) }}
{{ $active := .active }}
{{ $fc := .active }}
{{ $sc := "" }}
{{ $sn := "" }}
<div id="comments" class="post-comments">
<div class="comment-head">
<div class="comment-headline">
<i class="fas fa-comments fa-fw"></i>
<span>{{ T "PostCommentTitle" }}</span>
</div>
{{- if $tc }}
{{- $sn = (sort .nav "weight") }}
{{- $fc = index $sn 0 }}
{{- $sc = index $sn 1 }}
{{ if $tc }}
{{ $sn = (sort .nav "weight") }}
{{ $fc = index $sn 0 }}
{{ $sc = index $sn 1 }}
<div class="comment-switch">
<span class="first-comment">{{ $fc.title }}</span>
<span class="switch-btn {{ if eq .active (lower $sc.name) }}move{{ end }}"></span>
<span class="second-comment">{{ $sc.title }}</span>
</div>
{{- end }}
{{ end }}
</div>
<div class="comment-wrap">
{{ $cp := "_thirdparty/comment/%s.html" }}
{{- if $tc }}
{{- range $sn }}
{{ if $tc }}
{{ range $sn }}
<div>
{{- partial "_thirdparty/comment/comm_loading.html" . }}
{{- partial (printf $cp (lower .name)) $root }}
{{ partial "_thirdparty/comment/comm_loading.html" . }}
{{ partial (printf $cp (lower .name)) $root }}
</div>
{{- end }}
{{- else }}
{{ end }}
{{ else }}
<div>
{{- partial "_thirdparty/comment/comm_loading.html" . }}
{{- partial (printf $cp $fc) $root }}
{{ partial "_thirdparty/comment/comm_loading.html" . }}
{{ partial (printf $cp $fc) $root }}
</div>
{{- end }}
{{ end }}
</div>
</div>
{{- end }}
{{ end }}