🎨 Merge branch 'develop'

This commit is contained in:
凡梦星尘
2022-06-12 15:34:38 +08:00
182 changed files with 7702 additions and 3249 deletions

View File

@@ -0,0 +1,4 @@
{{- with .Site.Params.laId }}
<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
<script>LA.init({id: "{{ . }}",ck: "{{ . }}",autoTrack:true})</script>
{{- end }}

View File

@@ -0,0 +1,13 @@
{{- with .Site.Params.LiveRe }}
<div id="lv-container" data-id="city" data-uid="{{ .uid }}"></div>
<script type="text/javascript">
(function(d, s) {
var j, e = d.getElementsByTagName(s)[0];
if (typeof LivereTower === 'function') { return; }
j = d.createElement(s);
j.src = '//cdn-city.livere.com/js/embed.dist.js';
j.async = true;
e.parentNode.insertBefore(j, e);
})(document, 'script');
</script>
{{- end }}

View File

@@ -0,0 +1,9 @@
{{- with .Site.Params.utterances }}
<script src="https://utterances.njilc.com/client.js"
repo="{{ .repo }}"
issue-term="{{ .issueTerm }}"
label="{{ .label }}"
crossorigin="anonymous"
theme="{{ .theme }}" async>
</script>
{{- end }}

View File

@@ -0,0 +1,21 @@
{{- with .Site.Params.waline }}
<div id="waline"></div>
<link rel="stylesheet" href="//unpkg.com/@waline/client@v2/dist/waline.css"/>
<script src="//unpkg.com/@waline/client@v2/dist/waline.js"></script>
<script type="text/javascript">
const locale = {
placeholder: "{{ .placeholder }}"
};
Waline.init({
locale,
el: "#waline",
emoji: {{ .emoji }},
imageUploader: {{ .imgUploader }},
wordLimit: {{ .wordLimit }},
requiredMeta: {{ .requiredMeta }},
serverURL: "{{ .serverURL }}",
lang: "{{ $.Lang }}"
});
</script>
{{- end }}

View File

@@ -0,0 +1,5 @@
{{- with .Site.Params.addThisId }}
<div class="addthis_inline_share_toolbox" style="text-align: center;">
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ . }}" async="async"></script>
</div>
{{- end }}

View File

@@ -0,0 +1,40 @@
{{- $root := . -}}
{{- with .Site.Params.comments }}
{{- if .enable }}
{{- $tc := and .storage (gt (len .nav) 1) }}
{{- $active := .active }}
{{- $fc := .active }}
{{- $sc := "" }}
{{- $sn := "" }}
<div 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 }}
<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 }}
</div>
<div class="comment-wrap">
{{ $cp := "_thirdparty/comment/%s.html" }}
{{- if $tc }}
{{- range $sn }}
<div>
{{- partial (printf $cp (lower .name)) $root }}
</div>
{{- end }}
{{- else }}
<div>{{- partial (printf $cp $fc) $root }}</div>
{{- end }}
</div>
</div>
{{- end }}
{{- end }}

View File

