feat(header): add Logo, pre and post config for header title (#252)

This commit is contained in:
Dillon
2020-04-23 16:49:30 +08:00
committed by GitHub
parent 919f559fd0
commit 87fbb05e86
23 changed files with 141 additions and 44 deletions

View File

@@ -3,6 +3,11 @@
text-align: right; text-align: right;
} }
.group-title {
margin-top: 1.5rem;
margin-bottom: 1rem;
}
@import "../_partial/_archive/terms"; @import "../_partial/_archive/terms";
@import "../_partial/_archive/tags"; @import "../_partial/_archive/tags";
} }

View File

@@ -205,7 +205,8 @@
img { img {
max-width: 100%; max-width: 100%;
min-height: 1.2rem; min-height: 1.25em;
vertical-align: text-bottom;
} }
figure { figure {
@@ -339,10 +340,8 @@
} }
} }
.version img { .version {
min-height: 1.2rem; height: 1.25em;
height: 1.2rem;
vertical-align: text-bottom;
} }
} }

View File

@@ -1,7 +1,3 @@
.archive-item {
margin-left: 2rem;
}
.categories-card { .categories-card {
margin: 0 auto; margin: 0 auto;
margin-top: 3rem; margin-top: 3rem;
@@ -10,7 +6,6 @@
justify-content: space-between; justify-content: space-between;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 2.5rem;
line-height: 1.6rem; line-height: 1.6rem;
.card-item { .card-item {
@@ -32,6 +27,8 @@
font-size: 1.2rem; font-size: 1.2rem;
font-weight: bold; font-weight: bold;
display: inline-block; display: inline-block;
margin-top: 1rem;
margin-bottom: .75rem;
} }
span { span {
@@ -42,12 +39,19 @@
} }
} }
.archive-item {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
margin: .25rem 0 .25rem 1.5rem;
}
.archive-item-link { .archive-item-link {
display: inline-block; min-width: 10%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
max-width: 95%; text-overflow: ellipsis;
&:hover { &:hover {
color: $global-link-hover-color; color: $global-link-hover-color;
@@ -64,7 +68,7 @@
} }
.archive-item-date { .archive-item-date {
float: right; width: 4em;
text-align: right; text-align: right;
color: $global-font-secondary-color; color: $global-font-secondary-color;

View File

@@ -6,6 +6,13 @@ header {
.dark & { .dark & {
background-color: $header-background-color-dark; background-color: $header-background-color-dark;
} }
.logo {
min-height: 1.25em;
height: 1.25em;
vertical-align: text-bottom;
padding-right: .25rem;
}
} }
.header-wrapper { .header-wrapper {
@@ -136,7 +143,7 @@ header {
padding: 0 1.5rem; padding: 0 1.5rem;
.header-title { .header-title {
font-size: $header-title-font-size-desktop; font-size: $header-title-font-size;
} }
.menu { .menu {
@@ -203,7 +210,7 @@ header {
@include transition(margin-top 0.3s ease 0s); @include transition(margin-top 0.3s ease 0s);
.header-title { .header-title {
font-size: $header-title-font-size-mobile; font-size: $header-title-font-size;
max-width: 80%; max-width: 80%;
} }

View File

@@ -3,9 +3,9 @@ code {
font-family: $code-font-family; font-family: $code-font-family;
color: $code-color; color: $code-color;
img, .version img { img {
min-height: 1.2 * $code-font-size; min-height: 1.25em;
height: 1.2 * $code-font-size; max-height: 1.25em;
} }
.dark & { .dark & {
@@ -25,7 +25,7 @@ pre {
.copy-button { .copy-button {
font-size: $code-font-size; font-size: $code-font-size;
line-height: 1.4 * $code-font-size; line-height: 1.4em;
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
@@ -129,7 +129,7 @@ code, pre, .highlight table, .highlight tr, .highlight td {
.highlight { .highlight {
font-family: $code-font-family; font-family: $code-font-family;
font-size: $code-font-size; font-size: $code-font-size;
line-height: 1.4 * $code-font-size; line-height: 1.4em;
/* Comment */ .c, /* Comment */ .c,
/* CommentHashbang */ .ch, /* CommentHashbang */ .ch,
/* CommentMultiline */ .cm, /* CommentMultiline */ .cm,

View File

@@ -58,9 +58,7 @@ $header-background-color-dark: #252627 !default;
// Font style of the header title // Font style of the header title
$header-title-font-family: $global-font-family !default; $header-title-font-family: $global-font-family !default;
$header-title-font-size: 1.5rem !default;
$header-title-font-size-desktop: 1.5rem !default;
$header-title-font-size-mobile: 1.5rem !default;
// Position of the header // Position of the header
$header-position-desktop: if($header-normal-mode-desktop, static, fixed) !default; $header-position-desktop: if($header-normal-mode-desktop, static, fixed) !default;

View File

@@ -44,6 +44,8 @@ enableEmoji = true
identifier = "posts" identifier = "posts"
# you can add extra information before the name (HTML format is supported), such as icons # you can add extra information before the name (HTML format is supported), such as icons
pre = "" pre = ""
# you can add extra information after the name (HTML format is supported), such as icons
post = ""
name = "Posts" name = "Posts"
url = "/posts/" url = "/posts/"
# title will be shown when you hover on this menu link. # title will be shown when you hover on this menu link.
@@ -52,6 +54,7 @@ enableEmoji = true
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "Tags" name = "Tags"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -59,6 +62,7 @@ enableEmoji = true
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "Categories" name = "Categories"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -66,6 +70,7 @@ enableEmoji = true
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "documentation" identifier = "documentation"
pre = "" pre = ""
post = ""
name = "Docs" name = "Docs"
url = "/categories/documentation/" url = "/categories/documentation/"
title = "" title = ""
@@ -73,6 +78,7 @@ enableEmoji = true
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "about" identifier = "about"
pre = "" pre = ""
post = ""
name = "About" name = "About"
url = "/about/" url = "/about/"
title = "" title = ""
@@ -212,7 +218,10 @@ enableEmoji = true
[languages.zh-cn.menu] [languages.zh-cn.menu]
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "posts" identifier = "posts"
# 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标
pre = "" pre = ""
# 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标
post = ""
name = "所有文章" name = "所有文章"
url = "/posts/" url = "/posts/"
title = "" title = ""
@@ -220,6 +229,7 @@ enableEmoji = true
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "标签" name = "标签"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -227,6 +237,7 @@ enableEmoji = true
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "分类" name = "分类"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -241,6 +252,7 @@ enableEmoji = true
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "about" identifier = "about"
pre = "" pre = ""
post = ""
name = "关于" name = "关于"
url = "/about/" url = "/about/"
title = "" title = ""
@@ -381,6 +393,7 @@ enableEmoji = true
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "posts" identifier = "posts"
pre = "" pre = ""
post = ""
name = "Postes" name = "Postes"
url = "/posts/" url = "/posts/"
title = "" title = ""
@@ -388,6 +401,7 @@ enableEmoji = true
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "Balises" name = "Balises"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -395,6 +409,7 @@ enableEmoji = true
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "Catégories" name = "Catégories"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -402,6 +417,7 @@ enableEmoji = true
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "documentation" identifier = "documentation"
pre = "" pre = ""
post = ""
name = "Docs" name = "Docs"
url = "/categories/documentation/" url = "/categories/documentation/"
title = "" title = ""
@@ -556,6 +572,21 @@ enableEmoji = true
# mobile header mode ("fixed", "normal", "auto") # mobile header mode ("fixed", "normal", "auto")
# 移动端导航栏模式 ("fixed", "normal", "auto") # 移动端导航栏模式 ("fixed", "normal", "auto")
mobileMode = "auto" mobileMode = "auto"
# Header title config
# 页面头部导航栏标题配置
[params.header.title]
# URL of the LOGO
# LOGO 的 URL
logo = ""
# title name
# 标题名称
name = "LoveIt"
# you can add extra information before the name (HTML format is supported), such as icons
# 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标
pre = "<i class='far fa-kiss-wink-heart fa-fw'></i> "
# you can add extra information after the name (HTML format is supported), such as icons
# 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标
post = ""
# Footer config # Footer config
# 页面底部信息配置 # 页面底部信息配置

View File

@@ -15,7 +15,7 @@ math:
[![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt) [![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt)
[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork) [![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork)
[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com). [:(far fa-kiss-wink-heart): LoveIt](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com).
It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/). It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/).

View File

@@ -20,7 +20,7 @@ Sorry, this article has not been completely translated into **French**.
Welcome to take the time to propose a translation by [making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme! Welcome to take the time to propose a translation by [making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme!
{{< /admonition >}} {{< /admonition >}}
[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com). [:(far fa-kiss-wink-heart): LoveIt](https://github.com/dillonzq/LoveIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [Dillon](https://dillonzq.com).
It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/). It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/).

View File

@@ -15,7 +15,7 @@ math:
[![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt) [![GitHub stars](https://img.shields.io/github/stars/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt)
[![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork) [![GitHub forks](https://img.shields.io/github/forks/dillonzq/LoveIt?style=social)](https://github.com/dillonzq/LoveIt/fork)
[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) 是一个由 [Dillon](https://dillonzq.com) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。 [:(far fa-kiss-wink-heart): LoveIt](https://github.com/dillonzq/LoveIt) 是一个由 [Dillon](https://dillonzq.com) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
它的原型基于 [LeaveIt 主题](https://github.com/liuzc/LeaveIt/) 和 [KeepIt 主题](https://github.com/liuzc/LeaveIt/)。 它的原型基于 [LeaveIt 主题](https://github.com/liuzc/LeaveIt/) 和 [KeepIt 主题](https://github.com/liuzc/LeaveIt/)。

View File

@@ -416,7 +416,7 @@ The rendered output looks like this:
### Task Lists ### Task Lists
Task lists allow you to create a list of items with checkboxes. To create a task list, add dashes (`-`) and brackets with a space (`[ ]`) in front of task list items. To select a checkbox, add an x in between the brackets (`[x]`). Task lists allow you to create a list of items with checkboxes. To create a task list, add dashes (`-`) and brackets with a space (`[ ]`) before task list items. To select a checkbox, add an x in between the brackets (`[x]`).
```markdown ```markdown
- [x] Write the press release - [x] Write the press release

View File

@@ -421,7 +421,7 @@ The rendered output looks like this:
### Task Lists ### Task Lists
Task lists allow you to create a list of items with checkboxes. To create a task list, add dashes (`-`) and brackets with a space (`[ ]`) in front of task list items. To select a checkbox, add an x in between the brackets (`[x]`). Task lists allow you to create a list of items with checkboxes. To create a task list, add dashes (`-`) and brackets with a space (`[ ]`) before task list items. To select a checkbox, add an x in between the brackets (`[x]`).
```markdown ```markdown
- [x] Write the press release - [x] Write the press release

View File

@@ -92,6 +92,8 @@ theme = "LoveIt"
identifier = "posts" identifier = "posts"
# you can add extra information before the name (HTML format is supported), such as icons # you can add extra information before the name (HTML format is supported), such as icons
pre = "" pre = ""
# you can add extra information after the name (HTML format is supported), such as icons
post = ""
name = "Posts" name = "Posts"
url = "/posts/" url = "/posts/"
# title will be shown when you hover on this menu link # title will be shown when you hover on this menu link
@@ -100,6 +102,7 @@ theme = "LoveIt"
[[menu.main]] [[menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "Tags" name = "Tags"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -107,6 +110,7 @@ theme = "LoveIt"
[[menu.main]] [[menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "Categories" name = "Categories"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -742,6 +746,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "posts" identifier = "posts"
pre = "" pre = ""
post = ""
name = "Posts" name = "Posts"
url = "/posts/" url = "/posts/"
title = "" title = ""
@@ -749,6 +754,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "Tags" name = "Tags"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -756,6 +762,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "Categories" name = "Categories"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -772,6 +779,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "posts" identifier = "posts"
pre = "" pre = ""
post = ""
name = "文章" name = "文章"
url = "/posts/" url = "/posts/"
title = "" title = ""
@@ -779,6 +787,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "标签" name = "标签"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -786,6 +795,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "分类" name = "分类"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -799,6 +809,7 @@ defaultContentLanguage = "en"
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "posts" identifier = "posts"
pre = "" pre = ""
post = ""
name = "Postes" name = "Postes"
url = "/posts/" url = "/posts/"
title = "" title = ""
@@ -806,6 +817,7 @@ defaultContentLanguage = "en"
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "Balises" name = "Balises"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -814,6 +826,7 @@ defaultContentLanguage = "en"
identifier = "categories" identifier = "categories"
name = "Catégories" name = "Catégories"
pre = "" pre = ""
post = ""
url = "/categories/" url = "/categories/"
title = "" title = ""
weight = 3 weight = 3

View File

@@ -97,6 +97,8 @@ theme = "LoveIt"
identifier = "posts" identifier = "posts"
# you can add extra information before the name (HTML format is supported), such as icons # you can add extra information before the name (HTML format is supported), such as icons
pre = "" pre = ""
# you can add extra information after the name (HTML format is supported), such as icons
post = ""
name = "Posts" name = "Posts"
url = "/posts/" url = "/posts/"
# title will be shown when you hover on this menu link # title will be shown when you hover on this menu link
@@ -105,6 +107,7 @@ theme = "LoveIt"
[[menu.main]] [[menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "Tags" name = "Tags"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -112,6 +115,7 @@ theme = "LoveIt"
[[menu.main]] [[menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "Categories" name = "Categories"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -747,6 +751,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "posts" identifier = "posts"
pre = "" pre = ""
post = ""
name = "Posts" name = "Posts"
url = "/posts/" url = "/posts/"
title = "" title = ""
@@ -754,6 +759,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "Tags" name = "Tags"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -761,6 +767,7 @@ defaultContentLanguage = "en"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "Categories" name = "Categories"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -777,6 +784,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "posts" identifier = "posts"
pre = "" pre = ""
post = ""
name = "文章" name = "文章"
url = "/posts/" url = "/posts/"
title = "" title = ""
@@ -784,6 +792,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "标签" name = "标签"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -791,6 +800,7 @@ defaultContentLanguage = "en"
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "分类" name = "分类"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -804,6 +814,7 @@ defaultContentLanguage = "en"
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "posts" identifier = "posts"
pre = "" pre = ""
post = ""
name = "Postes" name = "Postes"
url = "/posts/" url = "/posts/"
title = "" title = ""
@@ -811,6 +822,7 @@ defaultContentLanguage = "en"
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "Balises" name = "Balises"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -819,6 +831,7 @@ defaultContentLanguage = "en"
identifier = "categories" identifier = "categories"
name = "Catégories" name = "Catégories"
pre = "" pre = ""
post = ""
url = "/categories/" url = "/categories/"
title = "" title = ""
weight = 3 weight = 3

View File

@@ -95,6 +95,8 @@ theme = "LoveIt"
identifier = "posts" identifier = "posts"
# 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标 # 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标
pre = "" pre = ""
# 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标
post = ""
name = "文章" name = "文章"
url = "/posts/" url = "/posts/"
# 当你将鼠标悬停在此菜单链接上时, 将显示的标题 # 当你将鼠标悬停在此菜单链接上时, 将显示的标题
@@ -103,6 +105,7 @@ theme = "LoveIt"
[[menu.main]] [[menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "标签" name = "标签"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -110,6 +113,7 @@ theme = "LoveIt"
[[menu.main]] [[menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "分类" name = "分类"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -745,6 +749,7 @@ defaultContentLanguage = "zh-cn"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "posts" identifier = "posts"
pre = "" pre = ""
post = ""
name = "Posts" name = "Posts"
url = "/posts/" url = "/posts/"
title = "" title = ""
@@ -752,6 +757,7 @@ defaultContentLanguage = "zh-cn"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "Tags" name = "Tags"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -759,6 +765,7 @@ defaultContentLanguage = "zh-cn"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "Categories" name = "Categories"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -775,6 +782,7 @@ defaultContentLanguage = "zh-cn"
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "posts" identifier = "posts"
pre = "" pre = ""
post = ""
name = "文章" name = "文章"
url = "/posts/" url = "/posts/"
title = "" title = ""
@@ -782,6 +790,7 @@ defaultContentLanguage = "zh-cn"
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "标签" name = "标签"
url = "/tags/" url = "/tags/"
title = "" title = ""
@@ -789,6 +798,7 @@ defaultContentLanguage = "zh-cn"
[[languages.zh-cn.menu.main]] [[languages.zh-cn.menu.main]]
identifier = "categories" identifier = "categories"
pre = "" pre = ""
post = ""
name = "分类" name = "分类"
url = "/categories/" url = "/categories/"
title = "" title = ""
@@ -802,6 +812,7 @@ defaultContentLanguage = "zh-cn"
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "posts" identifier = "posts"
pre = "" pre = ""
post = ""
name = "Postes" name = "Postes"
url = "/posts/" url = "/posts/"
title = "" title = ""
@@ -809,14 +820,16 @@ defaultContentLanguage = "zh-cn"
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "tags" identifier = "tags"
pre = "" pre = ""
post = ""
name = "Balises" name = "Balises"
url = "/tags/" url = "/tags/"
title = "" title = ""
weight = 2 weight = 2
[[languages.fr.menu.main]] [[languages.fr.menu.main]]
identifier = "categories" identifier = "categories"
name = "Catégories"
pre = "" pre = ""
post = ""
name = "Catégories"
url = "/categories/" url = "/categories/"
title = "" title = ""
weight = 3 weight = 3

View File

@@ -12,7 +12,7 @@
{{- /* Paginate */ -}} {{- /* Paginate */ -}}
{{- $pages := .Pages.GroupByDate "2006" -}} {{- $pages := .Pages.GroupByDate "2006" -}}
{{- range (.Site.Params.section.paginate | default .Site.Params.paginate | .Paginate $pages).PageGroups -}} {{- range (.Site.Params.section.paginate | default .Site.Params.paginate | .Paginate $pages).PageGroups -}}
<h3>{{ .Key }}</h3> <h3 class="group-title">{{ .Key }}</h3>
{{- range .Pages -}} {{- range .Pages -}}
<article class="archive-item"> <article class="archive-item">
<a href="{{ .RelPermalink }}" class="archive-item-link"> <a href="{{ .RelPermalink }}" class="archive-item-link">

View File

@@ -12,7 +12,7 @@
{{- if ne .Site.Params.footer.hugo false -}} {{- if ne .Site.Params.footer.hugo false -}}
<div class="footer-line"> <div class="footer-line">
{{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %s">Hugo</a>` hugo.Version -}} {{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %s">Hugo</a>` hugo.Version -}}
{{- printf (T "poweredBySome") $hugo | safeHTML }} | {{ T "theme" }} - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt {{ .Scratch.Get `version` }}"><i class="far fa-heart fa-fw"></i> LoveIt</a> {{- printf (T "poweredBySome") $hugo | safeHTML }} | {{ T "theme" }} - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt {{ .Scratch.Get `version` }}"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>
</div> </div>
{{- end -}} {{- end -}}

View File

@@ -88,7 +88,7 @@
{{- with $params.seo.publisher -}} {{- with $params.seo.publisher -}}
"publisher": { "publisher": {
"@type": "Organization", "@type": "Organization",
"name": "{{ .name }}", "name": {{ .name | safeHTML }},
"logo": { "logo": {
"@type": "ImageObject", "@type": "ImageObject",
"url": "{{ .logo.url | absURL }}", "url": "{{ .logo.url | absURL }}",

View File

@@ -2,8 +2,15 @@
<header class="desktop" id="header-desktop"> <header class="desktop" id="header-desktop">
<div class="header-wrapper"> <div class="header-wrapper">
<div class="header-title"> <div class="header-title">
<a href="{{ .Site.Home.RelPermalink }}"> <a href="{{ .Site.Home.RelPermalink }}" title="{{ .Site.Title }}">
{{- .Site.Title -}} {{- with .Site.Params.header.title -}}
{{- with .logo -}}
{{- partial "plugin/image.html" (dict "src" . "alt" $.Site.Title "class" "logo") -}}
{{- end -}}
{{- .pre | safeHTML }}{{ .name }}{{ .post | safeHTML -}}
{{- else -}}
{{- .Site.Title -}}
{{- end -}}
</a> </a>
</div> </div>
<div class="menu"> <div class="menu">
@@ -16,7 +23,7 @@
{{- $url = .URL | relLangURL -}} {{- $url = .URL | relLangURL -}}
{{- end -}} {{- end -}}
<a class="menu-item{{ if $.IsMenuCurrent `main` . | or ($.HasMenuCurrent `main` .) | or (eq $.RelPermalink $url) }} active{{ end }}" href="{{ $url }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if (urls.Parse $url).Host }} rel="noopener noreffer" target="_blank"{{ end }}> <a class="menu-item{{ if $.IsMenuCurrent `main` . | or ($.HasMenuCurrent `main` .) | or (eq $.RelPermalink $url) }} active{{ end }}" href="{{ $url }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if (urls.Parse $url).Host }} rel="noopener noreffer" target="_blank"{{ end }}>
{{- .Pre | safeHTML }}{{ .Name -}} {{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
</a> </a>
{{- end -}} {{- end -}}
<span class="menu-item delimiter"></span> <span class="menu-item delimiter"></span>
@@ -67,8 +74,15 @@
<div class="header-container"> <div class="header-container">
<div class="header-wrapper"> <div class="header-wrapper">
<div class="header-title"> <div class="header-title">
<a href="{{ .Site.Home.RelPermalink }}"> <a href="{{ .Site.Home.RelPermalink }}" title="{{ .Site.Title }}">
{{- .Site.Title -}} {{- with .Site.Params.header.title -}}
{{- with .logo -}}
{{- partial "plugin/image.html" (dict "src" . "alt" $.Site.Title "class" "logo") -}}
{{- end -}}
{{- .pre | safeHTML }}{{ .name }}{{ .post | safeHTML -}}
{{- else -}}
{{- .Site.Title -}}
{{- end -}}
</a> </a>
</div> </div>
<div class="menu-toggle" id="menu-toggle-mobile"> <div class="menu-toggle" id="menu-toggle-mobile">
@@ -104,7 +118,7 @@
{{- $url = .URL | relLangURL -}} {{- $url = .URL | relLangURL -}}
{{- end -}} {{- end -}}
<a class="menu-item" href="{{ $url }}" title="{{ .Title }}"{{ if (urls.Parse $url).Host }} rel="noopener noreffer" target="_blank"{{ end }}> <a class="menu-item" href="{{ $url }}" title="{{ .Title }}"{{ if (urls.Parse $url).Host }} rel="noopener noreffer" target="_blank"{{ end }}>
{{- .Pre | safeHTML }}{{ .Name -}} {{- .Pre | safeHTML }}{{ .Name }}{{ .Post | safeHTML -}}
</a> </a>
{{- end -}} {{- end -}}
<a href="javascript:void(0);" class="menu-item theme-switch" title="{{ T "switchTheme" }}"> <a href="javascript:void(0);" class="menu-item theme-switch" title="{{ T "switchTheme" }}">

View File

@@ -6,7 +6,7 @@
{{- if .linked -}} {{- if .linked -}}
<a class="lightgallery" href="{{ $large | relURL }}" title="{{ .title | default $alt }}" data-thumbnail="{{ $small | relURL }}"{{ with .caption }} data-sub-html="<h2>{{ . }}</h2>{{ with $.alt }}<p>{{ . }}</p>{{ end }}"{{ end }}{{ with .rel }} rel="{{ . }}"{{ end }}> <a class="lightgallery" href="{{ $large | relURL }}" title="{{ .title | default $alt }}" data-thumbnail="{{ $small | relURL }}"{{ with .caption }} data-sub-html="<h2>{{ . }}</h2>{{ with $.alt }}<p>{{ . }}</p>{{ end }}"{{ end }}{{ with .rel }} rel="{{ . }}"{{ end }}>
<img <img
class="lazyload" class="lazyload{{ with .class }} {{ . }}{{ end }}"
src="{{ $loading.RelPermalink }}" src="{{ $loading.RelPermalink }}"
data-sizes="auto" data-sizes="auto"
data-srcset="{{ $small | relURL }}, {{ .src | relURL }} 1.5x, {{ $large | relURL }} 2x" data-srcset="{{ $small | relURL }}, {{ .src | relURL }} 1.5x, {{ $large | relURL }} 2x"
@@ -18,7 +18,7 @@
{{- $loading = resources.Get "svg/loading/small.svg" | minify -}} {{- $loading = resources.Get "svg/loading/small.svg" | minify -}}
{{- end -}} {{- end -}}
<img <img
class="lazyload" class="lazyload{{ with .class }} {{ . }}{{ end }}"
src="{{ $loading.RelPermalink | safeURL }}" src="{{ $loading.RelPermalink | safeURL }}"
data-sizes="auto" data-sizes="auto"
data-srcset="{{ $small | relURL }}, {{ .src | relURL }} 1.5x, {{ $large | relURL }} 2x" data-srcset="{{ $small | relURL }}, {{ .src | relURL }} 1.5x, {{ $large | relURL }} 2x"

View File

@@ -7,4 +7,4 @@
{{- $res := resources.Get "svg/version.template.svg" -}} {{- $res := resources.Get "svg/version.template.svg" -}}
{{- $res = $res | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}} {{- $res = $res | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}}
{{- $alt := printf "LoveIt %s | %s" $label $version -}} {{- $alt := printf "LoveIt %s | %s" $label $version -}}
<span class="version"><a href="{{ $url }}" rel="noopener noreffer" target="_blank">{{ partial "plugin/image.html" (dict "src" $res.RelPermalink "alt" $alt) }}</a></span> <a href="{{ $url }}" rel="noopener noreffer" target="_blank">{{ partial "plugin/image.html" (dict "src" $res.RelPermalink "alt" $alt "class" "version") }}</a>

View File

@@ -19,7 +19,7 @@
{{- /* Paginate */ -}} {{- /* Paginate */ -}}
{{- $pages := .Pages.GroupByDate "2006" -}} {{- $pages := .Pages.GroupByDate "2006" -}}
{{- range (.Site.Params.list.paginate | default .Site.Params.paginate | .Paginate $pages).PageGroups -}} {{- range (.Site.Params.list.paginate | default .Site.Params.paginate | .Paginate $pages).PageGroups -}}
<h3>{{ .Key }}</h3> <h3 class="group-title">{{ .Key }}</h3>
{{- range .Pages -}} {{- range .Pages -}}
<article class="archive-item"> <article class="archive-item">
<a href="{{ .RelPermalink }}" class="archive-item-link"> <a href="{{ .RelPermalink }}" class="archive-item-link">