mirror of
https://github.com/dillonzq/LoveIt.git
synced 2025-04-02 04:07:19 +02:00
Merge branch 'develop' into feature/document
# Conflicts: # assets/css/_core/_base.scss # resources/_gen/assets/scss/css/style.template.scss_40942e46c3aa444eabf479d066570690.content # resources/_gen/assets/scss/css/style.template.scss_40942e46c3aa444eabf479d066570690.json
This commit is contained in:
commit
9ed9db5ba3
15 changed files with 226 additions and 76 deletions
assets/css
exampleSite
i18n
layouts
resources/_gen/assets/scss/css
|
@ -1,6 +1,8 @@
|
|||
html {
|
||||
font-family: $global-font-family;
|
||||
font-size: 16px;
|
||||
font-size: $global-font-size;
|
||||
font-weight: $global-font-weight;
|
||||
line-height: $global-line-height;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
|
@ -27,8 +29,6 @@ html {
|
|||
}
|
||||
|
||||
body {
|
||||
font-weight: 300;
|
||||
line-height: 1.5rem;
|
||||
background-color: $global-background-color;
|
||||
color: $global-font-color;
|
||||
overflow-wrap: break-word;
|
||||
|
@ -80,6 +80,10 @@ a {
|
|||
}
|
||||
}
|
||||
|
||||
b, strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#dynamic-to-top {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -6,6 +6,32 @@ header {
|
|||
.dark-theme & {
|
||||
background-color: $header-background-color-dark;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.select-language {
|
||||
font-weight: $global-font-weight;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
background-image: none;
|
||||
-webkit-appearance: none;
|
||||
color: $global-font-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-font-color-dark;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#header-desktop {
|
||||
|
|
|
@ -30,24 +30,6 @@
|
|||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
a {
|
||||
color: $global-font-secondary-color !important;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-font-secondary-color-dark !important;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $global-link-hover-color !important;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-link-hover-color-dark !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
display: -moz-box;
|
||||
display: -webkit-box;
|
||||
|
@ -59,6 +41,11 @@
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
overflow-wrap: break-word;
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
.dark-theme & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
|
|
|
@ -20,6 +20,22 @@
|
|||
.dark-theme & {
|
||||
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 {
|
||||
|
@ -32,10 +48,10 @@
|
|||
}
|
||||
|
||||
.post-info-md {
|
||||
font-size: 0.8rem;
|
||||
width: 8rem;
|
||||
|
||||
a {
|
||||
font-size: 0.8rem;
|
||||
color: $single-link-color;
|
||||
|
||||
.dark-theme & {
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
// ==============================
|
||||
|
||||
// ========== Global ========== //
|
||||
// Font family
|
||||
// Font and Line Height
|
||||
$global-font-family: -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft Yahei, Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji !default;
|
||||
$global-font-size: 16px;
|
||||
$global-font-weight: 400;
|
||||
$global-line-height: 1.5rem;
|
||||
|
||||
// Color of the background
|
||||
$global-background-color: #fff !default;
|
||||
|
|
|
@ -12,9 +12,9 @@ themesDir = "../.."
|
|||
# whether to use robots.txt
|
||||
# 是否使用 robots.txt
|
||||
enableRobotsTXT = true
|
||||
# whether to use git commit log to generate lastmod record
|
||||
# 是否使用 git 信息来生成文章的上次修改时间
|
||||
enableGitInfo = false
|
||||
# whether to use git commit log
|
||||
# 是否使用 git 信息
|
||||
enableGitInfo = true
|
||||
# whether to use emoji code
|
||||
# 是否使用 emoji 代码
|
||||
enableEmoji = true
|
||||
|
@ -26,6 +26,8 @@ enableEmoji = true
|
|||
languageCode = "en"
|
||||
# website title
|
||||
title = "LoveIt Theme"
|
||||
# language name
|
||||
languageName = "English"
|
||||
# whether to include chinese/japanese/korean
|
||||
hasCJKLanguage = false
|
||||
# default amount of posts in each pages
|
||||
|
@ -58,13 +60,6 @@ enableEmoji = true
|
|||
name = "About"
|
||||
url = "/about/"
|
||||
weight = 4
|
||||
[[languages.en.menu.main]]
|
||||
identifier = "zh"
|
||||
pre = '<i class="fas fa-language fa-fw"></i>'
|
||||
name = ""
|
||||
title = "简体中文"
|
||||
url = "/zh/"
|
||||
weight = 5
|
||||
[languages.en.params]
|
||||
# site description
|
||||
description = "About LoveIt Theme"
|
||||
|
@ -72,8 +67,6 @@ enableEmoji = true
|
|||
keywords = ["Theme", "Hugo"]
|
||||
# site default theme ("light", "dark", "auto")
|
||||
defaultTheme = "auto"
|
||||
# public git repo url to link lastmod git commit only then enableGitInfo is true
|
||||
gitRepo = ""
|
||||
# Home Page Info
|
||||
[languages.en.params.home]
|
||||
# Home Page Profile
|
||||
|
@ -232,6 +225,8 @@ enableEmoji = true
|
|||
languageCode = "zh"
|
||||
# 网站标题
|
||||
title = "LoveIt 主题"
|
||||
# 语言名称
|
||||
languageName = "简体中文"
|
||||
# 是否包括中日韩文字
|
||||
hasCJKLanguage = true
|
||||
# 默认每页列表显示的文章数目
|
||||
|
@ -264,13 +259,6 @@ enableEmoji = true
|
|||
name = "关于"
|
||||
url = "/about/"
|
||||
weight = 4
|
||||
[[languages.zh.menu.main]]
|
||||
identifier = "en"
|
||||
pre = '<i class="fas fa-language fa-fw"></i>'
|
||||
name = ""
|
||||
title = "English"
|
||||
url = "../"
|
||||
weight = 5
|
||||
[languages.zh.params]
|
||||
# 网站描述
|
||||
description = "关于 LoveIt 主题"
|
||||
|
@ -278,8 +266,6 @@ enableEmoji = true
|
|||
keywords = ["Theme", "Hugo"]
|
||||
# 网站默认主题 ("light", "dark", "auto")
|
||||
defaultTheme = "auto"
|
||||
# 用于生成文章上次修改时间的公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
|
||||
gitRepo = ""
|
||||
# 主页信息设置
|
||||
[languages.zh.params.home]
|
||||
# 主页个人信息
|
||||
|
@ -436,6 +422,9 @@ enableEmoji = true
|
|||
# LoveIt theme version
|
||||
# LoveIt 主题版本
|
||||
version = "0.1.X"
|
||||
# public git repo url only then enableGitInfo is true
|
||||
# 公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
|
||||
gitRepo = "https://github.com/dillonzq/LoveIt"
|
||||
# Header info
|
||||
# 页面头部导航栏信息
|
||||
[params.header]
|
||||
|
|
16
i18n/en.toml
16
i18n/en.toml
|
@ -67,8 +67,8 @@ other = "about {{ .Count }} words"
|
|||
[readingTime]
|
||||
other = "{{ .Count }} min"
|
||||
|
||||
[pageviews]
|
||||
other = "<span class=leancloud-visitors-count></span> pageviews"
|
||||
[views]
|
||||
other = "views"
|
||||
|
||||
[author]
|
||||
other = "Author"
|
||||
|
@ -90,18 +90,6 @@ other = "Home"
|
|||
|
||||
[readMore]
|
||||
other = "Read More"
|
||||
|
||||
[day]
|
||||
other = "d"
|
||||
|
||||
[hour]
|
||||
other = "hr"
|
||||
|
||||
[minute]
|
||||
other = "min"
|
||||
|
||||
[second]
|
||||
other = "sec"
|
||||
# === posts/single.html ===
|
||||
|
||||
# === 404.html ===
|
||||
|
|
104
i18n/fr.toml
Normal file
104
i18n/fr.toml
Normal file
|
@ -0,0 +1,104 @@
|
|||
# Translations for French
|
||||
# https://gohugo.io/content-management/multilingual/#translation-of-strings
|
||||
|
||||
# === Post ===
|
||||
[posts]
|
||||
other = "Posts"
|
||||
# === Post ===
|
||||
|
||||
# === Taxonomy ===
|
||||
[all]
|
||||
other = "tous "
|
||||
|
||||
[tag]
|
||||
other = "Tag"
|
||||
|
||||
[tags]
|
||||
other = "Tags"
|
||||
|
||||
[category]
|
||||
other = "Catégorie"
|
||||
|
||||
[categories]
|
||||
other = "Catégories"
|
||||
# === Taxonomy ===
|
||||
|
||||
# === Pagination ===
|
||||
[more]
|
||||
other = "Plus"
|
||||
# === Pagination ===
|
||||
|
||||
# === partials/header.html ===
|
||||
[switchTheme]
|
||||
other = "Changer de Thème"
|
||||
# === partials/header.html ===
|
||||
|
||||
# === partials/comments.html ===
|
||||
[valineLang]
|
||||
other = "fr"
|
||||
# === partials/comments.html ===
|
||||
|
||||
# === partials/footer.html ===
|
||||
[powered]
|
||||
other = "Propulsé par %s"
|
||||
|
||||
[theme]
|
||||
other = "Thème - "
|
||||
# === partials/footer.html ===
|
||||
|
||||
# === partials/post/share.html ===
|
||||
[share]
|
||||
other = "Partager sur"
|
||||
# === partials/post/share.html ===
|
||||
|
||||
# === posts/single.html ===
|
||||
[toc]
|
||||
other = "Contenu"
|
||||
|
||||
[publish]
|
||||
other = "publié sur"
|
||||
|
||||
[included]
|
||||
other = "inclus dans"
|
||||
|
||||
[wordCount]
|
||||
other = "environ {{ .Count }} mots"
|
||||
|
||||
[readingTime]
|
||||
other = "{{ .Count }} min"
|
||||
|
||||
[views]
|
||||
other = "vues"
|
||||
|
||||
[author]
|
||||
other = "Auteur"
|
||||
|
||||
[lastMod]
|
||||
other = "Dernière mise à jour le %s"
|
||||
|
||||
[license]
|
||||
other = "Publié sous licence %s"
|
||||
|
||||
[seeMarkdown]
|
||||
other = "Lire Markdown"
|
||||
|
||||
[back]
|
||||
other = "Retour"
|
||||
|
||||
[home]
|
||||
other = "Accueil"
|
||||
|
||||
[readMore]
|
||||
other = "En savoir plus"
|
||||
# === posts/single.html ===
|
||||
|
||||
# === 404.html ===
|
||||
[pageNotFound]
|
||||
other = "Page non trouvée"
|
||||
|
||||
[pageNotFoundText]
|
||||
other = "Désolé, la page recherchée n'existe pas."
|
||||
|
||||
[backToHome]
|
||||
other = "Retour à l'accueil"
|
||||
# === 404.html ===
|
16
i18n/zh.toml
16
i18n/zh.toml
|
@ -67,8 +67,8 @@ other = "约 {{ .Count }} 字"
|
|||
[readingTime]
|
||||
other = "预计阅读 {{ .Count }} 分钟"
|
||||
|
||||
[pageviews]
|
||||
other = "<span class=leancloud-visitors-count></span> 次阅读"
|
||||
[views]
|
||||
other = "次阅读"
|
||||
|
||||
[author]
|
||||
other = "作者"
|
||||
|
@ -90,18 +90,6 @@ other = "主页"
|
|||
|
||||
[readMore]
|
||||
other = "阅读全文"
|
||||
|
||||
[day]
|
||||
other = "天"
|
||||
|
||||
[hour]
|
||||
other = "时"
|
||||
|
||||
[minute]
|
||||
other = "分"
|
||||
|
||||
[second]
|
||||
other = "秒"
|
||||
# === posts/single.html ===
|
||||
|
||||
# === 404.html ===
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{{- end -}}
|
||||
|
||||
{{- /* Posts */ -}}
|
||||
{{- if .Site.Params.home.posts.enable -}}
|
||||
{{- if ne .Site.Params.home.posts.enable false -}}
|
||||
{{- /* Paginate */ -}}
|
||||
{{- $paginator := where .Site.RegularPages "Type" "posts" -}}
|
||||
{{- if ne .Site.Params.home.posts.mode.defaultHiddenFromHomePage false -}}
|
||||
|
|
|
@ -12,6 +12,26 @@
|
|||
{{- .Pre | safeHTML }}{{ .Name -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- if .Site.IsMultiLingual -}}
|
||||
|
|
||||
<span class="menu-item">
|
||||
<i class="fas fa-language fa-fw"></i>
|
||||
<select class="select-language" onchange="location = this.value;">
|
||||
{{- range .Page.AllTranslations -}}
|
||||
{{- $translation := . -}}
|
||||
{{- range $.Site.Languages -}}
|
||||
{{- if eq $translation.Lang .Lang -}}
|
||||
{{- if eq $.Page.Lang .Lang -}}
|
||||
<option value="{{ $translation.Permalink }}" selected>{{ .LanguageName }}</option>
|
||||
{{- else -}}
|
||||
<option value="{{ $translation.Permalink }}">{{ .LanguageName }}</option>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</select>
|
||||
</span>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-rotate-180 fa-fw"></i>
|
||||
</a>
|
||||
|
@ -39,6 +59,25 @@
|
|||
{{- .Pre | safeHTML }}{{ .Name -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- if .Site.IsMultiLingual -}}
|
||||
<span class="menu-item">
|
||||
<i class="fas fa-language fa-fw"></i>
|
||||
<select class="select-language" onchange="location = this.value;">
|
||||
{{- range .Site.Home.AllTranslations -}}
|
||||
{{- $translation := . -}}
|
||||
{{- range $.Site.Languages -}}
|
||||
{{- if eq $translation.Lang .Lang -}}
|
||||
{{- if eq $.Page.Lang .Lang -}}
|
||||
<option value="{{ $translation.Permalink }}" selected>{{ .LanguageName }}</option>
|
||||
{{- else -}}
|
||||
<option value="{{ $translation.Permalink }}">{{ .LanguageName }}</option>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</select>
|
||||
</span>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-rotate-180 fa-fw"></i>
|
||||
</a>
|
||||
|
|
|
@ -5,6 +5,12 @@
|
|||
<div class="post-info-mod">
|
||||
<span>
|
||||
{{- 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>
|
||||
</div>
|
||||
<div class="post-info-license">
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<i class="far fa-clock fa-fw"></i>{{ T "readingTime" .ReadingTime }}
|
||||
{{- if $scratch.Get "production" | and .Site.Params.valine.enable | and .Site.Params.valine.visitor -}}
|
||||
<span id="{{ .RelPermalink | relURL }}" class="leancloud_visitors" data-flag-title="{{ .Title }}">
|
||||
<i class="far fa-eye fa-fw"></i>{{ T "pageviews" | safeHTML }}
|
||||
<i class="far fa-eye fa-fw"></i><span class=leancloud-visitors-count></span> {{ T "views" }}
|
||||
</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
{"Target":"css/style.min.3d5f7d9e0effc9d059f777db86db5fe1452d3a8c222ab37a69553cba9313c1f3.css","MediaType":"text/css","Data":{"Integrity":"sha256-PV99ng7/ydBZ93fbhttf4UUtOowiKrN6aVU8upMTwfM="}}
|
||||
{"Target":"css/style.min.52deeec547ce58429463283c39fcc94ea1b6ba7dc672adbce74043bb55066f24.css","MediaType":"text/css","Data":{"Integrity":"sha256-Ut7uxUfOWEKUYyg8OfzJTqG2un3Gcq2850BDu1UGbyQ="}}
|
Loading…
Add table
Reference in a new issue