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,6 +1,6 @@
// CSS Style Guide : https://codeguide.co/#css // CSS Style Guide : https://codeguide.co/#css
// All variables from site's config content. // All variables from site's config content.
{{- $P := .Site.Params }} {{ $P := .Site.Params }}
// Base // Base
$scheme : {{ $P.scheme }}; $scheme : {{ $P.scheme }};
$darkmode : {{ $P.darkmode }}; $darkmode : {{ $P.darkmode }};
@ -129,18 +129,18 @@ $disqusjs_enable : false;
$livere_enable : {{ isset $P "livere" }}; $livere_enable : {{ isset $P "livere" }};
$utterances_enable : {{ isset $P "utterances" }}; $utterances_enable : {{ isset $P "utterances" }};
$waline_enable : {{ isset $P "waline" }}; $waline_enable : {{ isset $P "waline" }};
{{- with .Site.Params.comments }} {{ with .Site.Params.comments }}
{{- $tce := and (isset . "nav") (and .storage (gt (len .nav) 1)) }} {{ $tce := and (isset . "nav") (and .storage (gt (len .nav) 1)) }}
$two_comments_enable : {{ $tce }}; $two_comments_enable : {{ $tce }};
{{- if $tce }} {{ if $tce }}
{{- $sortNav := sort .nav "weight" }} {{ $sortNav := sort .nav "weight" }}
$two_comments_actived : {{ .active }}; $two_comments_actived : {{ .active }};
$first_comment_color : {{ (index $sortNav 0).color }}; $first_comment_color : {{ (index $sortNav 0).color }};
$first_comment_name : {{ lower (index $sortNav 0).name }}; $first_comment_name : {{ lower (index $sortNav 0).name }};
$second_comment_color : {{ (index $sortNav 1).color }}; $second_comment_color : {{ (index $sortNav 1).color }};
$second_comment_name : {{ lower (index $sortNav 1).name }}; $second_comment_name : {{ lower (index $sortNav 1).name }};
{{- end }} {{ end }}
{{- end }} {{ end }}
// //
// Variables Layer // Variables Layer

View File

@ -130,5 +130,3 @@ plugins:
version: 2.13.0 version: 2.13.0
file: dist/comment.js file: dist/comment.js
alias: waline alias: waline

View File

@ -1,7 +1,7 @@
{{- $extURL := and .Page.Site.Params.exturl.enable (strings.HasPrefix .Destination "http") }} {{ $extURL := and .Page.Site.Params.exturl.enable (strings.HasPrefix .Destination "http") }}
<a href="{{ .Destination | safeURL }}" title="{{ .Text }}" {{ if $extURL }}rel="noopener external nofollow noreferrer" target="_blank" class=" exturl"{{ end }}> <a href="{{ .Destination | safeURL }}" title="{{ .Text }}" {{ if $extURL }}rel="noopener external nofollow noreferrer" target="_blank" class=" exturl"{{ end }}>
{{ .Text | safeHTML }} {{ .Text | safeHTML }}
{{- if and $extURL .Page.Site.Params.exturl.icon }} {{ if and $extURL .Page.Site.Params.exturl.icon }}
<i class="fa fa-external-link-alt"></i> <i class="fa fa-external-link-alt"></i>
{{- end }} {{ end }}
</a> </a>

View File

@ -1,13 +1,13 @@
{{- range $k, $v := (partialCached "init.html" .) -}} {{ range $k, $v := (partialCached "init.html" .) }}
{{- $.Scratch.Set $k $v -}} {{ $.Scratch.Set $k $v }}
{{- end -}} {{ end }}
{{ $isComment := .Params.comment.enable | default .Site.Params.comments.enable }} {{ $isComment := .Params.comment.enable | default .Site.Params.comments.enable }}
{{ .Scratch.Set "isComment" $isComment }} {{ .Scratch.Set "isComment" $isComment }}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}" data-theme="{{ .Scratch.Get "theme" }}"> <html lang="{{ .Site.LanguageCode }}" data-theme="{{ .Scratch.Get "theme" }}">
<head> <head>
{{- partial "head.html" . }} {{ partial "head.html" . }}
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title> <title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
<noscript> <noscript>
<link rel="stylesheet" href="/css/noscript.css"> <link rel="stylesheet" href="/css/noscript.css">
@ -19,30 +19,30 @@
<main class="main"> <main class="main">
<header class="header" itemscope itemtype="http://schema.org/WPHeader"> <header class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"> <div class="header-inner">
{{- partial "header.html" . }} {{ partial "header.html" . }}
</div> </div>
<!-- Sidebar --> <!-- Sidebar -->
{{- if ne .Site.Params.sidebar.display "remove" }} {{ if ne .Site.Params.sidebar.display "remove" }}
{{- partial "sidebar.html" . }} {{ partial "sidebar.html" . }}
{{- end }} {{ end }}
</header> </header>
<!-- Widgets --> <!-- Widgets -->
{{ partial "widgets.html" . }} {{ partial "widgets.html" . }}
<div class="main-inner {{ block "main_inner_class" . }}{{ end }}"> <div class="main-inner {{ block "main_inner_class" . }}{{ end }}">
<!-- Submenu,Content,Comment --> <!-- Submenu,Content,Comment -->
{{- block "main" . }}{{- end }} {{ block "main" . }}{{ end }}
{{- if and .IsPage $isComment }} {{ if and .IsPage $isComment }}
{{- partialCached "comments.html" . }} {{ partialCached "comments.html" . }}
{{- end }} {{ end }}
</div> </div>
</main> </main>
<footer class="footer"> <footer class="footer">
<div class="footer-inner"> <div class="footer-inner">
{{- partialCached "footer.html" . }} {{ partialCached "footer.html" . }}
</div> </div>
</footer> </footer>
{{- partial "scripts.html" . }} {{ partial "scripts.html" . }}
</body> </body>
</html> </html>

View File

@ -1,6 +1,6 @@
[ [
{{- range $index, $entry := where .Site.RegularPages "Kind" "page" }} {{ range $index, $entry := where .Site.RegularPages "Kind" "page" }}
{{- if $index }}, {{ end }} {{ if $index }}, {{ end }}
{ {
"objectID": "{{ .Date.Unix }}", "objectID": "{{ .Date.Unix }}",
"permalink": "{{ .Permalink | relURL }}", "permalink": "{{ .Permalink | relURL }}",
@ -9,5 +9,5 @@
"date": {{ .Date.Format $.Site.Params.timeFormat | jsonify }}, "date": {{ .Date.Format $.Site.Params.timeFormat | jsonify }},
"updated": {{ .Lastmod.Format $.Site.Params.timeFormat | jsonify }} "updated": {{ .Lastmod.Format $.Site.Params.timeFormat | jsonify }}
} }
{{- end }} {{ end }}
] ]

View File

@ -5,12 +5,12 @@
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<url>{{ .RelPermalink | relLangURL }}</url> <url>{{ .RelPermalink | relLangURL }}</url>
<categories> <categories>
{{- range .Params.categories }}<category>{{ . }}</category>{{- end }} {{ range .Params.categories }}<category>{{ . }}</category>{{ end }}
</categories> </categories>
<tags> <tags>
{{- range .Params.tags }} {{ range .Params.tags }}
<tag>{{ . }}</tag> <tag>{{ . }}</tag>
{{- end }} {{ end }}
</tags> </tags>
<content type="html"><![CDATA[{{ .Content | plainify }}]]></content> <content type="html"><![CDATA[{{ .Content | plainify }}]]></content>
</entry> </entry>

View File

@ -1,15 +1,15 @@
{{- define "title" }} {{ define "title" }}
{{- .Params.Title | default (T .Section) | default .Section }} - {{ .Site.Title -}} {{ .Params.Title | default (T .Section) | default .Section }} - {{ .Site.Title }}
{{- end -}} {{ end }}
{{ define "main_inner_class" }}index posts-expand{{ end }} {{ define "main_inner_class" }}index posts-expand{{ end }}
{{- define "main" }} {{ define "main" }}
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "==" .Section) }} {{ $paginator := .Paginate (where .Site.RegularPages "Section" "==" .Section) }}
{{- range $paginator.Pages }} {{ range $paginator.Pages }}
{{ partial "post.html" (dict "ctx" . "IsHome" true) }} {{ partial "post.html" (dict "ctx" . "IsHome" true) }}
{{- end }} {{ end }}
{{- partial "partials/pagination.html" . }} {{ partial "partials/pagination.html" . }}
{{- end }} {{ end }}

View File