@@ -1,38 +1,106 @@
{{ $ft := .Site.Params.footer }}
<div class="footer-inner">
{{- $ba := $ft.beian }}
{{- if $ba.enable }}
<div class="beian">
<a href="https://beian.miit.gov.cn" target="_blank" title="">{{ $ba.icp }}</a>
{{- with $ba.gonganNum }}
<img src="/imgs/gongan.png" alt="京公网安备">
<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{ . }}" target="_blank" title="">{{ printf "京公网安备 %d 号" . }}</a>
{{- $ft := .Site.Params.footer }}
<div class="copyright">
&copy;
<span itemprop="copyrightYear">
{{- $year := now.Year }}
{{- if isset $ft "since" }}
{{- if gt $year $ft.since }}
{{ $ft.since }} - {{ $year }}
{{- else }}
{{ $year }}
{{- end }}
</div>
{{- end }}
<div class="copyright">
&copy;
<span itemprop="copyrightYear">
{{- $year := now.Year }}
{{- if isset $ft "since" }}
{{- if gt $year $ft.since }}
{{ $ft.since }} - {{ $year }}
{{- else }}
{{ $year }}
{{- end }}
{{- else }}
{{ $year }}
{{- end }}
{{- else }}
{{ $year }}
{{- end }}
</span>
<span class="with-love">
<i class="{{ $ft.icon.name }}"></i>
</span>
<span class="author" itemprop="copyrightHolder">{{ $ft.copyright | default .Site.Params.author }}</span>
</div>
{{/* TODO
<!--
{{- if config.symbols_count_time.total_symbols or config.symbols_count_time.total_time }}
<div class="wordcount">
{{- if config.symbols_count_time.total_symbols }}
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="fa fa-chart-line"></i>
</span>
<span class="with-love">
<i class="{{ $ft.icon.name }}"></i>
</span>
<span class="author" itemprop="copyrightHolder">{{ .Site.Params.author }}</span>
</div>
{{- if $ft.powered }}
<div class="powered-by">
{{ $pb := printf "<a href='https://gohugo.io' target='_blank'>Hugo v%s</a> &amp; <a href='https://github.com/hugo-next' target='_blank'>NexT.%s</a>" hugo.Version .Site.Params.scheme }}
{{- printf (T "FooterPowerby") $pb | safeHTML }}
</div>
{{- if .Site.Params.symbols_count_time.item_text_total }}
<span>{{ __('symbols_count_time.count_total') + __('symbol.colon') }}</span>
{{- end }}
<span title="{{ __('symbols_count_time.count_total') }}">{{ symbolsCountTotal(site) }}</span>
</span>
{{- end }}
</div>
{{- if config.symbols_count_time.total_time }}
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="fa fa-coffee"></i>
</span>
{{- if .Site.Params.symbols_count_time.item_text_total }}
<span>{{ __('symbols_count_time.time_total') }} &asymp;</span>
{{- end }}
<span title="{{ __('symbols_count_time.time_total') }}">{{ symbolsTimeTotal(site, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes')) }}</span>
</span>
{{- end }}
</div>
{{- end }}
-->
*/}}
{{- if .Site.Params.busuanzi.enable }}
{{ with .Site.Params.busuanzi }}
<div class="busuanzi-count">
{{- if .visitors }}
<span class="post-meta-item" id="busuanzi_container_site_uv" title="{{ T "VisitorsLabel" }}">
<span class="post-meta-item-icon">
<i class="{{ .visitorsIcon }}"></i>
</span>
<span class="site-uv" >
<span id="busuanzi_value_site_uv"></span>
</span>
</span>
{{- end }}
{{- if .views }}
<span class="post-meta-item" id="busuanzi_container_site_pv" title="{{ T "PageViewsLabel" }}">
<span class="post-meta-item-icon">
<i class="{{ .viewsIcon }}"></i>
</span>
<span class="site-pv">
<span id="busuanzi_value_site_pv"></span>
</span>
</span>
{{- end }}
</div>
{{- end }}
{{- end }}
{{- if $ft.powered }}
<div class="powered-by">
{{ $pb := printf "<a href='https://gohugo.io' target='_blank'>Hugo</a> &amp; <a href='https://github.com/hugo-next' target='_blank'>NexT.%s</a>" .Site.Params.scheme }}
{{- printf (T "FooterPowerby") $pb | safeHTML }}
</div>
{{- end }}
{{- if $ft.beian.enable }}
{{- with $ft.beian }}
<div class="beian">
<a href="https://beian.miit.gov.cn" target="_blank">{{ .icp }}</a>
<img src="/imgs/gongan.png" alt="{{ .provinceAbbr }}公网安备">
<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{ .gonganNum }}" target="_blank">{{ .provinceAbbr }}公网安备 {{ .gonganNum }} 号</a>
</div>
{{- end }}
{{- end }}
{{- with $ft.vendors }}
<div class="vendors-list">
{{- range .list }}
<a target="_blank" href="{{ .link }}" title="{{ .name }}">
{{- if .img }}
{{ $img := split .img "||" }}
<img src="{{- trim (index $img 0) " " }}" width="{{- trim (index $img 1) " " -}}px" alt="{{ .name }}" />
{{- else }}
{{ .name }}
{{- end }}
</a>
{{- end }}
<span>{{ .title }}</span>
</div>
{{- end }}

