🚧 optimization other settings.

This commit is contained in:
凡梦星尘 2022-06-30 08:04:32 +08:00
parent dafea2e479
commit ec5d8419e1
6 changed files with 13 additions and 10 deletions

View File

@ -13,7 +13,6 @@ if (!window.NexT) window.NexT = {};
"copybtn" : {{ .Site.Params.codeblock.copyBtn }},
"bookmark" : {{ .Site.Params.bookmark | jsonify }},
"comments" : {{ .Site.Params.comments | jsonify }},
"mediumzoom" : {{ .Site.Params.mediumzoom }},
"lazyload" : {{ .Site.Params.lazyload }},
"pangu" : {{ .Site.Params.pangu }},
"stickytabs" : {{ .Site.Params.tabs.sticky }},

View File

@ -1,5 +1,6 @@
#!/bin/bash
#
# 本地快速启动脚本
# Quick start in local.
next() {
cat << EOT
@ -12,7 +13,7 @@ next() {
╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝
========================================
NexT version $1
Documentation: https://hugo-next.js.org
Documentation: https://hugo-next.eu.org
========================================
EOT
}

View File

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

View File

@ -1,4 +1,5 @@
{{- with .Site.Params.giscus }}
{{ printf "%t" (isset . "repo") }}
<div class="giscus" style="position: relative;"></div>
<script src="https://giscus.app/client.js"
data-repo="{{ .repo }}"

View File

@ -48,8 +48,8 @@
{{- end }}
-->
*/}}
{{- if .Site.Params.busuanzi.enable }}
{{ with .Site.Params.busuanzi }}
{{- with .Site.Params.busuanzi }}
{{- if .enable }}
<div class="busuanzi-count">
{{- if .visitors }}
<span class="post-meta-item" id="busuanzi_container_site_uv" title="{{ T "VisitorsLabel" }}">
@ -76,12 +76,12 @@
{{- 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 }}
{{ $pb := printf "<a href='https://gohugo.io' target='_blank'>Hugo</a> &amp; <a href='https://github.com/hugo-next/hugo-theme-next' target='_blank'>Hugo NexT.%s</a>" .Site.Params.scheme }}
{{- printf (T "FooterPowerby") $pb | safeHTML }}
</div>
{{- end }}
{{- if $ft.beian.enable }}
{{- with $ft.beian }}
{{- if .enable }}
<div class="beian">
<a href="https://beian.miit.gov.cn" target="_blank">{{ .icp }}</a>
<img src="/imgs/gongan.png" alt="{{ .provinceAbbr }}公网安备">
@ -90,6 +90,7 @@
{{- end }}
{{- end }}
{{- with $ft.vendors }}
{{ if .enable }}
<div class="vendors-list">
{{- range .list }}
<a target="_blank" href="{{ .link }}" title="{{ .name }}">
@ -103,3 +104,4 @@
<span>{{ .title }}</span>
</div>
{{- end }}
{{- end }}

View File

@ -6,7 +6,7 @@
{{- T "RewardDonate" -}}
</button>
<div class="post-reward">
{{- range $name,$img := $.Site.Params.reward }}
{{- range $name,$img := .reward }}
{{- $fw := substr $name 0 1 }}
{{- $pay := replace $name $fw ($fw | upper) 1 }}
{{- $payName := T (printf "Reward%s" $pay) }}