@ -1,7 +1,7 @@
{{- define "title" }}{{- .Title }} - {{ .Site.Title -}}{{- end }} {{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
{{- define "main_inner_class" }}post posts-expand{{- end }} {{ define "main_inner_class" }}post posts-expand{{ end }}
{{- define "main" }} {{ define "main" }}
{{ partial "post.html" (dict "ctx" . "IsHome" false) }} {{ partial "post.html" (dict "ctx" . "IsHome" false) }}
{{- end }} {{ end }}

View File

@ -1,6 +1,6 @@
{{- define "title" -}} {{ define "title" }}
{{- .Title }} - {{ T .Data.Singular | default .Data.Singular }} - {{ .Site.Title -}} {{ .Title }} - {{ T .Data.Singular | default .Data.Singular }} - {{ .Site.Title }}
{{- end -}} {{ end }}
{{ define "main_inner_class" }}{{ .Data.Plural }} posts-collapse{{ end }} {{ define "main_inner_class" }}{{ .Data.Plural }} posts-collapse{{ end }}
{{ define "main" }} {{ define "main" }}
<div class="post-block"> <div class="post-block">
@ -18,5 +18,5 @@
</div> </div>
</div> </div>
{{- partial "pagination.html" . }} {{ partial "pagination.html" . }}
{{- end }} {{ end }}

View File

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

View File

@ -1,30 +1,30 @@
{{- define "title" }} {{ define "title" }}
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "AllSome" }} - {{ .Site.Title -}} {{ .Params.Title | default (T .Section) | default .Section | dict "Some" | T "AllSome" }} - {{ .Site.Title }}
{{- end -}} {{ end }}
{{ define "main_inner_class" }}archive posts-collapse{{ end }} {{ define "main_inner_class" }}archive posts-collapse{{ end }}
{{- define "main" }} {{ define "main" }}
<div class="post-block"> <div class="post-block">
<div class="post-content"> <div class="post-content">
<div class="collection-title"> <div class="collection-title">
{{- $cheers := "Um" }} {{ $cheers := "Um" }}
{{- $posts := .Scratch.Get "postsCount" }} {{ $posts := .Scratch.Get "postsCount" }}
{{- if gt $posts 210 }} {{ if gt $posts 210 }}
{{- $cheers = "Excellent" }} {{ $cheers = "Excellent" }}
{{- else if gt $posts 130 }} {{ else if gt $posts 130 }}
{{- $cheers = "Great" }} {{ $cheers = "Great" }}
{{- else if gt $posts 80 }} {{ else if gt $posts 80 }}
{{- $cheers = "Good" }} {{ $cheers = "Good" }}
{{- else if gt $posts 50 }} {{ else if gt $posts 50 }}
{{- $cheers = "Nice" }} {{ $cheers = "Nice" }}
{{- else if gt $posts 30 }} {{ else if gt $posts 30 }}
{{- $cheers = "Ok" }} {{ $cheers = "Ok" }}
{{- end }} {{ end }}
<span class="collection-header"> <span class="collection-header">
{{- T (printf "PostArchiveCheers%s" $cheers) }} {{ T (printf "PostArchiveCheers%s" $cheers) }}
{{- T "SymbolComma" }} {{ T "SymbolComma" }}
{{- T "ArchiveCounterTitle" $posts | safeHTML }} {{ T "ArchiveCounterTitle" $posts | safeHTML }}
{{- T "SymbolComma" }} {{ T "SymbolComma" }}
{{- T "PostArchiveKeepOn" }} {{ T "PostArchiveKeepOn" }}
</span> </span>
</div> </div>
@ -32,5 +32,5 @@
</div> </div>
</div> </div>
{{- partial "pagination.html" . }} {{ partial "pagination.html" . }}
{{- end }} {{ end }}

View File

@ -1,6 +1,6 @@
{{- define "title" }}{{- .Title }} - {{ .Site.Title -}}{{- end }} {{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
{{- define "main_inner_class" }}flinks posts-expand{{- end }} {{ define "main_inner_class" }}flinks posts-expand{{ end }}
{{ define "main" }} {{ define "main" }}

View File

@ -1,11 +1,11 @@
{{- define "main_inner_class" }}index posts-expand{{- end }} {{ define "main_inner_class" }}index posts-expand{{ end }}
{{- define "main" }} {{ define "main" }}
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }} {{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
{{- range $paginator.Pages }} {{ range $paginator.Pages }}
{{ partial "post.html" (dict "ctx" . "IsHome" true) }} {{ partial "post.html" (dict "ctx" . "IsHome" true) }}
{{- end }} {{ end }}
{{- partial "partials/pagination.html" . }} {{ partial "partials/pagination.html" . }}
{{- end }} {{ end }}

View File

@ -6,15 +6,15 @@
{{ with .res.alias2 }} {{ with .res.alias2 }}
{{ $npm = . }} {{ $npm = . }}
{{ end }} {{ end }}
{{- $file := .res.file }} {{ $file := .res.file }}
{{- if ne .vendor "unpkg" }} {{ if ne .vendor "unpkg" }}
{{- with .res.alias }} {{ with .res.alias }}
{{- $npm = . }} {{ $npm = . }}
{{- end }} {{ end }}
{{- $file = replaceRE `(dist|lib|source\/js)\/` "" .res.file }} {{ $file = replaceRE `(dist|lib|source\/js)\/` "" .res.file }}
{{- $fmt = "%s/%s/%s/%s" }} {{ $fmt = "%s/%s/%s/%s" }}
{{- end }} {{ end }}
{{ $pluginRes := printf $fmt .router $npm .res.version $file }} {{ $pluginRes := printf $fmt .router $npm .res.version $file }}

View File

@ -1,3 +1,3 @@
{{- if isset .Site.Params "addthisid" }} {{ if isset .Site.Params "addthisid" }}
<div class="addthis_inline_share_toolbox" style="text-align: center;"></div> <div class="addthis_inline_share_toolbox" style="text-align: center;"></div>
{{- end }} {{ end }}

View File

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

View File

@ -1,4 +1,4 @@
{{- $ft := .Site.Params.footer }} {{ $ft := .Site.Params.footer }}
{{ if $ft.translate }} {{ if $ft.translate }}
<div id="gtranslate" class="google-translate"> <div id="gtranslate" class="google-translate">
<i class="fa fa-language"></i> <i class="fa fa-language"></i>
@ -8,55 +8,55 @@
<div class="copyright"> <div class="copyright">
&copy; &copy;
<span itemprop="copyrightYear"> <span itemprop="copyrightYear">
{{- $year := now.Year }} {{ $year := now.Year }}
{{- if isset $ft "since" }} {{ if isset $ft "since" }}
{{- if gt $year $ft.since }} {{ if gt $year $ft.since }}
{{ $ft.since }} - {{ $year }} {{ $ft.since }} - {{ $year }}
{{- else }} {{ else }}
{{ $year }} {{ $year }}
{{- end }} {{ end }}
{{- else }} {{ else }}
{{ $year }} {{ $year }}
{{- end }} {{ end }}
</span> </span>
<span class="with-love"> <span class="with-love">
<i class="{{ $ft.icon.name }}"></i> <i class="{{ $ft.icon.name }}"></i>
</span> </span>
<span class="author" itemprop="copyrightHolder">{{ $ft.copyright | default .Site.Params.author }}</span> <span class="author" itemprop="copyrightHolder">{{ $ft.copyright | default .Site.Params.author }}</span>
</div> </div>
{{- if $ft.powered }} {{ if $ft.powered }}
<div class="powered-by"> <div class="powered-by">
{{ $pb := printf "<a href='https://gohugo.io' title='%s' target='_blank'>Hugo</a> &amp; <a href='https://github.com/hugo-next/hugo-theme-next' title='%s' target='_blank'>Hugo NexT.%s</a>" hugo.Version .Site.Data.config.version .Site.Params.scheme }} {{ $pb := printf "<a href='https://gohugo.io' title='%s' target='_blank'>Hugo</a> &amp; <a href='https://github.com/hugo-next/hugo-theme-next' title='%s' target='_blank'>Hugo NexT.%s</a>" hugo.Version .Site.Data.config.version .Site.Params.scheme }}
{{- printf (T "FooterPowerby") $pb | safeHTML }} {{ printf (T "FooterPowerby") $pb | safeHTML }}
</div> </div>
{{- end }} {{ end }}
{{- with $ft.beian }} {{ with $ft.beian }}
{{- if .enable }} {{ if .enable }}
<div class="beian"> <div class="beian">
<a href="https://beian.miit.gov.cn" target="_blank">{{ .icp }}</a> <a href="https://beian.miit.gov.cn" target="_blank">{{ .icp }}</a>
<img src="/imgs/gongan.png" alt="{{ .provinceAbbr }}公网安备"> <img src="/imgs/gongan.png" alt="{{ .provinceAbbr }}公网安备">
<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{ .gonganNum }}" target="_blank">{{ .provinceAbbr }}公网安备 {{ .gonganNum }} 号</a> <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{ .gonganNum }}" target="_blank">{{ .provinceAbbr }}公网安备 {{ .gonganNum }} 号</a>
</div> </div>
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- with $ft.vendors }} {{ with $ft.vendors }}
{{ if .enable }} {{ if .enable }}
<div class="vendors-list"> <div class="vendors-list">
{{- range .list }} {{ range .list }}
<a target="_blank" href="{{ .link }}" title="{{ .name }}"> <a target="_blank" href="{{ .link }}" title="{{ .name }}">
{{- if .image }} {{ if .image }}
<img src="/imgs/img-lazy-loading.gif" data-src="{{ .image.url }}" alt="{{ .name }}" /> <img src="/imgs/img-lazy-loading.gif" data-src="{{ .image.url }}" alt="{{ .name }}" />
{{- else }} {{ else }}
{{ .name }} {{ .name }}
{{- end }} {{ end }}
</a> </a>
{{- end }} {{ end }}
<span>{{ .title }}</span> <span>{{ .title }}</span>
</div> </div>
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- $custom := .Scratch.Get "footer" }} {{ $custom := .Scratch.Get "footer" }}
{{- if $custom }} {{ if $custom }}
{{ partialCached $custom . }} {{ partialCached $custom . }}
{{- end }} {{ end }}

View File