View File

@@ -1,4 +1,8 @@
{{- partial "head/favicon.html" . }}
{{- partial "head/open_graph.html" . }}
{{ partial "head/css.html" . }}
{{- partial "head/meta.html" . }}
{{- partial "head/opengraph.html" . }}
{{- partial "head/twitter.html" . }}
{{- partial "head/googleplus.html" . }}
{{- partial "head/facebook.html" . }}
{{ partial "head/verify.html" . }}
{{- partial "head/style.html" . }}
{{- partial "head/analytics.html" . }}

View File

@@ -0,0 +1 @@
{{- partial "_thirdparty/analytics/51la.html" . }}

View File

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

View File

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

View File

@@ -0,0 +1,22 @@
<meta itemprop="name" content="{{ .Title }}" />
<meta itemprop="description" content="{{ .Description | default .Site.Params.description }}" />
{{- if .IsPage }}
{{- with .Date }}
<meta itemprop="datePublished" {{ . }} />
{{- end }}
{{- with .Lastmod }}
<meta itemprop="dateModified" {{ . }} />
{{- end }}
{{- end }}
{{- $img := .Site.Params.customLogo | default .Site.Params.avatar.url }}
{{- if and .IsPage (isset .Params "images") }}
{{- $img := index .Params.images 0 }}
{{- end }}
{{- .Scratch.Set "metaImg" $img }}
<meta itemprop="image" content="{{ $img | absURL }}" />
<meta itemprop="keywords" content="{{ if and .IsPage (isset .Params "tags")}}{{ delimit .Params.tags "," }}{{ else }}{{ .Site.Params.keywords }}{{ end }}" />
{{- if .Site.Params.darkmode }}
<meta name="theme-color" content="{{ .Site.Params.themeColor.dark }}" media="(prefers-color-scheme: dark)" />
{{- else }}
<meta name="theme-color" content="{{ .Site.Params.themeColor.light }}" media="(prefers-color-scheme: light)" />
{{- end }}

View File

@@ -0,0 +1,17 @@
{{- if .Site.Params.openGraph.enable }}
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:title" content="{{ .Title | default .Site.Title }}" />
<meta property="og:description" content="{{ .Description | default .Site.Params.Description }}" />
<meta property="og:image" content="{{ .Scratch.Get "metaImg" }}" />
<meta property="og:image:width" content="312" />
<meta property="og:image:height" content="312" />
<meta property="og:image:type" content="image/jpeg/png/svg/jpg" />
<meta property="og:url" content="{{ .Permalink }}"/>
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:locale" content="{{ .Site.LanguageCode }}"/>
{{- if .IsPage }}
<meta property="article:author" content="{{ .Params.Author | default .Site.Params.Author }}" />
<meta property="article:published_time" content="{{ .Date }}" />
<meta property="article:modified_time" content="{{ .Lastmod }}" />
{{- end }}
{{- end }}

View File

