add footer
This commit is contained in:
15
hugo.toml
15
hugo.toml
@ -19,24 +19,27 @@ path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
|
|||||||
pre = "fa-solid fa-house"
|
pre = "fa-solid fa-house"
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
theme_version = "5.2.0"
|
||||||
|
|
||||||
[[params.social]]
|
[params.social]
|
||||||
|
name = "Yifan"
|
||||||
|
url = "https://www.yifan.com"
|
||||||
|
[[params.social.links]]
|
||||||
type = "github"
|
type = "github"
|
||||||
id = "yourusername" # 或直接使用 url = "https://github.com/yourusername"
|
id = "yourusername" # 或直接使用 url = "https://github.com/yourusername"
|
||||||
icon = "fab fa-github"
|
icon = "fab fa-github"
|
||||||
|
|
||||||
[[params.social]]
|
[[params.social.links]]
|
||||||
type = "twitter"
|
type = "twitter"
|
||||||
id = "yourhandle"
|
id = "yourhandle"
|
||||||
icon = "fab fa-twitter"
|
icon = "fab fa-twitter"
|
||||||
|
|
||||||
[[params.social]]
|
[[params.social.links]]
|
||||||
type = "email"
|
type = "email"
|
||||||
id = "your.email@example.com" # 会被自动分割处理
|
id = "your.email@example.com" # 会被自动分割处理
|
||||||
icon = "fas fa-envelope"
|
icon = "fas fa-envelope"
|
||||||
|
|
||||||
[[params.social]]
|
[[params.social.links]]
|
||||||
type = "rss"
|
type = "rss"
|
||||||
icon = "fas fa-rss"
|
icon = "fas fa-rss"
|
||||||
noblank = true # 不在新窗口打开
|
noblank = true # 不在新窗口打开
|
||||||
|
|
@ -18,3 +18,9 @@ search:
|
|||||||
panel:
|
panel:
|
||||||
lastmod: "Recently Updated"
|
lastmod: "Recently Updated"
|
||||||
trending_tags: "Trending Tags"
|
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:
|
panel:
|
||||||
lastmod: "最近更新"
|
lastmod: "最近更新"
|
||||||
trending_tags: "热门标签"
|
trending_tags: "热门标签"
|
||||||
|
|
||||||
|
copyright:
|
||||||
|
brief: "版权所有"
|
||||||
|
verbose: "版权所有"
|
||||||
|
|
||||||
|
meta: "由 :PLATFORM 提供支持,主题 :THEME"
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- tail -->
|
<!-- tail -->
|
||||||
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
||||||
|
{{ partialCached "footer.html" . }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
<i class="fas fa-adjust"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{{ if .Site.Params.social }}
|
{{ if .Site.Params.social.links }}
|
||||||
<span class="icon-border"></span>
|
<span class="icon-border"></span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ range .Site.Params.social }}
|
{{ range .Site.Params.social.links }}
|
||||||
{{ $url := "" }}
|
{{ $url := "" }}
|
||||||
{{ $rel := "" }}
|
{{ $rel := "" }}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user