@ -1,10 +1,10 @@
{{- partial "head/meta.html" . }} {{ partial "head/meta.html" . }}
{{- partial "head/opengraph.html" . }} {{ partial "head/opengraph.html" . }}
{{- partial "head/twitter.html" . }} {{ partial "head/twitter.html" . }}
{{- partial "head/googleplus.html" . }} {{ partial "head/googleplus.html" . }}
{{- partial "head/facebook.html" . }} {{ partial "head/facebook.html" . }}
{{- partialCached "head/verify.html" . }} {{ partialCached "head/verify.html" . }}
{{- partialCached "head/style.html" . }} {{ partialCached "head/style.html" . }}
<script type="text/javascript"> <script type="text/javascript">
(function(){ (function(){
localDB = { localDB = {
@ -60,6 +60,6 @@
theme.active(); theme.active();
})(window); })(window);
</script> </script>
{{- partial "head/config.html" . }} {{ partial "head/config.html" . }}
{{- partialCached "head/analytics.html" . }} {{ partialCached "head/analytics.html" . }}

View File

@ -1,12 +1,12 @@
{{- if isset .Site.Params.analytics "laid" }} {{ if isset .Site.Params.analytics "laid" }}
{{ partial "_thirdparty/analytics/51la.html" . }} {{ partial "_thirdparty/analytics/51la.html" . }}
{{- end }} {{ end }}
{{- if isset .Site.Params.analytics "baidu" }} {{ if isset .Site.Params.analytics "baidu" }}
{{ partial "_thirdparty/analytics/baidu.html" . }} {{ partial "_thirdparty/analytics/baidu.html" . }}
{{- end }} {{ end }}
{{- if isset .Site.Params.analytics "google" }} {{ if isset .Site.Params.analytics "google" }}
{{ partial "_thirdparty/analytics/google.html" . }} {{ partial "_thirdparty/analytics/google.html" . }}
{{- end }} {{ end }}
{{- if isset .Site.Params.analytics "busuanzi" }} {{ if isset .Site.Params.analytics "busuanzi" }}
{{ partial "_thirdparty/analytics/busuanzi.html" . }} {{ partial "_thirdparty/analytics/busuanzi.html" . }}
{{- end }} {{ end }}

View File

@ -1,11 +1,11 @@
{{- $pageCfg := dict {{ $pageCfg := dict
"isHome" .IsHome "isHome" .IsHome
"isPage" .IsPage "isPage" .IsPage
"comments" (.Scratch.Get "isComment") "comments" (.Scratch.Get "isComment")
"permalink" (.Page.Permalink | absURL) "permalink" (.Page.Permalink | absURL)
"path" (.Page.Permalink | path.Base) "path" (.Page.Permalink | path.Base)
"title" .Page.Title "title" .Page.Title
-}} }}
{{/* Append waline pageview & comment plugin */}} {{/* Append waline pageview & comment plugin */}}
{{ if and .Site.Params.waline ( or .Site.Params.waline.pageView .Site.Params.waline.comment) }} {{ if and .Site.Params.waline ( or .Site.Params.waline.pageView .Site.Params.waline.comment) }}
@ -37,4 +37,4 @@
{{ $pageCfg = merge $pageCfg (dict "math" $math) }} {{ $pageCfg = merge $pageCfg (dict "math" $math) }}
{{ end }} {{ end }}
<script class="next-config" data-name="page" type="application/json">{{- $pageCfg -}}</script> <script class="next-config" data-name="page" type="application/json">{{ $pageCfg }}</script>

View File

@ -1,5 +1,5 @@
{{- with .Site.Params.openGraph.facebook }} {{ with .Site.Params.openGraph.facebook }}
{{- range $attr, $val := . }} {{ range $attr, $val := . }}
<meta property="fb:{{ $attr }}" content="{{ $val }}"> <meta property="fb:{{ $attr }}" content="{{ $val }}">
{{- end }} {{ end }}
{{- end }} {{ end }}

View File

@ -1,9 +1,9 @@
<!-- Website icons --> <!-- Website icons -->
{{- with .Site.Params.favicon }} {{ with .Site.Params.favicon }}
<link rel="shortcut icon" type="image/x-icon" href="{{ .icon }}"> <link rel="shortcut icon" type="image/x-icon" href="{{ .icon }}">
<link rel="icon" type="image/x-icon" href="{{ .icon }}"> <link rel="icon" type="image/x-icon" href="{{ .icon }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ .small }}"> <link rel="icon" type="image/png" sizes="16x16" href="{{ .small }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ .medium }}"> <link rel="icon" type="image/png" sizes="32x32" href="{{ .medium }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ .appleTouchIcon }}"> <link rel="apple-touch-icon" sizes="180x180" href="{{ .appleTouchIcon }}">
{{- end }} {{ end }}
<!-- Website icons --> <!-- Website icons -->

View File

@ -1,3 +1,3 @@
{{- with .Site.Params.openGraph.googlePlus }} {{ with .Site.Params.openGraph.googlePlus }}
<link rel="publisher" href=" {{ . }}"> <link rel="publisher" href=" {{ . }}">
{{- end }} {{ end }}

View File

@ -1,10 +1,10 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
{{- if .Site.Params.darkmode }} {{ if .Site.Params.darkmode }}
<meta name="theme-color" content="{{ .Site.Params.themeColor.dark }}" media="(prefers-color-scheme: dark)" /> <meta name="theme-color" content="{{ .Site.Params.themeColor.dark }}" media="(prefers-color-scheme: dark)" />
{{- else }} {{ else }}
<meta name="theme-color" content="{{ .Site.Params.themeColor.light }}" media="(prefers-color-scheme: light)" /> <meta name="theme-color" content="{{ .Site.Params.themeColor.light }}" media="(prefers-color-scheme: light)" />
{{- end }} {{ end }}
{{ hugo.Generator }} {{ hugo.Generator }}
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.Params.favicon.icon }}"> <link rel="shortcut icon" type="image/x-icon" href="{{ .Site.Params.favicon.icon }}">
<link rel="icon" type="image/x-icon" href="{{ .Site.Params.favicon.icon }}"> <link rel="icon" type="image/x-icon" href="{{ .Site.Params.favicon.icon }}">
@ -13,18 +13,18 @@
<link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Params.favicon.appleTouchIcon }}"> <link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Params.favicon.appleTouchIcon }}">
<meta itemprop="name" content="{{ .Title }}" /> <meta itemprop="name" content="{{ .Title }}" />
<meta itemprop="description" content="{{ .Description | default .Site.Params.description }}" /> <meta itemprop="description" content="{{ .Description | default .Site.Params.description }}" />
{{- if .IsPage }} {{ if .IsPage }}
{{- with .Date }} {{ with .Date }}
<meta itemprop="datePublished" {{ . }} /> <meta itemprop="datePublished" {{ . }} />
{{- end }} {{ end }}
{{- with .Lastmod }} {{ with .Lastmod }}
<meta itemprop="dateModified" {{ . }} /> <meta itemprop="dateModified" {{ . }} />
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- $img := .Site.Params.customLogo | default .Site.Params.avatar.url }} {{ $img := .Site.Params.customLogo | default .Site.Params.avatar.url }}
{{- if and .IsPage (isset .Params "images") }} {{ if and .IsPage (isset .Params "images") }}
{{- $img := index .Params.images 0 }} {{ $img := index .Params.images 0 }}
{{- end }} {{ end }}
{{- .Scratch.Set "metaImg" $img }} {{ .Scratch.Set "metaImg" $img }}
<meta itemprop="image" content="{{ $img | absURL }}" /> <meta itemprop="image" content="{{ $img | absURL }}" />
<meta itemprop="keywords" content="{{ if and .IsPage (isset .Params "tags")}}{{ delimit .Params.tags "," }}{{ else }}{{ .Site.Params.keywords }}{{ end }}" /> <meta itemprop="keywords" content="{{ if and .IsPage (isset .Params "tags")}}{{ delimit .Params.tags "," }}{{ else }}{{ .Site.Params.keywords }}{{ end }}" />

View File

@ -1,9 +1,9 @@
{{- $Site := .Site -}} {{ $Site := .Site }}
{{- $Params := .Site.Params -}} {{ $Params := .Site.Params }}
{{- $Page := .Page -}} {{ $Page := .Page }}
{{- $langCode := .Scratch.Get "langCode" -}} {{ $langCode := .Scratch.Get "langCode" }}
{{- with .Site.Params.openGraph -}} {{ with .Site.Params.openGraph }}
{{- if .enable -}} {{ if .enable }}
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:title" content="{{ $Page.Title }}"> <meta property="og:title" content="{{ $Page.Title }}">
<meta property="og:description" content="{{ default $Params.description $Page.Description }}"> <meta property="og:description" content="{{ default $Params.description $Page.Description }}">
@ -12,21 +12,21 @@
<meta property="og:site_name" content="{{ $Site.Title }}"> <meta property="og:site_name" content="{{ $Site.Title }}">
<meta property="og:locale" content="{{ $langCode }}"> <meta property="og:locale" content="{{ $langCode }}">
<meta property="article:author" content="{{ default $Params.author $Page.Params.Author }}"> <meta property="article:author" content="{{ default $Params.author $Page.Params.Author }}">
{{- with .twitter -}} {{ with .twitter }}
{{- range $attr, $val := . }} {{ range $attr, $val := . }}
<meta name="twitter:{{ $attr }}" content="{{ $val }}"> <meta name="twitter:{{ $attr }}" content="{{ $val }}">
{{- end -}} {{ end }}
{{- end -}} {{ end }}
{{- with .googlePlus }} {{ with .googlePlus }}
<link rel="publisher" href=" {{ . }}"> <link rel="publisher" href=" {{ . }}">
{{- end -}} {{ end }}
{{- with .facebook -}} {{ with .facebook }}
{{- range $attr, $val := . }} {{ range $attr, $val := . }}
<meta property="fb:{{ $attr }}" content="{{ $val }}"> <meta property="fb:{{ $attr }}" content="{{ $val }}">
{{- end -}} {{ end }}
{{- end -}} {{ end }}
{{- end -}} {{ end }}
{{- end -}} {{ end }}

View File

@ -1,4 +1,4 @@
{{- if .Site.Params.openGraph.enable }} {{ if .Site.Params.openGraph.enable }}
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" /> <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:title" content="{{ .Title | default .Site.Title }}" /> <meta property="og:title" content="{{ .Title | default .Site.Title }}" />
<meta property="og:description" content="{{ .Description | default .Site.Params.Description }}" /> <meta property="og:description" content="{{ .Description | default .Site.Params.Description }}" />
@ -9,9 +9,9 @@
<meta property="og:url" content="{{ .Permalink }}"/> <meta property="og:url" content="{{ .Permalink }}"/>
<meta property="og:site_name" content="{{ .Site.Title }}" /> <meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:locale" content="{{ .Site.LanguageCode }}"/> <meta property="og:locale" content="{{ .Site.LanguageCode }}"/>
{{- if .IsPage }} {{ if .IsPage }}
<meta property="article:author" content="{{ .Params.Author | default .Site.Params.Author }}" /> <meta property="article:author" content="{{ .Params.Author | default .Site.Params.Author }}" />
<meta property="article:published_time" content="{{ .Date }}" /> <meta property="article:published_time" content="{{ .Date }}" />
<meta property="article:modified_time" content="{{ .Lastmod }}" /> <meta property="article:modified_time" content="{{ .Lastmod }}" />
{{- end }} {{ end }}
{{- end }} {{ end }}

View File

