🚧 Add footer information in home page.
This commit is contained in:
parent
172479cb0a
commit
a2d3501a4d
@ -154,8 +154,22 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.beian img {
|
||||
display: inline-block;
|
||||
margin: 0 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Font A */
|
||||
.with-love {
|
||||
{{- with $P.footer.icon.color }}
|
||||
color: {{ $P.footer.icon.color }};
|
||||
{{- end }}
|
||||
{{- if $P.footer.icon.animated }}
|
||||
animation: icon-animate 1.33s ease-in-out infinite;
|
||||
{{- end }}
|
||||
}
|
||||
|
||||
/* Font Awesome */
|
||||
.fa-spin {
|
||||
-webkit-animation: fa-spin .8s infinite linear;
|
||||
animation: fa-spin .8s infinite linear;
|
||||
|
@ -172,7 +172,31 @@ params:
|
||||
post: true
|
||||
# You can set a language value if you prefer a translated version of CC license, e.g. deed.zh
|
||||
# CC licenses are available in 39 languages, you can find the specific and correct abbreviation you need on https://creativecommons.org
|
||||
# No setting is required here and can be done by multilanguage
|
||||
# No required in here and can be done by multilanguage
|
||||
# language: deed.zh
|
||||
|
||||
footer:
|
||||
# Specify the year when the site was setup. If not defined, current year will be used.
|
||||
since: 2016
|
||||
|
||||
# Icon between year and copyright info.
|
||||
icon:
|
||||
# Icon name in Font Awesome. See: https://fontawesome.com/icons
|
||||
name: fa-solid fa-heart
|
||||
# If you want to animate the icon, set it to true.
|
||||
animated: true
|
||||
# Change the color of icon, using Hex Code.
|
||||
color: "#FF0000"
|
||||
|
||||
# Powered by Hugo & NexT.
|
||||
powered: true
|
||||
|
||||
# Beian ICP and gongan information for Chinese users. See: https://beian.miit.gov.cn, http://www.beian.gov.cn
|
||||
beian:
|
||||
enable: true
|
||||
icp: 粤ICP备18047355号
|
||||
# The full num of gongan beian which use to query valid.
|
||||
gonganNum: 11010102001808
|
||||
|
||||
|
||||
|
||||
|
@ -44,3 +44,6 @@
|
||||
other = "Tags"
|
||||
[PostReadMore]
|
||||
other = "Read More"
|
||||
|
||||
[FooterPowerby]
|
||||
other = "Power by %s"
|
@ -44,3 +44,6 @@
|
||||
other = "标签"
|
||||
[PostReadMore]
|
||||
other = "阅读全文"
|
||||
|
||||
[FooterPowerby]
|
||||
other = "由 %s 强力驱动"
|
@ -23,9 +23,7 @@
|
||||
</div>
|
||||
</main>
|
||||
<footer class="footer">
|
||||
<div class="footer-inner">
|
||||
{{ partial "partials/footer.html" . }}
|
||||
</div>
|
||||
{{- partial "partials/footer.html" . }}
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
|
@ -1,14 +1,40 @@
|
||||
{{ $ft := .Site.Params.footer }}
|
||||
<footer class="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>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
<div class="copyright">
|
||||
©
|
||||
<span itemprop="copyrightYear">2022</span>
|
||||
<span class="with-love">
|
||||
<i class="fa fa-heart"></i>
|
||||
<span itemprop="copyrightYear">
|
||||
{{- $year := now.Year }}
|
||||
{{- if isset $ft "since" }}
|
||||
{{- if gt $year $ft.since }}
|
||||
{{ $ft.since }} - {{ $year }}
|
||||
{{- else }}
|
||||
{{ $year }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{ $year }}
|
||||
{{- end }}
|
||||
</span>
|
||||
<span class="author" itemprop="copyrightHolder">John Doe</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">
|
||||
由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> &
|
||||
<a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini
|
||||
</a>
|
||||
强力驱动
|
||||
{{ $pb := printf "<a href='https://gohugo.io' target='_blank'>Hugo v%s</a> & <a href='https://github.com/hugo-next' target='_blank'>NexT.%s</a>" hugo.Version .Site.Params.scheme }}
|
||||
{{- printf (T "FooterPowerby") $pb | safeHTML }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
</footer>
|
@ -1661,7 +1661,6 @@ pre code {
|
||||
width: 100%;
|
||||
}
|
||||
.with-love {
|
||||
color: #f00;
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
BIN
static/imgs/gongan.png
Normal file
BIN
static/imgs/gongan.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 869 B |
Loading…
Reference in New Issue
Block a user