docs: update theme preview image and fix some docs error (#151)
@@ -14,7 +14,7 @@ It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) a
|
|||||||
Since the three themes have a similar look, if you have questions about their differences,
|
Since the three themes have a similar look, if you have questions about their differences,
|
||||||
read [Why choose LoveIt](#why-choose-loveit) so that you can choose the one that works best for you.
|
read [Why choose LoveIt](#why-choose-loveit) so that you can choose the one that works best for you.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## [Demo Site](https://hugoloveit.com/)
|
## [Demo Site](https://hugoloveit.com/)
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
由于三个主题外观的相似性,如果你对于它们的不同之处有疑问,请阅读 [为什么选择 LoveIt](#为什么选择-LoveIt),以便你能选择最适合你的一个。
|
由于三个主题外观的相似性,如果你对于它们的不同之处有疑问,请阅读 [为什么选择 LoveIt](#为什么选择-LoveIt),以便你能选择最适合你的一个。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 主题[预览](https://hugoloveit.com/zh-cn/)
|
## 主题[预览](https://hugoloveit.com/zh-cn/)
|
||||||
|
|
||||||
|
|||||||
@@ -58,10 +58,6 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
b, strong {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: $global-link-color;
|
color: $global-link-color;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -87,42 +83,4 @@ b, strong {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#dynamic-to-top {
|
@import "../_partial/dynamic-to-top";
|
||||||
display: none;
|
|
||||||
overflow: hidden;
|
|
||||||
width: auto;
|
|
||||||
z-index: 100;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 2rem;
|
|
||||||
right: 2rem;
|
|
||||||
top: auto;
|
|
||||||
left: auto;
|
|
||||||
font-size: 1.4rem;
|
|
||||||
line-height: 1.8rem;
|
|
||||||
padding: .6rem .6rem;
|
|
||||||
color: $global-font-secondary-color;
|
|
||||||
background: $header-background-color;
|
|
||||||
border: 1px solid $global-border-color;
|
|
||||||
border-radius: 2rem;
|
|
||||||
|
|
||||||
&:hover, &:active {
|
|
||||||
color: $global-font-color;
|
|
||||||
background: $global-background-color;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active, &:focus, &:hover {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dark-theme & {
|
|
||||||
color: $global-font-secondary-color-dark;
|
|
||||||
background: $header-background-color-dark;
|
|
||||||
border-color: $global-border-color-dark;
|
|
||||||
|
|
||||||
&:hover, &:active {
|
|
||||||
color: $global-font-color-dark;
|
|
||||||
background: $global-background-color-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
39
assets/css/_partial/_dynamic-to-top.scss
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
#dynamic-to-top {
|
||||||
|
display: none;
|
||||||
|
overflow: hidden;
|
||||||
|
width: auto;
|
||||||
|
z-index: 100;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 2rem;
|
||||||
|
right: 2rem;
|
||||||
|
top: auto;
|
||||||
|
left: auto;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
line-height: 1.8rem;
|
||||||
|
padding: .6rem .6rem;
|
||||||
|
color: $global-font-secondary-color;
|
||||||
|
background: $header-background-color;
|
||||||
|
border: 1px solid $global-border-color;
|
||||||
|
border-radius: 2rem;
|
||||||
|
|
||||||
|
&:hover, &:active {
|
||||||
|
color: $global-font-color;
|
||||||
|
background: $global-background-color;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active, &:focus, &:hover {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $global-font-secondary-color-dark;
|
||||||
|
background: $header-background-color-dark;
|
||||||
|
border-color: $global-border-color-dark;
|
||||||
|
|
||||||
|
&:hover, &:active {
|
||||||
|
color: $global-font-color-dark;
|
||||||
|
background: $global-background-color-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -74,10 +74,10 @@
|
|||||||
&::before {
|
&::before {
|
||||||
content: "|";
|
content: "|";
|
||||||
margin-right: .3125rem;
|
margin-right: .3125rem;
|
||||||
color: $single-link-color;
|
color: $global-link-color;
|
||||||
|
|
||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
color: $single-link-color-dark;
|
color: $global-link-color-dark;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,6 +89,28 @@
|
|||||||
content: "#";
|
content: "#";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $global-link-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $global-link-color-dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $global-link-hover-color;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
color: $global-link-hover-color-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
b, strong {
|
||||||
|
.dark-theme & {
|
||||||
|
color: $global-font-secondary-color-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-footer {
|
.post-footer {
|
||||||
@@ -96,20 +118,20 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: .875rem !important;
|
font-size: .875rem;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: $single-link-color !important;
|
color: $single-link-color;
|
||||||
|
|
||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
color: $single-link-color-dark !important;
|
color: $single-link-color-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $single-link-hover-color !important;
|
color: $single-link-hover-color;
|
||||||
|
|
||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
color: $single-link-hover-color-dark !important;
|
color: $single-link-hover-color-dark;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,17 +140,17 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: $global-link-color !important;
|
color: $global-link-color;
|
||||||
|
|
||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
color: $global-link-color-dark !important;
|
color: $global-link-color-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $global-link-hover-color !important;
|
color: $global-link-hover-color;
|
||||||
|
|
||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
color: $global-link-hover-color-dark !important;
|
color: $global-link-hover-color-dark;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ lightgallery: true
|
|||||||
[](https://gohugo.io/)
|
[](https://gohugo.io/)
|
||||||
[](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
|
[](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
|
||||||
[](https://github.com/dillonzq/LoveIt)
|
[](https://github.com/dillonzq/LoveIt)
|
||||||
|
[](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).
|
[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).
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ lightgallery: true
|
|||||||
[](https://gohugo.io/)
|
[](https://gohugo.io/)
|
||||||
[](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
|
[](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
|
||||||
[](https://github.com/dillonzq/LoveIt)
|
[](https://github.com/dillonzq/LoveIt)
|
||||||
|
[](https://github.com/dillonzq/LoveIt/fork)
|
||||||
|
|
||||||
{{< admonition warning >}}
|
{{< admonition warning >}}
|
||||||
Sorry, this article has not been completely translated into **French**.
|
Sorry, this article has not been completely translated into **French**.
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ lightgallery: true
|
|||||||
[](https://gohugo.io/)
|
[](https://gohugo.io/)
|
||||||
[](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
|
[](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
|
||||||
[](https://github.com/dillonzq/LoveIt)
|
[](https://github.com/dillonzq/LoveIt)
|
||||||
|
[](https://github.com/dillonzq/LoveIt/fork)
|
||||||
|
|
||||||
[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) 是一个由 [Dillon](https://dillonzq.com) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
|
[LoveIt :(far fa-heart):](https://github.com/dillonzq/LoveIt) 是一个由 [Dillon](https://dillonzq.com) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
|
||||||
|
|
||||||
|
|||||||
@@ -547,9 +547,9 @@ Add a logo image (127x40) and a cover image (800x600) in the `static` directory.
|
|||||||
|
|
||||||
**LoveIt** theme has been built to be as configurable as possible by defining custom `.scss` style files.
|
**LoveIt** theme has been built to be as configurable as possible by defining custom `.scss` style files.
|
||||||
|
|
||||||
The directory including the custom `.scss` style files is `config/css` relative to **your project path**.
|
The directory including the custom `.scss` style files is `config/css` relative to **your project root directory**.
|
||||||
|
|
||||||
In `_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style.
|
In `config/css/_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style.
|
||||||
|
|
||||||
Here is a example:
|
Here is a example:
|
||||||
|
|
||||||
@@ -558,7 +558,7 @@ Here is a example:
|
|||||||
$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
|
$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
|
||||||
```
|
```
|
||||||
|
|
||||||
In `_custom.scss`, you can add some css style code to customize the style.
|
In `config/css/_custom.scss`, you can add some css style code to customize the style.
|
||||||
|
|
||||||
## 4 Multilingual and i18n
|
## 4 Multilingual and i18n
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,6 @@ Découvrez en quoi consiste le thème Hugo - **LoveIt** et les concepts fondamen
|
|||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
|
|
||||||
{{< admonition warning >}}
|
|
||||||
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!
|
|
||||||
{{< /admonition >}}
|
|
||||||
|
|
||||||
## 1 Requirements
|
## 1 Requirements
|
||||||
|
|
||||||
Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only dependency of this theme.
|
Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only dependency of this theme.
|
||||||
@@ -552,9 +547,9 @@ Add a logo image (127x40) and a cover image (800x600) in the `static` directory.
|
|||||||
|
|
||||||
**LoveIt** theme has been built to be as configurable as possible by defining custom `.scss` style files.
|
**LoveIt** theme has been built to be as configurable as possible by defining custom `.scss` style files.
|
||||||
|
|
||||||
The directory including the custom `.scss` style files is `config/css` relative to **your project path**.
|
The directory including the custom `.scss` style files is `config/css` relative to **your project root directory**.
|
||||||
|
|
||||||
In `_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style.
|
In `config/css/_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style.
|
||||||
|
|
||||||
Here is a example:
|
Here is a example:
|
||||||
|
|
||||||
@@ -563,7 +558,7 @@ Here is a example:
|
|||||||
$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
|
$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
|
||||||
```
|
```
|
||||||
|
|
||||||
In `_custom.scss`, you can add some css style code to customize the style.
|
In `config/css/_custom.scss`, you can add some css style code to customize the style.
|
||||||
|
|
||||||
## 4 Multilingual and i18n
|
## 4 Multilingual and i18n
|
||||||
|
|
||||||
|
|||||||
@@ -549,9 +549,9 @@ hugo
|
|||||||
|
|
||||||
通过定义自定义 `.scss` 样式文件, **LoveIt** 主题支持可配置的样式.
|
通过定义自定义 `.scss` 样式文件, **LoveIt** 主题支持可配置的样式.
|
||||||
|
|
||||||
包含自定义 `.scss` 样式文件的目录相对于 **你的项目** 的路径为 `config / css`.
|
包含自定义 `.scss` 样式文件的目录相对于 **你的项目根目录** 的路径为 `config/css`.
|
||||||
|
|
||||||
在 `_override.scss` 中, 你可以覆盖 `themes/LoveIt/assets/css/_variables.scss` 中的变量以自定义样式.
|
在 `config/css/_override.scss` 中, 你可以覆盖 `themes/LoveIt/assets/css/_variables.scss` 中的变量以自定义样式.
|
||||||
|
|
||||||
这是一个例子:
|
这是一个例子:
|
||||||
|
|
||||||
@@ -560,7 +560,7 @@ hugo
|
|||||||
$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
|
$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
|
||||||
```
|
```
|
||||||
|
|
||||||
在 `_custom.scss` 中, 你可以添加一些 CSS 样式代码以自定义样式.
|
在 `config/css/_custom.scss` 中, 你可以添加一些 CSS 样式代码以自定义样式.
|
||||||
|
|
||||||
## 4 多语言和 i18n
|
## 4 多语言和 i18n
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 420 KiB |
|
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 420 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 124 KiB |
BIN
images/tn.png
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 200 KiB |
@@ -9,6 +9,7 @@
|
|||||||
"@babel/core": "^7.8.4",
|
"@babel/core": "^7.8.4",
|
||||||
"@babel/preset-env": "^7.8.4",
|
"@babel/preset-env": "^7.8.4",
|
||||||
"babel-preset-minify": "^0.5.1",
|
"babel-preset-minify": "^0.5.1",
|
||||||
|
"minimist": ">=1.2.2",
|
||||||
"husky": "^4.2.3"
|
"husky": "^4.2.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||