@ -1,31 +1,31 @@
<!-- Plugin style files --> <!-- Plugin style files -->
{{- $cssRes := .Site.Data.resources.css }} {{ $cssRes := .Site.Data.resources.css }}
{{- $vendor := .Site.Params.vendors.plugins }} {{ $vendor := .Site.Params.vendors.plugins }}
{{- $router := .Scratch.Get "router" }} {{ $router := .Scratch.Get "router" }}
{{- range $css := $cssRes }} {{ range $css := $cssRes }}
{{ $pluginCss := partial "_funs/get_res.html" (dict "res" . "vendor" $vendor "router" $router) }} {{ $pluginCss := partial "_funs/get_res.html" (dict "res" . "vendor" $vendor "router" $router) }}
<link type="text/css" rel="stylesheet" href="{{ $pluginCss }}" /> <link type="text/css" rel="stylesheet" href="{{ $pluginCss }}" />
{{- end }} {{ end }}
<!-- Main Style file --> <!-- Main Style file -->
{{- $scss := resources.Get "css/main.scss" }} {{ $scss := resources.Get "css/main.scss" }}
{{- $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }} {{ $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }}
{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }} {{ $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
{{- if hugo.IsProduction }} {{ if hugo.IsProduction }}
{{- $css = $css | minify | fingerprint }} {{ $css = $css | minify | fingerprint }}
{{- end }} {{ end }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}"> <link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{- if .IsPage }} {{ if .IsPage }}
<style type="text/css"> <style type="text/css">
.post-footer, .flinks-list-footer hr:after { .post-footer, .flinks-list-footer hr:after {
content: "{{ .Site.Params.postFooter.endLineTip }}"; content: "{{ .Site.Params.postFooter.endLineTip }}";
} }
</style> </style>
{{- end }} {{ end }}
{{- $custom := .Scratch.Get "style" }} {{ $custom := .Scratch.Get "style" }}
{{- if $custom }} {{ if $custom }}
<link rel="stylesheet" type="text/css" href="{{ $custom }}"> <link rel="stylesheet" type="text/css" href="{{ $custom }}">
{{- end }} {{ end }}

View File

@ -1,5 +1,5 @@
{{- with .Site.Params.openGraph.twitter }} {{ with .Site.Params.openGraph.twitter }}
{{- $img := $.Params.openGraph.twitter.image | default ($.Scratch.Get "metaImg") }} {{ $img := $.Params.openGraph.twitter.image | default ($.Scratch.Get "metaImg") }}
<meta name="twitter:card" content="summary_large_image"/> <meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:creator" content="{{ .creator }}"/> <meta name="twitter:creator" content="{{ .creator }}"/>
<meta name="twitter:description" content="{{ with $.Page.Description }}{{ . }}{{ else }}{{if $.Page.IsPage}}{{ .Summary }}{{ else }}{{ $.Params.description }}{{ end }}{{ end }}"/> <meta name="twitter:description" content="{{ with $.Page.Description }}{{ . }}{{ else }}{{if $.Page.IsPage}}{{ .Summary }}{{ else }}{{ $.Params.description }}{{ end }}{{ end }}"/>

View File

@ -1,14 +1,14 @@
{{ if .IsHome }} {{ if .IsHome }}
{{- with .Site.Params.googleSiteVerification }} {{ with .Site.Params.googleSiteVerification }}
<meta name="google-site-verification" content="{{ . }}"> <meta name="google-site-verification" content="{{ . }}">
{{- end }} {{ end }}
{{- with .Site.Params.bingSiteVerification }} {{ with .Site.Params.bingSiteVerification }}
<meta name="msvalidate.01" content="{{ . }}"> <meta name="msvalidate.01" content="{{ . }}">
{{- end }} {{ end }}
{{- with .Site.Params.yandexSiteVerification }} {{ with .Site.Params.yandexSiteVerification }}
<meta name="yandex-verification" content="{{ . }}"> <meta name="yandex-verification" content="{{ . }}">
{{- end }} {{ end }}
{{- with .Site.Params.baiduSiteVerification }} {{ with .Site.Params.baiduSiteVerification }}
<meta name="baidu-site-verification" content="{{ . }}"> <meta name="baidu-site-verification" content="{{ . }}">
{{- end }} {{ end }}
{{ end }} {{ end }}

View File

@ -9,9 +9,9 @@
</div> </div>
<div class="site-meta"> <div class="site-meta">
{{- if and .Site.Params.customLogo (eq .Site.Params.scheme "Muse") }} {{ if and .Site.Params.customLogo (eq .Site.Params.scheme "Muse") }}
<img class="custom-logo-image" src="{{ .Site.Params.customLogo }}" alt="{{ $title }}"> <img class="custom-logo-image" src="{{ .Site.Params.customLogo }}" alt="{{ $title }}">
{{- end }} {{ end }}
<a href="{{ "/" | relLangURL }}" class="brand" rel="start"> <a href="{{ "/" | relLangURL }}" class="brand" rel="start">
<i class="logo-line"></i> <i class="logo-line"></i>
@ -20,17 +20,17 @@
</a> </a>
{{ if isset .Site.Params "subtitle" }} {{ if isset .Site.Params "subtitle" }}
<p class="site-subtitle" itemprop="description">{{ .Site.Params.subtitle }}</p> <p class="site-subtitle" itemprop="description">{{ .Site.Params.subtitle }}</p>
{{- end }} {{ end }}
{{- if and .Site.Params.customLogo (or (eq .Site.Params.scheme "Gemini") (eq .Site.Params.scheme "Pisces"))}} {{ if and .Site.Params.customLogo (or (eq .Site.Params.scheme "Gemini") (eq .Site.Params.scheme "Pisces"))}}
<img class="custom-logo-image" src="{{ .Site.Params.customLogo }}" alt="{{ $title }}"> <img class="custom-logo-image" src="{{ .Site.Params.customLogo }}" alt="{{ $title }}">
{{- end }} {{ end }}
</div> </div>
<div class="site-nav-right"> <div class="site-nav-right">
<div class="toggle popup-trigger"> <div class="toggle popup-trigger">
{{ if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }} {{ if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }}
<i class="fa fa-search fa-fw fa-lg"></i> <i class="fa fa-search fa-fw fa-lg"></i>
{{- end }} {{ end }}
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,25 +1,25 @@
{{- $ms := .Site.Params.menuSets }} {{ $ms := .Site.Params.menuSets }}
{{- $curP := .Page }} {{ $curP := .Page }}
<nav class="site-nav"> <nav class="site-nav">
<ul class="main-menu menu"> <ul class="main-menu menu">
{{- range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{- $active := $curP.IsMenuCurrent "main" . }} {{ $active := $curP.IsMenuCurrent "main" . }}
<li class="menu-item menu-item-{{ .Identifier }}"> <li class="menu-item menu-item-{{ .Identifier }}">
<a href="{{ .URL | relLangURL }}" class="hvr-icon-pulse {{if $active }} menu-item-active{{ end }}" rel="section"> <a href="{{ .URL | relLangURL }}" class="hvr-icon-pulse {{if $active }} menu-item-active{{ end }}" rel="section">
{{- if $ms.icons }}<i class="fa fa-{{ .Pre }} hvr-icon"></i>{{ end }}{{- .Name }} {{ if $ms.icons }}<i class="fa fa-{{ .Pre }} hvr-icon"></i>{{ end }}{{ .Name }}
{{- if and $ms.badges (eq .Identifier "archives") }} {{ if and $ms.badges (eq .Identifier "archives") }}
<span class="badge">{{ $.Scratch.Get "postsCount" }}</span> <span class="badge">{{ $.Scratch.Get "postsCount" }}</span>
{{- end }} {{ end }}
</a> </a>
</li> </li>
{{- end }} {{ end }}
{{- if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }} {{ if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }}
<li class="menu-item menu-item-search"> <li class="menu-item menu-item-search">
<a role="button" class="popup-trigger hvr-icon-pulse"> <a role="button" class="popup-trigger hvr-icon-pulse">
{{- if $ms.icons }}<i class="fa fa-search fa-fw hvr-icon"></i>{{ end }}{{ T "MSearchLabel" }} {{ if $ms.icons }}<i class="fa fa-search fa-fw hvr-icon"></i>{{ end }}{{ T "MSearchLabel" }}
</a> </a>
</li> </li>
{{- end }} {{ end }}
</ul> </ul>
</nav> </nav>

View File

@ -1,11 +1,11 @@
{{- if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }} {{ if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }}
<div class="search-pop-overlay"> <div class="search-pop-overlay">
<div class="popup search-popup"> <div class="popup search-popup">
{{- if .Site.Params.algoliaSearch.enable }} {{ if .Site.Params.algoliaSearch.enable }}
{{ partial "_thirdparty/search/algolia.html" . }} {{ partial "_thirdparty/search/algolia.html" . }}
{{- else if .Site.Params.localSearch.enable }} {{ else if .Site.Params.localSearch.enable }}
{{ partial "_thirdparty/search/local.html" . }} {{ partial "_thirdparty/search/local.html" . }}
{{- end }} {{ end }}
</div> </div>
</div> </div>
{{- end }} {{ end }}

View File

@ -1,4 +1,4 @@
{{- $SP := .Site.Params -}} {{ $SP := .Site.Params }}
<aside class="sidebar"> <aside class="sidebar">
<div class="sidebar-inner sidebar-overview-active"> <div class="sidebar-inner sidebar-overview-active">
<ul class="sidebar-nav"> <ul class="sidebar-nav">
@ -15,7 +15,7 @@
<div class="site-description" itemprop="description">{{ $SP.description }}</div> <div class="site-description" itemprop="description">{{ $SP.description }}</div>
</div> </div>
<div class="site-state-wrap site-overview-item animated"> <div class="site-state-wrap site-overview-item animated">
{{- if $SP.siteState }} {{ if $SP.siteState }}
<nav class="site-state"> <nav class="site-state">
<div class="site-state-item site-state-posts"> <div class="site-state-item site-state-posts">
<a href="{{ "/archives/" | relLangURL }}"> <a href="{{ "/archives/" | relLangURL }}">
@ -36,7 +36,7 @@
</a> </a>
</div> </div>
</nav> </nav>
{{- end }} {{ end }}
<div class="rss-link"> <div class="rss-link">
<a href="{{ "/index.xml" | relLangURL }}" rel="alternate" type="application/rss+xml" target="_blank"> <a href="{{ "/index.xml" | relLangURL }}" rel="alternate" type="application/rss+xml" target="_blank">
<i class="fa fa-rss"></i> <i class="fa fa-rss"></i>
@ -46,26 +46,26 @@
</div> </div>
<div class="links-of-social site-overview-item animated"> <div class="links-of-social site-overview-item animated">
{{ $si := $SP.socialIcons }} {{ $si := $SP.socialIcons }}
{{- range $SP.socials }} {{ range $SP.socials }}
{{- range $name,$val := . }} {{ range $name,$val := . }}
{{- $vals := split $val "||" }} {{ $vals := split $val "||" }}
{{- $url := trim (index $vals 0) " " }} {{ $url := trim (index $vals 0) " " }}
{{- $icon := trim (index $vals 1) " " }} {{ $icon := trim (index $vals 1) " " }}
<span class="links-of-social-item"> <span class="links-of-social-item">
<a href="{{- $url }}" title="{{- $name }} → {{- $url }}" rel="noopener" {{- if and $si.enable $si.transition }} class="hvr-icon-pulse" {{- end }} target="_blank"> <a href="{{ $url }}" title="{{ $name }} → {{ $url }}" rel="noopener" {{ if and $si.enable $si.transition }} class="hvr-icon-pulse" {{ end }} target="_blank">
{{- if $si.enable }} {{ if $si.enable }}
<i class="{{- $icon }} fa-fw {{ if $si.transition }} hvr-icon {{ end }}"></i> <i class="{{ $icon }} fa-fw {{ if $si.transition }} hvr-icon {{ end }}"></i>
{{- end }} {{ end }}
{{- if or (not $si.enable) (not $si.iconsOnly) }} {{ if or (not $si.enable) (not $si.iconsOnly) }}
{{- $name }} {{ $name }}
{{- end }} {{ end }}
</a> </a>
</span> </span>
{{- end }} {{ end }}
{{- end }} {{ end }}
</div> </div>
{{- $cc := $SP.creativeCommons }} {{ $cc := $SP.creativeCommons }}
{{- if and $cc $cc.sidebar }} {{ if and $cc $cc.sidebar }}
<div class="cc-license animated" itemprop="license"> <div class="cc-license animated" itemprop="license">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr .Site.Language 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}"> <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr .Site.Language 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}">
<img src="/imgs/cc/{{ $cc.size }}/{{ replace $cc.license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}"> <img src="/imgs/cc/{{ $cc.size }}/{{ replace $cc.license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}">

View File

@ -12,16 +12,16 @@
</time> </time>
</div> </div>
<div class="post-title"> <div class="post-title">
{{- if isset .Params "extlink" }} {{ if isset .Params "extlink" }}
<a href="{{ .Params.extlink }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external" title=""> <a href="{{ .Params.extlink }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external" title="">
<span itemprop="name">{{- .Title -}}</span> <span itemprop="name">{{ .Title }}</span>
<i class="fa fa-external-link-alt"></i> <i class="fa fa-external-link-alt"></i>
</a> </a>
{{- else }} {{ else }}
<a class="post-title-link" href="{{ .RelPermalink | relLangURL }}" itemprop="url"> <a class="post-title-link" href="{{ .RelPermalink | relLangURL }}" itemprop="url">
<span itemprop="name">{{ .Title }}</span> <span itemprop="name">{{ .Title }}</span>
</a> </a>
{{- end }} {{ end }}
</div> </div>
</header> </header>
</article> </article>

View File

@ -1,42 +1,42 @@
{{- $pag := .Paginator }} {{ $pag := .Paginator }}
{{- $tps := $pag.TotalPages }} {{ $tps := $pag.TotalPages }}
{{- $begin := sub $pag.PageNumber 4}} {{ $begin := sub $pag.PageNumber 4}}
{{- $.Scratch.Set "begin" $begin }} {{ $.Scratch.Set "begin" $begin }}
{{- $end := add $pag.PageNumber 4}} {{ $end := add $pag.PageNumber 4}}
{{- $.Scratch.Set "end" $end }} {{ $.Scratch.Set "end" $end }}
{{- if lt $begin 0}} {{ if lt $begin 0}}
{{- $end := sub $end $begin }} {{ $end := sub $end $begin }}
{{- $.Scratch.Set "end" $end }} {{ $.Scratch.Set "end" $end }}
{{- end}} {{ end}}
{{- $end := $.Scratch.Get "end"}} {{ $end := $.Scratch.Get "end"}}
{{- $over := sub $tps $end }} {{ $over := sub $tps $end }}
{{- if lt $over 0}} {{ if lt $over 0}}
{{- $begin := add $begin $over}} {{ $begin := add $begin $over}}
{{- $.Scratch.Set "begin" $begin }} {{ $.Scratch.Set "begin" $begin }}
{{- end }} {{ end }}
{{- $begin := $.Scratch.Get "begin"}} {{ $begin := $.Scratch.Get "begin"}}
<nav class="pagination"> <nav class="pagination">
{{- if $pag.HasPrev }} {{ if $pag.HasPrev }}
<a class="extend prev" rel="prev" href="{{- $pag.Prev.URL }}"> <a class="extend prev" rel="prev" href="{{ $pag.Prev.URL }}">
<i class="fa fa-angle-left"></i> <i class="fa fa-angle-left"></i>
</a> </a>
{{- end }} {{ end }}
{{- range $p := $pag.Pagers }} {{ range $p := $pag.Pagers }}
{{- if and (ge $p.PageNumber $begin) (le $p.PageNumber $end) }} {{ if and (ge $p.PageNumber $begin) (le $p.PageNumber $end) }}
{{- if eq $p $pag }} {{ if eq $p $pag }}
<span class="page-number current">{{- $p.PageNumber }}</span> <span class="page-number current">{{ $p.PageNumber }}</span>
{{- else }} {{ else }}
<a class="page-number" href="{{- $p.URL }}">{{- $p.PageNumber }}</a> <a class="page-number" href="{{ $p.URL }}">{{ $p.PageNumber }}</a>
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- if $pag.HasNext }} {{ if $pag.HasNext }}
<a class="extend next" rel="next" href="{{- $pag.Next.URL }}"> <a class="extend next" rel="next" href="{{ $pag.Next.URL }}">
<i class="fa fa-angle-right"></i> <i class="fa fa-angle-right"></i>
</a> </a>
{{- end }} {{ end }}
</nav> </nav>

