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,55 +1,55 @@
{{- define "title" -}}
{{- .Params.Title | default (T .Data.Plural) | default .Data.Plural | dict "Some" | T "AllSome" }} - {{ .Site.Title -}}
{{- end -}}
{{- define "main_inner_class" }}{{.Data.Plural}} posts-expand{{ end -}}
{{- define "main" }}
{{ define "title" }}
{{ .Params.Title | default (T .Data.Plural) | default .Data.Plural | dict "Some" | T "AllSome" }} - {{ .Site.Title }}
{{ end }}
{{ define "main_inner_class" }}{{.Data.Plural}} posts-expand{{ end }}
{{ define "main" }}
<div class="post-block" lang="{{ .Site.LanguageCode }}">
<div class="post-header">
<h1>
{{- if eq .Data.Plural "categories" }}
{{- T "CateTitle" }}
{{- else if eq .Data.Plural "tags" }}
{{- T "TagTitle" }}
{{- end }}
{{ if eq .Data.Plural "categories" }}
{{ T "CateTitle" }}
{{ else if eq .Data.Plural "tags" }}
{{ T "TagTitle" }}
{{ end }}
</h1>
</div>
<div class="post-body">
{{- if eq .Data.Plural "categories" }}
{{ if eq .Data.Plural "categories" }}
{{ $cats := .Site.Taxonomies.categories }}
<div class="category-all-page">
<div class="category-all-title">
{{- T "CatesCounterTitle" (.Scratch.Get "catsCount") | safeHTML -}}
{{ T "CatesCounterTitle" (.Scratch.Get "catsCount") | safeHTML }}
</div>
<div class="category-all">
<ul class="category-list">
{{- range $name, $items := $cats }}
{{ range $name, $items := $cats }}
<li class="category-list-item">
<a class="category-list-link" href="{{ "/categories/" | relLangURL }}{{ $name | urlize }}" data-pjax-state="">{{ .Page.Title }}</a>
<span class="category-list-count">{{ len $items }}</span>
</li>
{{- end }}
{{ end }}
</ul>
</div>
</div>
{{- end }}
{{- if eq .Data.Plural "tags" }}
{{ end }}
{{ if eq .Data.Plural "tags" }}
{{ $tags := .Site.Taxonomies.tags }}
<div class="tag-cloud">
<div class="tag-cloud-title">
{{- T "TagsCounterTitle" (.Scratch.Get "tagsCount") | safeHTML -}}
{{ T "TagsCounterTitle" (.Scratch.Get "tagsCount") | safeHTML }}
</div>
<div class="tag-cloud-tags">
{{ $randNums := (seq 10) }}
{{- range $name, $items := $tags }}
{{ range $name, $items := $tags }}
<a class="tag-cloud-{{ index (shuffle $randNums) 0 }}" href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}">{{ .Page.Title }}
<span class="tag-list-count">
<sup>({{ len $items }})</sup>
</span>
</a>
{{- end }}
{{ end }}
</div>
</div>
{{- end }}
{{ end }}
</div>
</div>
{{- end }}
{{ end }}