@@ -0,0 +1,25 @@
<!-- Plugin style files -->
{{- $cssRes := .Site.Data.resources.css }}
{{- $vendor := .Site.Params.vendors.plugins }}
{{- $vendorCDN := .Scratch.Get "pluginCDN" }}
{{- range $css := $cssRes }}
{{- $pluginCSS := $vendorCDN }}
{{- $npm := $css.name }}
{{- $file := $css.file }}
{{- if eq $vendor "cdnjs" }}
{{- with $css.alias }}
{{- $npm = . }}
{{- end }}
{{- $file = replaceRE `(dist|lib|source\/js)\/` "" $css.file }}
{{- end }}
{{- $pluginCSS = replace $pluginCSS "${name}" $npm }}
{{- $pluginCSS = replace $pluginCSS "${version}" $css.version }}
{{- $pluginCSS = replace $pluginCSS "${file}" $file }}
<link rel="stylesheet" href="{{ $pluginCSS }}">
{{- end }}
<!-- Main Style file -->
{{- $scss := resources.Get "css/main.scss" }}
{{- $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }}
{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
<link rel="stylesheet" href="/css/hover.css">

View File

@@ -0,0 +1,9 @@
{{- with .Site.Params.openGraph.twitter }}
{{- $img := $.Params.openGraph.twitter.image | default ($.Scratch.Get "metaImg") }}
<meta name="twitter:card" content="summary_large_image"/>
<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:image" content="{{ $img | absURL }}"/>
<meta name="twitter:title" content="{{ $.Page.Title }}"/>
<meta name="twitter:site" content="@{{ .site }}"/>
{{ end }}

View File

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

View File

@@ -26,7 +26,6 @@
</div>
</div>
<nav class="site-nav">
{{ partial "partials/menus.html" . }}
</nav>
</div>
<div class="toggle sidebar-toggle" role="button">
@@ -34,5 +33,4 @@
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
{{ partial "header/sidebar.html" . }}
<div class="sidebar-dimmer"></div>

View File

@@ -0,0 +1,36 @@
{{ $title := .Site.Title }}
<div class="site-brand-container">
<div class="site-nav-toggle">
<div class="toggle" aria-label="{{ T "NavToggleLabel" }}" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
</div>
<div class="site-meta">
{{- if and .Site.Params.customLogo (eq .Site.Params.scheme "Muse") }}
<img class="custom-logo-image" src="{{ .Site.Params.customLogo }}" alt="{{ $title }}">
{{- end }}
<a href="{{ .Site.BaseURL }}" class="brand" rel="start">
<i class="logo-line"></i>
<h1 class="site-title">{{ $title }}</h1>
<i class="logo-line"></i>
</a>
{{ if isset .Site.Params "subtitle" }}
<p class="site-subtitle" itemprop="description">{{ .Site.Params.subtitle }}</p>
{{- end }}
{{- 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 }}">
{{- end }}
</div>
<div class="site-nav-right">
<div class="toggle popup-trigger">
{{ if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }}
<i class="fa fa-search fa-fw fa-lg"></i>
{{- end }}
</div>
</div>
</div>

View File

@@ -0,0 +1,26 @@
{{- $ms := .Site.Params.menuSets }}
{{- $curP := .Page }}
<nav class="site-nav">
<ul class="main-menu menu">
{{- range $curP.Site.Menus.main }}
{{- $active := or ($curP.IsMenuCurrent "main" .) ($curP.HasMenuCurrent "main" .) }}
{{- $active = or $active (eq .URL "/")}}
<li class="menu-item menu-item-{{ .Identifier }}">
<a href="{{ .URL }}" 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 and $ms.badges (eq .Identifier "archives" ) }}
<span class="badge">{{ $.Scratch.Get "postsCount" }}</span>
{{- end }}
</a>
</li>
{{- end }}
{{- if or .Site.Params.algoliaSearch.enable .Site.Params.localSearch.enable }}
<li class="menu-item menu-item-search">
<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" }}
</a>
</li>
{{- end }}
</ul>
</nav>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,9 @@
{{- with .Params.tags }}
{{- if gt (len .) 0 }}
<div class="post-tags">
{{ range . }}
<a href="{{ . }}">{{ . }}</a>
{{- end }}
</div>
{{- end }}
{{- end }}

View File