View File

@ -1,6 +1,6 @@
<div class="post-block"> <div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="{{ .Site.LauageCode }}"> <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="{{ .Site.LauageCode }}">
{{- with .ctx }} {{ with .ctx }}
<link itemprop="mainEntityOfPage" href="{{ .Permalink }}"> <link itemprop="mainEntityOfPage" href="{{ .Permalink }}">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"> <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="{{ .Site.Params.avatar.url }}"> <meta itemprop="image" content="{{ .Site.Params.avatar.url }}">
@ -14,7 +14,7 @@
<meta itemprop="name" content="{{ .Title }}"> <meta itemprop="name" content="{{ .Title }}">
<meta itemprop="description" content="{{ .Description | default .Summary }}"> <meta itemprop="description" content="{{ .Description | default .Summary }}">
</span> </span>
{{- end }} {{ end }}
<header class="post-header"> <header class="post-header">
{{ partial "post/header.html" (dict "ctx" .ctx "IsHome" .IsHome) }} {{ partial "post/header.html" (dict "ctx" .ctx "IsHome" .IsHome) }}
</header> </header>

View File

@ -1,11 +1,11 @@
{{ with .ctx }} {{ with .ctx }}
{{- if $.IsHome }} {{ if $.IsHome }}
{{- if .Params.Expand }} {{ if .Params.Expand }}
{{ .Content }} {{ .Content }}
{{- else }} {{ else }}
{{ .Summary }} {{ .Summary }}
{{- end }} {{ end }}
{{- else }} {{ else }}
{{ .Content }} {{ .Content }}
{{- end }} {{ end }}
{{ end }} {{ end }}

View File

@ -1,44 +1,44 @@
{{ with .ctx }} {{ with .ctx }}
{{- if $.IsHome }} {{ if $.IsHome }}
{{- if and .Site.Params.readMoreBtn (not .Params.Expand) }} {{ if and .Site.Params.readMoreBtn (not .Params.Expand) }}
<div class="post-button"> <div class="post-button">
<a class="btn" href="{{ .RelPermalink | relLangURL }}#more" rel="contents"> <a class="btn" href="{{ .RelPermalink | relLangURL }}#more" rel="contents">
{{ T "PostReadMore" }} &raquo; {{ T "PostReadMore" }} &raquo;
</a> </a>
</div> </div>
{{- end }} {{ end }}
<div class="post-eof"></div> <div class="post-eof"></div>
{{- else }} {{ else }}
{{ partial "post/footer_meta/tags.html" . }} {{ partial "post/footer_meta/tags.html" . }}
{{- if and (not (isset .Params "share")) (not .Params.share) }} {{ if and (not (isset .Params "share")) (not .Params.share) }}
{{ partial "_thirdparty/share/addthis.html" . }} {{ partial "_thirdparty/share/addthis.html" . }}
{{- end }} {{ end }}
<hr/> <hr/>
{{ partial "post/footer_meta/reward.html" . }} {{ partial "post/footer_meta/reward.html" . }}
{{- if and (not (isset .Params "copyright")) (not .Params.copyright) }} {{ if and (not (isset .Params "copyright")) (not .Params.copyright) }}
{{ partial "post/footer_meta/copyright.html" . }} {{ partial "post/footer_meta/copyright.html" . }}
{{- end }} {{ end }}
{{- if and (not (isset .Params "followme")) (not .Params.followme) }} {{ if and (not (isset .Params "followme")) (not .Params.followme) }}
{{ partial "post/footer_meta/followme.html" . }} {{ partial "post/footer_meta/followme.html" . }}
{{- end }} {{ end }}
{{- if and (not (isset .Params "nav")) (not .Params.nav) }} {{ if and (not (isset .Params "nav")) (not .Params.nav) }}
<div class="post-nav"> <div class="post-nav">
<div class="post-nav-next post-nav-item"> <div class="post-nav-next post-nav-item">
{{- with .NextInSection }} {{ with .NextInSection }}
<a href="{{ .RelPermalink | relLangURL }}" rel="next" title="{{ .Title }}"> <a href="{{ .RelPermalink | relLangURL }}" rel="next" title="{{ .Title }}">
<i class="fa fa-chevron-left"></i> {{ .Title }} <i class="fa fa-chevron-left"></i> {{ .Title }}
</a> </a>
{{- end }} {{ end }}
</div> </div>
<div class="post-nav-prev post-nav-item"> <div class="post-nav-prev post-nav-item">
{{- with .PrevInSection }} {{ with .PrevInSection }}
<a href="{{ .RelPermalink | relLangURL }}" rel="prev" title="{{ .Title }}"> <a href="{{ .RelPermalink | relLangURL }}" rel="prev" title="{{ .Title }}">
{{ .Title }} {{ .Title }}
<i class="fa fa-chevron-right"></i> <i class="fa fa-chevron-right"></i>
</a> </a>
{{- end }} {{ end }}
</div> </div>
</div> </div>
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- end }} {{ end }}

