fix(git): git info in footer
This commit is contained in:
@@ -20,6 +20,22 @@
|
|||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
color: $global-font-secondary-color-dark;
|
color: $global-font-secondary-color-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $single-link-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $single-link-color-dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $single-link-hover-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $single-link-hover-color-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-info-license {
|
.post-info-license {
|
||||||
@@ -32,10 +48,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.post-info-md {
|
.post-info-md {
|
||||||
|
font-size: 0.8rem;
|
||||||
width: 8rem;
|
width: 8rem;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
font-size: 0.8rem;
|
|
||||||
color: $single-link-color;
|
color: $single-link-color;
|
||||||
|
|
||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ themesDir = "../.."
|
|||||||
# whether to use robots.txt
|
# whether to use robots.txt
|
||||||
# 是否使用 robots.txt
|
# 是否使用 robots.txt
|
||||||
enableRobotsTXT = true
|
enableRobotsTXT = true
|
||||||
# whether to use git commit log to generate lastmod record
|
# whether to use git commit log
|
||||||
# 是否使用 git 信息来生成文章的上次修改时间
|
# 是否使用 git 信息
|
||||||
enableGitInfo = false
|
enableGitInfo = true
|
||||||
# whether to use emoji code
|
# whether to use emoji code
|
||||||
# 是否使用 emoji 代码
|
# 是否使用 emoji 代码
|
||||||
enableEmoji = true
|
enableEmoji = true
|
||||||
@@ -67,8 +67,6 @@ enableEmoji = true
|
|||||||
keywords = ["Theme", "Hugo"]
|
keywords = ["Theme", "Hugo"]
|
||||||
# site default theme ("light", "dark", "auto")
|
# site default theme ("light", "dark", "auto")
|
||||||
defaultTheme = "auto"
|
defaultTheme = "auto"
|
||||||
# public git repo url to link lastmod git commit only then enableGitInfo is true
|
|
||||||
gitRepo = ""
|
|
||||||
# Home Page Info
|
# Home Page Info
|
||||||
[languages.en.params.home]
|
[languages.en.params.home]
|
||||||
# Home Page Profile
|
# Home Page Profile
|
||||||
@@ -268,8 +266,6 @@ enableEmoji = true
|
|||||||
keywords = ["Theme", "Hugo"]
|
keywords = ["Theme", "Hugo"]
|
||||||
# 网站默认主题 ("light", "dark", "auto")
|
# 网站默认主题 ("light", "dark", "auto")
|
||||||
defaultTheme = "auto"
|
defaultTheme = "auto"
|
||||||
# 用于生成文章上次修改时间的公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
|
|
||||||
gitRepo = ""
|
|
||||||
# 主页信息设置
|
# 主页信息设置
|
||||||
[languages.zh.params.home]
|
[languages.zh.params.home]
|
||||||
# 主页个人信息
|
# 主页个人信息
|
||||||
@@ -426,6 +422,9 @@ enableEmoji = true
|
|||||||
# LoveIt theme version
|
# LoveIt theme version
|
||||||
# LoveIt 主题版本
|
# LoveIt 主题版本
|
||||||
version = "0.1.X"
|
version = "0.1.X"
|
||||||
|
# public git repo url only then enableGitInfo is true
|
||||||
|
# 公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
|
||||||
|
gitRepo = "https://github.com/dillonzq/LoveIt"
|
||||||
# Header info
|
# Header info
|
||||||
# 页面头部导航栏信息
|
# 页面头部导航栏信息
|
||||||
[params.header]
|
[params.header]
|
||||||
|
|||||||
@@ -5,6 +5,12 @@
|
|||||||
<div class="post-info-mod">
|
<div class="post-info-mod">
|
||||||
<span>
|
<span>
|
||||||
{{- printf (T "lastMod") $modify_date -}}
|
{{- printf (T "lastMod") $modify_date -}}
|
||||||
|
{{- with .GitInfo -}}
|
||||||
|
{{- $gitHash := .Hash -}}
|
||||||
|
<a class="git-hash" {{ with $.Site.Params.gitRepo }}href="{{ printf `%s/commit/%s` . $gitHash }}" target="_blank"{{ else }}href="javascript:void(0);"{{ end }} title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ $gitHash }}: {{ .Subject }}">
|
||||||
|
<i class="fas fa-hashtag fa-fw"></i>{{- .AbbreviatedHash -}}
|
||||||
|
</a>
|
||||||
|
{{- end -}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="post-info-license">
|
<div class="post-info-license">
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
{"Target":"css/style.min.52eef027334e2f9819adcad242e7298beefaf3f468d9085be0327f795ae0e4e5.css","MediaType":"text/css","Data":{"Integrity":"sha256-Uu7wJzNOL5gZrcrSQucpi+768/Ro2Qhb4DJ/eVrg5OU="}}
|
{"Target":"css/style.min.e9a885b35bab1db17c8dc0846bfea3e8513af60bd9812b4813224384fd65afa7.css","MediaType":"text/css","Data":{"Integrity":"sha256-6aiFs1urHbF8jcCEa/6j6FE69gvZgStIEyJDhP1lr6c="}}
|
||||||
Reference in New Issue
Block a user