@@ -0,0 +1,39 @@
{{ with .ctx }}
{{- if $.IsHome }} <h2 {{ else }} <h1 {{ end -}} class="post-title" itemprop="name headline">
{{- if and .Weight (gt .Weight 0) }}
<span class="post-sticky-flag" title="{{ T "PostStickyTitle" }}">
<i class="fa fa-thumbtack"></i>
</span>
{{- end }}
{{- if $.IsHome }}
{{- 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">
{{ .Title }}
<i class="fa fa-external-link-alt"></i>
</a>
{{- else }}
<a href="{{ .Permalink }}" itemprop="url" class="post-title-link">{{ .Title }}</a>
{{- end }}
{{- else }}
{{- .Title }}
{{- if .Site.Params.postEdit.enable }}
{{- $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>
{{- end }}
{{- end }}
{{- if $.IsHome }} </h2> {{ else }} </h1> {{ end -}}
<div class="post-meta-container">
<div class="post-meta-items">
{{ partial "post/header_meta/created_date.html" . }}
{{ partial "post/header_meta/update_date.html" . }}
{{ partial "post/header_meta/categories.html" . }}
</div>
{{- if not $.IsHome }}
<div class="post-meta-items">
{{ partial "post/header_meta/words.html" . }}
{{ partial "post/header_meta/readtime.html" . }}
{{ partial "post/header_meta/views.html" . }}
</div>
{{ end }}
</div>
{{ end }}

View File

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

View File

@@ -0,0 +1,13 @@
{{- if .Site.Params.postMeta.created }}
{{ $timeF := .Site.Params.timeFormat }}
{{ $createdTime := (.Date.Format $timeF) | default (.Date.Format $timeF) }}
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</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 }}">
{{- .Date.Format .Site.Params.dateFormat -}}
</time>
</span>
{{- end }}

View File

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

View File

@@ -0,0 +1,12 @@
{{- if and .Site.Params.postMeta.updated.enable .Site.Params.postMeta.updated.anotherDay }}
{{- if and .Lastmod (gt .Lastmod .Date) }}
{{ $modTime := .Lastmod.Format .Site.Params.timeFormat }}
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</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>
</span>
{{- end }}
{{- end }}

View File

@@ -0,0 +1,27 @@
{{- if .Site.Params.leancloudVisitors.enable }}
<span id="{{ .Permalink }}" class="post-meta-item leancloud_visitors" data-flag-title="{{ .Title }}" title="{{ T "PostViews" }}">
<span class="post-meta-item-icon">
<i class="far fa-eye"></i>
</span>
<span class="post-meta-item-text">{{- print (T "PostViews") (T "SymbolColon") -}}</span>
<span class="leancloud-visitors-count"></span>
</span>
{{- end }}
{{- if .Site.Params.firestore.enable }}
<span class="post-meta-item" title="{{ T "PostViews" }}">
<span class="post-meta-item-icon">
<i class="far fa-eye"></i>
</span>
<span class="post-meta-item-text">{{ print (T "PostViews") (T "SymbolColon") }}</span>
<span class="firestore-visitors-count"></span>
</span>
{{- end }}
{{- if and .Site.Params.busuanzi.enable .Site.Params.busuanzi.postViews }}
<span class="post-meta-item" title="{{ T "PostViews" }}" id="busuanzi_container_page_pv">
<span class="post-meta-item-icon">
<i class="{{ .Site.Params.busuanzi.postViewsIcon }}"></i>
</span>
<span class="post-meta-item-text">{{ print (T "PostViews") (T "SymbolColon") }}</span>
<span id="busuanzi_value_page_pv"><i class="fa fa-sync fa-spin"></i></span>
</span>
{{- end }}

View File

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

View File

@@ -0,0 +1,97 @@
<!-- Plugin scripts files -->
{{- $jsRes := .Site.Data.resources.js }}
{{- $vendor := .Site.Params.vendors.plugins }}
{{- $vendorCDN := .Scratch.Get "pluginCDN" }}
{{- range $js := $jsRes }}
{{- $pluginJS := $vendorCDN }}
{{- $npm := $js.name }}
{{- $file := $js.file }}
{{- if eq $vendor "cdnjs" }}
{{- with $js.alias }}
{{- $npm = . }}
{{- end }}
{{- $file = replaceRE `(dist|lib|source\/js)\/` "" $js.file }}
{{- end }}
{{- $pluginJS = replace $pluginJS "${name}" $npm }}
{{- $pluginJS = replace $pluginJS "${version}" $js.version }}
{{- $pluginJS = replace $pluginJS "${file}" $file }}
<script type="text/javascript" src="{{ $pluginJS }}"></script>
{{- end }}
<script class="next-config" data-name="main" type="application/json">
{
"hostname": "theme-next.js.org",
"root": "/",
"images": "/images",
"scheme": "Gemini",
"darkmode": true,
"version": "8.12.1",
"exturl": true,
"sidebar":
{
"position": "left",
"display": "post",
"padding": 18,
"offset": 12
},
"copycode":
{
"enable": true,
"style": "default"
},
"bookmark":
{
"enable": false,
"color": "#222",
"save": "auto"
},
"mediumzoom": true,
"lazyload": false,
"pangu": false,
"comments":
{
"style": "tabs",
"active": null,
"storage": true,
"lazyload": true,
"nav": null
},
"stickytabs": false,
"motion":
{
"enable": false,
"async": false,
"transition":
{
"post_block": "fadeIn",
"post_header": "fadeInDown",
"post_body": "fadeInDown",
"coll_header": "fadeInLeft",
"sidebar": "fadeInUp"
}
},
"prism": false,
"i18n":
{
"placeholder": "Searching...",
"empty": "We didn't find any results for the search: ${query}",
"hits_time": "${hits} results found in ${time} ms",
"hits": "${hits} results found"
},
"path": "/search.json",
"localsearch":
{
"enable": true,
"trigger": "auto",
"top_n_per_article": 1,
"unescape": false,
"preload": false
}
}
</script>
{{ $config := resources.Get "js/config.js" }}
{{ $boot := resources.Get "js/next-boot.js" }}
{{ $utils := resources.Get "js/utils.js" }}
{{ $alljs := (slice $config $boot $utils) | resources.Concat "js/all.js"}}
<script defer src="{{ $alljs.RelPermalink }}"></script>

View File

@@ -0,0 +1,37 @@
<div class="toggle sidebar-toggle" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
<aside class="sidebar">
{{- $toc := and (isset .Params "toc") .Params.toc }}
<div class="sidebar-inner {{ if $toc }}sidebar-nav-active sidebar-toc-active{{ else }}sidebar-overview-active{{ end }}">
<ul class="sidebar-nav">
<li class="sidebar-nav-toc">
{{ T "TableOfContents" }}
</li>
<li class="sidebar-nav-overview">
{{ T "SiteOverview" }}
</li>
</ul>
<div class="sidebar-panel-container">
<!--noindex-->
<div class="post-toc-wrap sidebar-panel">
{{- if $toc }}
<div class="post-toc animated">{{ .TableOfContents }}</div>
{{- end }}
</div>
<!--/noindex-->
<div class="site-overview-wrap sidebar-panel">
{{ partial "sidebar/overview" . }}
</div>
</div>
{{- if and .Site.Params.backTop.enable .Site.Params.backTop.sidebar }}
<div class="back-to-top animated" role="button" aria-label="{{ T "BackTop" }}">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
{{- end }}
</div>
</aside>
<div class="sidebar-dimmer"></div>

View File

@@ -0,0 +1 @@
{{ .TableOfContents }}

View File

@@ -0,0 +1,93 @@
{{- $author := .Site.Params.author }}
<div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
{{- with .Site.Params.avatar.url }}
<img class="site-author-image" itemprop="image" alt="{{ $author }}"
src="{{ . }}">
{{- end }}
<p class="site-author-name" itemprop="name">{{ $author }}</p>
<div class="site-description" itemprop="description">{{ .Site.Params.description }}</div>
</div>
{{- if .Site.Params.siteState }}
<div class="site-state-wrap site-overview-item animated">
<nav class="site-state">
<div class="site-state-item site-state-posts">
<a href="{{ "/posts/" | relLangURL }}">
<span class="site-state-item-count">{{ .Scratch.Get "postsCount" }}</span>
<span class="site-state-item-name">{{ T "SbPostsLable" }}</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="{{ "/categories/" | relLangURL }}">
<span class="site-state-item-count">{{ .Scratch.Get "catsCount" }}</span>
<span class="site-state-item-name">{{ T "SbCatesTitle" }}</span>
</a>
</div>
<div class="site-state-item site-state-tags">
<a href="{{ "/tags/" | relLangURL }}">
<span class="site-state-item-count">{{ .Scratch.Get "tagsCount" }}</span>
<span class="site-state-item-name">{{ T "SbTagsTitle" }}</span>
</a>
</div>
</nav>
</div>
{{- end }}
{{- 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">
<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 }}
{{ .Site.Params.chat.text }}
</button>
</div>
{{- end }}
<div class="links-of-social site-overview-item animated">
{{ $si := .Site.Params.socialIcons }}
{{ range $key,$val := .Site.Params.socials }}
{{- $vals := split $val "||" }}
{{- $name := trim (index $vals 0) " " }}
{{- $url := trim (index $vals 1) " " }}
{{- $icon := trim (index $vals 2) " " }}
<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">
{{- if $si.enable }}
<i class="{{- $icon }} fa-fw {{ if $si.transition }} hvr-icon {{ end }}"></i>
{{- end }}
{{- if or (not $si.enable) (not $si.iconsOnly) }}
{{- $name }}
{{- end }}
</a>
</span>
{{- end }}
</div>
{{- $lang := .Scratch.Get "lang" }}
{{- with .Site.Params.creativeCommons }}
{{- if .sidebar }}
<div class="cc-license animated" itemprop="license">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.{{ substr $lang 0 2 }}" class="cc-opacity" rel="noopener" target="_blank" title="{{ T "CCLinkTitle" }}">
<img src="/imgs/cc/{{ .size }}/{{ replace .license "-" "_" }}.svg" alt="{{ T "CCLinkTitle" }}">
</a>
</div>
{{- end }}
{{- end }}
{{- if .Site.Params.links }}
<div class="links-of-blogroll site-overview-item animated">
<div class="links-of-blogroll-title">
{{- if .Site.Params.linksSets.icon }}
<i class="{{ .Site.Params.linksSets.icon }} fa-fw"></i>
{{- end }}
{{- .Site.Params.linksSets.title }}
</div>
<ul class="links-of-blogroll-list">
{{- range $key,$val := .Site.Params.links }}
{{- $vals := split $val "||" }}
{{- $name := trim (index $vals 0) " " }}
{{- $url := trim (index $vals 1) " " }}
<li class="links-of-blogroll-item">
<a href="{{ $url }}" title="{{ $url }}" target="_blank">{{ $name }}</a>
</li>
{{- end }}
</ul>
</div>
{{- end }}

View File

@@ -0,0 +1,26 @@
{{- if and .Site.Params.backTop.enable (not .Site.Params.backTop.sidebar) }}
<div class="back-to-top" role="button" aria-label="{{ T "BackTopLabel" }}">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
{{- end }}
{{- if .Site.Params.readingProgress.enable }}
<div class="reading-progress-bar"></div>
{{- end }}
{{- if .Site.Params.bookmark.enable }}
<a role="button" class="book-mark-link book-mark-link-fixed"></a>
{{- end }}
{{- with .Site.Params.githubBanner }}
{{- if .enable }}
<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>
</a>
{{- end }}
{{- end }}
<noscript>
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>