View File

@ -1,4 +1,4 @@
{{- if .Site.Params.creativeCommons.post }} {{ if .Site.Params.creativeCommons.post }}
<div class="post-copyright"> <div class="post-copyright">
<img src="/imgs/cc/cc.svg" width="75" height="75" align="right" alt="{{ T "CCLinkTitle" }}"/> <img src="/imgs/cc/cc.svg" width="75" height="75" align="right" alt="{{ T "CCLinkTitle" }}"/>
<ul> <ul>
@ -7,29 +7,29 @@
{{ .Title }} {{ .Title }}
</li> </li>
<li class="post-copyright-author"> <li class="post-copyright-author">
{{- if isset .Params "author" }} {{ if isset .Params "author" }}
<strong>{{ print (T "PostCROriginAuthor") (T "SymbolColon") }} </strong> <strong>{{ print (T "PostCROriginAuthor") (T "SymbolColon") }} </strong>
{{ .Params.Author }} {{ .Params.Author }}
{{- else }} {{ else }}
<strong>{{ print (T "PostCRAuthor") (T "SymbolColon") }} </strong> <strong>{{ print (T "PostCRAuthor") (T "SymbolColon") }} </strong>
{{ .Site.Params.author }} {{ .Site.Params.author }}
{{- end }} {{ end }}
</li> </li>
<li class="post-copyright-link"> <li class="post-copyright-link">
{{- if isset .Params "link" }} {{ if isset .Params "link" }}
<strong>{{ print (T "PostCROriginLink") (T "SymbolColon") }} </strong> <strong>{{ print (T "PostCROriginLink") (T "SymbolColon") }} </strong>
<a target="_blank" href="{{ .Params.OriginLink }}" title="{{ .Title }}">{{ .Params.Link }}</a> <a target="_blank" href="{{ .Params.OriginLink }}" title="{{ .Title }}">{{ .Params.Link }}</a>
{{- else }} {{ else }}
<strong>{{ print (T "PostCRLink") (T "SymbolColon") }}</strong> <strong>{{ print (T "PostCRLink") (T "SymbolColon") }}</strong>
<a id="post-cr-link" href="{{ .Permalink | absLangURL }}" title="{{ .Title }}">{{ .Permalink | absLangURL }}</a> <a id="post-cr-link" href="{{ .Permalink | absLangURL }}" title="{{ .Title }}">{{ .Permalink | absLangURL }}</a>
{{- end }} {{ end }}
</li> </li>
<li class="post-copyright-license"> <li class="post-copyright-license">
<strong>{{ print (T "PostCRLicenseTitle") (T "SymbolColon") }} </strong> <strong>{{ print (T "PostCRLicenseTitle") (T "SymbolColon") }} </strong>
{{- $ccText := .Site.Params.creativeCommons.license | upper }} {{ $ccText := .Site.Params.creativeCommons.license | upper }}
{{- $ccLink := printf "<a target='_blank' href='https://creativecommons.org/licenses/by-nc-sa/4.0/deed.%s'>%s</a>" (substr .Site.LanguageCode 0 2) $ccText }} {{ $ccLink := printf "<a target='_blank' href='https://creativecommons.org/licenses/by-nc-sa/4.0/deed.%s'>%s</a>" (substr .Site.LanguageCode 0 2) $ccText }}
{{ printf (T "PostCRLicenseContent") $ccLink | safeHTML }} {{ printf (T "PostCRLicenseContent") $ccLink | safeHTML }}
</li> </li>
</ul> </ul>
</div> </div>
{{- end }} {{ end }}

View File

@ -1,12 +1,12 @@
{{- with .Site.Params.followMe }} {{ with .Site.Params.followMe }}
<div class="followme"> <div class="followme">
<span>{{ T "PostFollowMe" }}</span> <span>{{ T "PostFollowMe" }}</span>
<div class="social-list"> <div class="social-list">
{{ range . }} {{ range . }}
{{- $vals := split . "||" }} {{ $vals := split . "||" }}
{{- $name := trim (index $vals 0) " " }} {{ $name := trim (index $vals 0) " " }}
{{- $url := trim (index $vals 1) " " }} {{ $url := trim (index $vals 1) " " }}
{{- $icon := trim (index $vals 2) " " }} {{ $icon := trim (index $vals 2) " " }}
<div class="social-item"> <div class="social-item">
<a target="_blank" class="social-link" href="{{ $url }}"> <a target="_blank" class="social-link" href="{{ $url }}">
<span class="icon"> <span class="icon">
@ -15,7 +15,7 @@
<span class="label">{{ $name }}</span> <span class="label">{{ $name }}</span>
</a> </a>
</div> </div>
{{- end }} {{ end }}
</div> </div>
</div> </div>
{{- end }} {{ end }}

View File

@ -1,21 +1,21 @@
{{- with .Site.Params.rewardSets }} {{ with .Site.Params.rewardSets }}
{{- if .enable }} {{ if .enable }}
<div class="reward-container"> <div class="reward-container">
<div>{{- .comment | safeHTML -}}</div> <div>{{ .comment | safeHTML }}</div>
<button> <button>
{{- T "RewardDonate" -}} {{ T "RewardDonate" }}
</button> </button>
<div class="post-reward"> <div class="post-reward">
{{- range $name,$img := .reward }} {{ range $name,$img := .reward }}
{{- $fw := substr $name 0 1 }} {{ $fw := substr $name 0 1 }}
{{- $pay := replace $name $fw ($fw | upper) 1 }} {{ $pay := replace $name $fw ($fw | upper) 1 }}
{{- $payName := T (printf "Reward%s" $pay) }} {{ $payName := T (printf "Reward%s" $pay) }}
<div class="post-reward-item"> <div class="post-reward-item">
<img src="/imgs/img-lazy-loading.gif" data-src="{{ $img }}" alt="{{ $.Site.Params.author }} - {{ $payName }}"> <img src="/imgs/img-lazy-loading.gif" data-src="{{ $img }}" alt="{{ $.Site.Params.author }} - {{ $payName }}">
<span>{{ $payName }}</span> <span>{{ $payName }}</span>
</div> </div>
{{- end }} {{ end }}
</div> </div>
</div> </div>
{{- end }} {{ end }}
{{- end }} {{ end }}

View File

@ -1,9 +1,9 @@
{{- with .Params.tags }} {{ with .Params.tags }}
<div class="post-tags"> <div class="post-tags">
{{ range . }} {{ range . }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize | lower }}"> <a href="{{ "/tags/" | relLangURL }}{{ . | urlize | lower }}">
{{ . }} {{ . }}
</a> </a>
{{- end }} {{ end }}
</div> </div>
{{- end }} {{ end }}

View File

@ -1,27 +1,27 @@
{{ with .ctx }} {{ with .ctx }}
{{- if $.IsHome }} <h2 {{ else }} <h1 {{ end -}} class="post-title" itemprop="name headline"> {{ if $.IsHome }} <h2 {{ else }} <h1 {{ end }} class="post-title" itemprop="name headline">
{{- if and .Weight (gt .Weight 0) }} {{ if and .Weight (gt .Weight 0) }}
<span class="post-sticky-flag" title="{{ T "PostStickyTitle" }}"> <span class="post-sticky-flag" title="{{ T "PostStickyTitle" }}">
<i class="fa fa-thumbtack"></i> <i class="fa fa-thumbtack"></i>
</span> </span>
{{- end }} {{ end }}
{{- if $.IsHome }} {{ if $.IsHome }}
{{- if and (isset .Params "extlink") (ne .Params.Extlink "") }} {{ if and (isset .Params "extlink") (ne .Params.Extlink "") }}
<a href="{{ .Params.Extlink }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external"> <a href="{{ .Params.Extlink }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external">
{{ .Title }} {{ .Title }}
<i class="fa fa-external-link-alt"></i> <i class="fa fa-external-link-alt"></i>
</a> </a>
{{- else }} {{ else }}
<a href="{{ .RelPermalink | relLangURL }}" itemprop="url" class="post-title-link">{{ .Title }}</a> <a href="{{ .RelPermalink | relLangURL }}" itemprop="url" class="post-title-link">{{ .Title }}</a>
{{- end }} {{ end }}
{{- else }} {{ else }}
{{- .Title }} {{ .Title }}
{{- if .Site.Params.postEdit.enable }} {{ if .Site.Params.postEdit.enable }}
{{- $editURL := printf "%s%s" .Site.Params.postEdit.url (path.Clean .File.Path) }} {{ $editURL := printf "%s%s" .Site.Params.postEdit.url (path.Clean .File.Path) }}
<a href="{{ $editURL }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-edit-link" title="{{ T "PostEditTitle" }}"><i class="fa fa-pen-nib"></i></a> <a href="{{ $editURL }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-edit-link" title="{{ T "PostEditTitle" }}"><i class="fa fa-pen-nib"></i></a>
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- if $.IsHome }} </h2> {{ else }} </h1> {{ end -}} {{ if $.IsHome }} </h2> {{ else }} </h1> {{ end }}
{{ $isComment := and (.Scratch.Get "isComment") .Site.Params.waline.comment }} {{ $isComment := and (.Scratch.Get "isComment") .Site.Params.waline.comment }}
<div class="post-meta-container"> <div class="post-meta-container">
<div class="post-meta-items"> <div class="post-meta-items">
@ -39,7 +39,7 @@
</div> </div>
{{ end }} {{ end }}
</div> </div>
{{- if not $.IsHome }} {{ if not $.IsHome }}
<div class="post-meta-items"> <div class="post-meta-items">
{{ partial "post/header_meta/words.html" . }} {{ partial "post/header_meta/words.html" . }}
{{ partial "post/header_meta/readtime.html" . }} {{ partial "post/header_meta/readtime.html" . }}

