add footer
This commit is contained in:
13
hugo.toml
13
hugo.toml
@ -19,24 +19,27 @@ path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
|
||||
pre = "fa-solid fa-house"
|
||||
|
||||
[params]
|
||||
theme_version = "5.2.0"
|
||||
|
||||
[[params.social]]
|
||||
[params.social]
|
||||
name = "Yifan"
|
||||
url = "https://www.yifan.com"
|
||||
[[params.social.links]]
|
||||
type = "github"
|
||||
id = "yourusername" # 或直接使用 url = "https://github.com/yourusername"
|
||||
icon = "fab fa-github"
|
||||
|
||||
[[params.social]]
|
||||
[[params.social.links]]
|
||||
type = "twitter"
|
||||
id = "yourhandle"
|
||||
icon = "fab fa-twitter"
|
||||
|
||||
[[params.social]]
|
||||
[[params.social.links]]
|
||||
type = "email"
|
||||
id = "your.email@example.com" # 会被自动分割处理
|
||||
icon = "fas fa-envelope"
|
||||
|
||||
[[params.social]]
|
||||
[[params.social.links]]
|
||||
type = "rss"
|
||||
icon = "fas fa-rss"
|
||||
noblank = true # 不在新窗口打开
|
||||
|
@ -18,3 +18,9 @@ search:
|
||||
panel:
|
||||
lastmod: "Recently Updated"
|
||||
trending_tags: "Trending Tags"
|
||||
|
||||
copyright:
|
||||
brief: "All rights reserved"
|
||||
verbose: "All rights reserved"
|
||||
|
||||
meta: "Powered by :PLATFORM with :THEME theme"
|
||||
|
@ -18,3 +18,9 @@ search:
|
||||
panel:
|
||||
lastmod: "最近更新"
|
||||
trending_tags: "热门标签"
|
||||
|
||||
copyright:
|
||||
brief: "版权所有"
|
||||
verbose: "版权所有"
|
||||
|
||||
meta: "由 :PLATFORM 提供支持,主题 :THEME"
|
||||
|
@ -32,6 +32,7 @@
|
||||
<div class="row">
|
||||
<!-- tail -->
|
||||
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
||||
{{ partialCached "footer.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
42
layouts/partials/footer.html
Normal file
42
layouts/partials/footer.html
Normal file
@ -0,0 +1,42 @@
|
||||
<!-- The Footer -->
|
||||
<footer
|
||||
aria-label="Site Info"
|
||||
class="
|
||||
d-flex flex-column justify-content-center text-muted
|
||||
flex-lg-row justify-content-lg-between align-items-lg-center pb-lg-3
|
||||
"
|
||||
>
|
||||
<p>
|
||||
©
|
||||
<time>{{ now.Year }}</time>
|
||||
|
||||
{{ with .Site.Params.social }}
|
||||
{{ if .url }}
|
||||
<a href="{{ .url }}">{{ .name }}</a>.
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<span
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="top"
|
||||
title="{{ T "copyright.verbose" }}"
|
||||
>
|
||||
{{- T "copyright.brief" -}}
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{- $platform := `<a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>` -}}
|
||||
|
||||
{{- $theme := printf `<a
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="top"
|
||||
title="v%s"
|
||||
href="https://github.com/cotes2020/jekyll-theme-chirpy"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Chirpy</a>` .Site.Params.theme_version -}}
|
||||
|
||||
{{ T "meta" | replaceRE ":PLATFORM" $platform | replaceRE ":THEME" $theme | safeHTML }}
|
||||
</p>
|
||||
</footer>
|
@ -37,12 +37,12 @@
|
||||
<i class="fas fa-adjust"></i>
|
||||
</button>
|
||||
|
||||
{{ if .Site.Params.social }}
|
||||
{{ if .Site.Params.social.links }}
|
||||
<span class="icon-border"></span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range .Site.Params.social }}
|
||||
{{ range .Site.Params.social.links }}
|
||||
{{ $url := "" }}
|
||||
{{ $rel := "" }}
|
||||
|
||||
|
Reference in New Issue
Block a user