View File

@ -1,17 +1,17 @@
{{- if .Site.Params.postMeta.categories }} {{ if .Site.Params.postMeta.categories }}
{{- with .Params.categories }} {{ with .Params.categories }}
<span class="post-meta-item"> <span class="post-meta-item">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-folder-open"></i> <i class="far fa-folder-open"></i>
</span> </span>
<span class="post-meta-item-text">{{- print (T "PostCategory") (T "SymbolColon") -}}</span> <span class="post-meta-item-text">{{ print (T "PostCategory") (T "SymbolColon") }}</span>
{{- range (first 1 .) }} {{ range (first 1 .) }}
<span itemprop="about" itemscope itemtype="http://schema.org/Thing"> <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" itemprop="url" rel="index"> <a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" itemprop="url" rel="index">
<span itemprop="name">{{- . -}}</span> <span itemprop="name">{{ . }}</span>
</a> </a>
</span> </span>
{{- end }} {{ end }}
</span> </span>
{{- end }} {{ end }}
{{- end }} {{ end }}

View File

@ -1,13 +1,13 @@
{{- if .Site.Params.postMeta.created }} {{ if .Site.Params.postMeta.created }}
{{ $timeF := .Site.Params.timeFormat }} {{ $timeF := .Site.Params.timeFormat }}
{{ $createdTime := (.Date.Format $timeF) | default (.Date.Format $timeF) }} {{ $createdTime := (.Date.Format $timeF) | default (.Date.Format $timeF) }}
<span class="post-meta-item"> <span class="post-meta-item">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-calendar"></i> <i class="far fa-calendar"></i>
</span> </span>
<span class="post-meta-item-text">{{- print (T "PostPublishDate") (T "SymbolColon") -}}</span> <span class="post-meta-item-text">{{ print (T "PostPublishDate") (T "SymbolColon") }}</span>
<time title="{{ print (T "PostPublishDate") (T "SymbolColon") }}{{ .Date }}" itemprop="dateCreated datePublished" datetime="{{ .Date }}"> <time title="{{ print (T "PostPublishDate") (T "SymbolColon") }}{{ .Date }}" itemprop="dateCreated datePublished" datetime="{{ .Date }}">
{{- .Date.Format .Site.Params.dateFormat -}} {{ .Date.Format .Site.Params.dateFormat }}
</time> </time>
</span> </span>
{{- end }} {{ end }}

View File

@ -1,9 +1,9 @@
{{- if .Site.Params.postMeta.readTime }} {{ if .Site.Params.postMeta.readTime }}
<span class="post-meta-item" title="{{ T "PostReading" }}"> <span class="post-meta-item" title="{{ T "PostReading" }}">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-clock"></i> <i class="far fa-clock"></i>
</span> </span>
<span class="post-meta-item-text">{{- print (T "PostReading") (T "SymbolColon") -}}&asymp;</span> <span class="post-meta-item-text">{{ print (T "PostReading") (T "SymbolColon") }}&asymp;</span>
<span>{{- T "PostReadTime" . -}}</span> <span>{{ T "PostReadTime" . }}</span>
</span> </span>
{{- end }} {{ end }}

View File

@ -1,12 +1,12 @@
{{- if and .Site.Params.postMeta.updated.enable .Site.Params.postMeta.updated.anotherDay }} {{ if and .Site.Params.postMeta.updated.enable .Site.Params.postMeta.updated.anotherDay }}
{{- if and .Lastmod (gt .Lastmod .Date) }} {{ if and .Lastmod (gt .Lastmod .Date) }}
{{ $modTime := .Lastmod.Format .Site.Params.timeFormat }} {{ $modTime := .Lastmod.Format .Site.Params.timeFormat }}
<span class="post-meta-item"> <span class="post-meta-item">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i> <i class="far fa-calendar-check"></i>
</span> </span>
<span class="post-meta-item-text">{{- print (T "PostLastModDate") (T "SymbolColon") -}}</span> <span class="post-meta-item-text">{{ print (T "PostLastModDate") (T "SymbolColon") }}</span>
<time title="{{ print (T "PostLastModTime") (T "SymbolColon") }}{{ $modTime }}" itemprop="dateModified" datetime="{{ $modTime }}">{{- .Lastmod.Format .Site.Params.dateFormat -}}</time> <time title="{{ print (T "PostLastModTime") (T "SymbolColon") }}{{ $modTime }}" itemprop="dateModified" datetime="{{ $modTime }}">{{ .Lastmod.Format .Site.Params.dateFormat }}</time>
</span> </span>
{{- end }} {{ end }}
{{- end }} {{ end }}

View File

@ -1,10 +1,10 @@
{{- $pageViewId := "" }} {{ $pageViewId := "" }}
{{- if .Site.Params.leancloudVisitors.enable }} {{ if .Site.Params.leancloudVisitors.enable }}
{{- $pageViewId = "leancloud-visitors-count" }} {{ $pageViewId = "leancloud-visitors-count" }}
{{- end }} {{ end }}
{{- if .Site.Params.analytics.busuanzi.postViews }} {{ if .Site.Params.analytics.busuanzi.postViews }}
{{- $pageViewId = "busuanzi_value_page_pv" }} {{ $pageViewId = "busuanzi_value_page_pv" }}
{{- end }} {{ end }}
<span class="post-meta-item" title="{{ T "PostViews" }}"> <span class="post-meta-item" title="{{ T "PostViews" }}">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-eye"></i> <i class="far fa-eye"></i>

View File

@ -1,8 +1,8 @@
{{- if .Site.Params.postMeta.wordCount }} {{ if .Site.Params.postMeta.wordCount }}
<span class="post-meta-item" title="{{ T "PostWords" }}"> <span class="post-meta-item" title="{{ T "PostWords" }}">
<span class="post-meta-item-icon"> <span class="post-meta-item-icon">
<i class="far fa-file-word"></i> <i class="far fa-file-word"></i>
</span> </span>
<span class="post-meta-item-text">{{- print (T "PostWords") (T "SymbolColon") -}}</span><span>{{- T "PostWordCount" . -}}</span> <span class="post-meta-item-text">{{ print (T "PostWords") (T "SymbolColon") }}</span><span>{{ T "PostWordCount" . }}</span>
</span> </span>
{{- end }} {{ end }}

View File

@ -1,2 +1,2 @@
{{- partialCached "scripts/global.html" . -}} {{ partialCached "scripts/global.html" . }}
{{- partial "scripts/plugins.html" . -}} {{ partial "scripts/plugins.html" . }}

View File

@ -7,7 +7,7 @@
<script type="text/javascript" src="{{ $pluginJS }}" defer></script> <script type="text/javascript" src="{{ $pluginJS }}" defer></script>
{{ end }} {{ end }}
<script class="next-config" data-name="main" type="application/json">{{ .Scratch.Get "config" -}}</script> <script class="next-config" data-name="main" type="application/json">{{ .Scratch.Get "config" }}</script>
{{/* Core scripts */}} {{/* Core scripts */}}
{{ $config := resources.Get "js/config.js" }} {{ $config := resources.Get "js/config.js" }}

View File

@ -22,28 +22,28 @@
</div> </div>
<!--/noindex--> <!--/noindex-->
<div class="site-overview-wrap sidebar-panel"> <div class="site-overview-wrap sidebar-panel">
{{- partialCached "sidebar/overview.html" . -}} {{ partialCached "sidebar/overview.html" . }}
{{- $custom := .Scratch.Get "sidebar" }} {{ $custom := .Scratch.Get "sidebar" }}
{{- if $custom }} {{ if $custom }}
{{ partialCached $custom . }} {{ partialCached $custom . }}
{{- end }} {{ end }}
</div> </div>
</div> </div>
</div> </div>
{{- if .Site.Params.siteState.statistic.enable }} {{ if .Site.Params.siteState.statistic.enable }}
{{- partial "sidebar/siteinfo.html" . }} {{ partial "sidebar/siteinfo.html" . }}
{{- end }} {{ end }}
{{- if and .Site.Params.backTop.enable .Site.Params.backTop.sidebar }} {{ if and .Site.Params.backTop.enable .Site.Params.backTop.sidebar }}
<div class="sidebar-card-widget back-to-top-card"> <div class="sidebar-card-widget back-to-top-card">
<div class="back-to-top animated" role="button" aria-label="{{ T "BackTop" }}"> <div class="back-to-top animated" role="button" aria-label="{{ T "BackTop" }}">
<i class="fa fa-arrow-up"></i> <i class="fa fa-arrow-up"></i>
<span>0%</span> <span>0%</span>
</div> </div>
</div> </div>
{{- end }} {{ end }}
</aside> </aside>
<div class="sidebar-dimmer"></div> <div class="sidebar-dimmer"></div>

View File

@ -1,14 +1,14 @@
{{- $author := .Site.Params.author }} {{ $author := .Site.Params.author }}
<div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person"> <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
{{- with .Site.Params.avatar.url }} {{ with .Site.Params.avatar.url }}
<img class="site-author-image" itemprop="image" alt="{{ $author }}" <img class="site-author-image" itemprop="image" alt="{{ $author }}"
src="/imgs/img-lazy-loading.gif" data-src="{{ . }}"> src="/imgs/img-lazy-loading.gif" data-src="{{ . }}">
{{- end }} {{ end }}
<p class="site-author-name" itemprop="name">{{ $author }}</p> <p class="site-author-name" itemprop="name">{{ $author }}</p>
<div class="site-description" itemprop="description">{{ .Site.Params.description }}</div> <div class="site-description" itemprop="description">{{ .Site.Params.description }}</div>
</div> </div>
{{- if .Site.Params.siteState.basic }} {{ if .Site.Params.siteState.basic }}
<div class="site-state-wrap site-overview-item animated"> <div class="site-state-wrap site-overview-item animated">
<nav class="site-state"> <nav class="site-state">
<div class="site-state-item site-state-posts"> <div class="site-state-item site-state-posts">
@ -31,62 +31,62 @@
</div> </div>
</nav> </nav>
</div> </div>
{{- end }} {{ end }}
{{- if and .Site.Params.chat.enable (or (or .Site.Params.chatra.enable .Site.Params.tidio.enable) .Site.Params.gitter.enable) }} {{ if and .Site.Params.chat.enable (or (or .Site.Params.chatra.enable .Site.Params.tidio.enable) .Site.Params.gitter.enable) }}
<div class="sidebar-button site-overview-item animated"> <div class="sidebar-button site-overview-item animated">
<button {{ if .Site.Params.gitter.enable }} class="js-gitter-toggle-chat-button" {{ end }}> <button {{ if .Site.Params.gitter.enable }} class="js-gitter-toggle-chat-button" {{ end }}>
{{- if .Site.Params.chat.icon }}<i class="{{ .Site.Params.chat.icon }}"></i>{{ end }} {{ if .Site.Params.chat.icon }}<i class="{{ .Site.Params.chat.icon }}"></i>{{ end }}
{{ .Site.Params.chat.text }} {{ .Site.Params.chat.text }}
</button> </button>
</div> </div>
{{- end }} {{ end }}
<div class="links-of-social site-overview-item animated"> <div class="links-of-social site-overview-item animated">
{{ $si := .Site.Params.socialIcons }} {{ $si := .Site.Params.socialIcons }}
{{ range $key,$val := .Site.Params.socials }} {{ range $key,$val := .Site.Params.socials }}
{{- $vals := split $val "||" }} {{ $vals := split $val "||" }}
{{- $name := trim (index $vals 0) " " }} {{ $name := trim (index $vals 0) " " }}
{{- $url := trim (index $vals 1) " " }} {{ $url := trim (index $vals 1) " " }}
{{- $icon := trim (index $vals 2) " " }} {{ $icon := trim (index $vals 2) " " }}
<span class="links-of-social-item"> <span class="links-of-social-item">
<a href="{{ $url }}" title="{{ $name }} → {{ $url }}" rel="noopener" {{- if and $si.enable $si.transition }} class="hvr-icon-pulse" {{- end }} target="_blank"> <a href="{{ $url }}" title="{{ $name }} → {{ $url }}" rel="noopener" {{ if and $si.enable $si.transition }} class="hvr-icon-pulse" {{ end }} target="_blank">
{{- if $si.enable }} {{ if $si.enable }}
<i class="{{- $icon }} fa-fw {{ if $si.transition }} hvr-icon {{ end }}"></i> <i class="{{ $icon }} fa-fw {{ if $si.transition }} hvr-icon {{ end }}"></i>
{{- end }} {{ end }}
{{- if or (not $si.enable) (not $si.iconsOnly) }} {{ if or (not $si.enable) (not $si.iconsOnly) }}
{{- $name }} {{ $name }}
{{- end }} {{ end }}
</a> </a>
</span> </span>
{{- end }} {{ end }}
</div> </div>
{{- with .Site.Params.creativeCommons }} {{ with .Site.Params.creativeCommons }}
{{- if .sidebar }} {{ if .sidebar }}
<div class="cc-license animated" itemprop="license"> <div class="cc-license animated" itemprop="license">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr $.Site.LanguageCode 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}"> <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr $.Site.LanguageCode 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}">
<img src="/imgs/img-lazy-loading.gif" data-src="/imgs/cc/{{ .size }}/{{ replace .license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}"> <img src="/imgs/img-lazy-loading.gif" data-src="/imgs/cc/{{ .size }}/{{ replace .license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}">
</a> </a>
</div> </div>
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- if .Site.Params.links }} {{ if .Site.Params.links }}
<div class="links-of-blogroll site-overview-item animated"> <div class="links-of-blogroll site-overview-item animated">
<div class="links-of-blogroll-title"> <div class="links-of-blogroll-title">
{{- if .Site.Params.linksSets.icon }} {{ if .Site.Params.linksSets.icon }}
<i class="{{ .Site.Params.linksSets.icon }} fa-fw"></i> <i class="{{ .Site.Params.linksSets.icon }} fa-fw"></i>
{{- end }} {{ end }}
{{- .Site.Params.linksSets.title }} {{ .Site.Params.linksSets.title }}
</div> </div>
<ul class="links-of-blogroll-list"> <ul class="links-of-blogroll-list">
{{- range $key,$val := .Site.Params.links }} {{ range $key,$val := .Site.Params.links }}
{{- $vals := split $val "||" }} {{ $vals := split $val "||" }}
{{- $name := trim (index $vals 0) " " }} {{ $name := trim (index $vals 0) " " }}
{{- $url := trim (index $vals 1) " " }} {{ $url := trim (index $vals 1) " " }}
<li class="links-of-blogroll-item"> <li class="links-of-blogroll-item">
<a href="{{ $url }}" title="{{ $url }}" target="_blank">{{ $name }}</a> <a href="{{ $url }}" title="{{ $url }}" target="_blank">{{ $name }}</a>
</li> </li>
{{- end }} {{ end }}
</ul> </ul>
</div> </div>
{{- end }} {{ end }}

View File

@ -9,8 +9,8 @@
<div class="item-name"><i class="fa-solid fa-calendar-check"></i>{{ T "SiteInfoItems.runTimes" }}</div> <div class="item-name"><i class="fa-solid fa-calendar-check"></i>{{ T "SiteInfoItems.runTimes" }}</div>
<div class="item-count" id="runTimes" data-publishdate="{{ $scratch.Get "last" }}"></div> <div class="item-count" id="runTimes" data-publishdate="{{ $scratch.Get "last" }}"></div>
</div> </div>
{{- if eq .Site.Params.siteState.statistic.plugin "busuanzi" }} {{ if eq .Site.Params.siteState.statistic.plugin "busuanzi" }}
{{- with .Site.Params.analytics.busuanzi }} {{ with .Site.Params.analytics.busuanzi }}
<div class="siteinfo-item"> <div class="siteinfo-item">
<div class="item-name"> <div class="item-name">
<i class="fas {{ .visitorsIcon }}"></i>{{ T "SiteInfoItems.visitors" }} <i class="fas {{ .visitorsIcon }}"></i>{{ T "SiteInfoItems.visitors" }}
@ -23,9 +23,9 @@
</div> </div>
<div class="item-count" id="busuanzi_value_site_pv"><i class="fa fa-sync fa-spin"></i></div> <div class="item-count" id="busuanzi_value_site_pv"><i class="fa fa-sync fa-spin"></i></div>
</div> </div>
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- if eq .Site.Params.siteState.statistic.plugin "51la" }} {{ if eq .Site.Params.siteState.statistic.plugin "51la" }}
<div id="la-siteinfo-widget" style="display: none;"></div> <div id="la-siteinfo-widget" style="display: none;"></div>
<div class="siteinfo-item"> <div class="siteinfo-item">
<div class="item-name"> <div class="item-name">
@ -51,7 +51,7 @@
</div> </div>
<div class="item-count" id="total_site_pv"><i class="fa fa-sync fa-spin"></i></div> <div class="item-count" id="total_site_pv"><i class="fa fa-sync fa-spin"></i></div>
</div> </div>
{{- end }} {{ end }}
<div class="siteinfo-item"> <div class="siteinfo-item">
<div class="item-name"><i class="fa fa-font"></i>{{ T "SiteInfoItems.words" }}</div> <div class="item-name"><i class="fa fa-font"></i>{{ T "SiteInfoItems.words" }}</div>
<div class="item-count" id="wordsCount" data-count="{{ $scratch.Get "totalWords" }}"></div> <div class="item-count" id="wordsCount" data-count="{{ $scratch.Get "totalWords" }}"></div>

View File

@ -12,33 +12,33 @@
<div id="toggle-theme" class="button" title="{{ T "ToolBtns.theme" }}"> <div id="toggle-theme" class="button" title="{{ T "ToolBtns.theme" }}">
<i class="fas fa-adjust"></i> <i class="fas fa-adjust"></i>
</div> </div>
{{- if and .Site.Params.backTop.enable (not .Site.Params.backTop.sidebar) }} {{ if and .Site.Params.backTop.enable (not .Site.Params.backTop.sidebar) }}
<div class="back-to-top" role="button" title="{{ T "ToolBtns.backTop" }}"> <div class="back-to-top" role="button" title="{{ T "ToolBtns.backTop" }}">
<i class="fa fa-arrow-up"></i> <i class="fa fa-arrow-up"></i>
<span>0%</span> <span>0%</span>
</div> </div>
{{- end }} {{ end }}
</div> </div>
{{- if .Site.Params.readingProgress.enable }} {{ if .Site.Params.readingProgress.enable }}
<div class="reading-progress-bar"></div> <div class="reading-progress-bar"></div>
{{- end }} {{ end }}
{{- if .Site.Params.bookmark.enable }} {{ if .Site.Params.bookmark.enable }}
<a role="button" class="book-mark-link book-mark-link-fixed"></a> <a role="button" class="book-mark-link book-mark-link-fixed"></a>
{{- end }} {{ end }}
{{- with .Site.Params.githubBanner }} {{ with .Site.Params.githubBanner }}
{{- if .enable }} {{ if .enable }}
<a href="{{ .permalink }}" rel="noopener external nofollow noreferrer" target="_blank" title="{{ .title }}" class="exturl github-corner"> <a href="{{ .permalink }}" rel="noopener external nofollow noreferrer" target="_blank" title="{{ .title }}" class="exturl github-corner">
<svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg> <svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg>
</a> </a>
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- if .Site.Params.gitter.enable }} {{ if .Site.Params.gitter.enable }}
{{ partial "_thirdparty/chat/gitter.html" . }} {{ partial "_thirdparty/chat/gitter.html" . }}
{{- end }} {{ end }}
<noscript> <noscript>
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div> <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>