Skip to content

Commit

Permalink
Merge pull request #322 from dillonzq/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq authored May 5, 2020
2 parents e3d774f + 97c00eb commit 01bd6e8
Show file tree
Hide file tree
Showing 39 changed files with 536 additions and 134 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Hugo default output directory
public/
/exampleSite/resources/
/resources/_gen/assets/scss/temp

node_modules/
build/
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ English README | [简体中文说明](https://github.com/dillonzq/LoveIt/blob/ma

> **LoveIt** is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
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/Fastbyte01/KeepIt).

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.
Expand Down Expand Up @@ -89,7 +89,8 @@ I hope you will LoveIt ❤️!
* **Valine** comment system supported by [Valine](https://valine.js.org/)
* **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/)
* **Telegram comments** system supported by [Telegram Comments](https://comments.app/)
* **Commento** comments system supported by [Commento](https://commento.io/)
* **Commento** comment system supported by [Commento](https://commento.io/)
* **Utterances** comment system supported by [Utterances](https://utteranc.es/)

### Extended Features

Expand Down Expand Up @@ -131,6 +132,7 @@ LoveIt supports the following languages:
* Polish
* Brazilian Portuguese
* Italian
* Spanish
* [Contribute with a new language](https://github.com/dillonzq/LoveIt/pulls)

[Languages Compatibility](https://hugoloveit.com/theme-documentation-basics/#language-compatibility)
Expand Down
4 changes: 3 additions & 1 deletion README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

> [LoveIt](https://github.com/dillonzq/LoveIt) 是一个**简洁****优雅****高效**[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/Fastbyte01/KeepIt)

由于三个主题外观的相似性,如果你对于它们的不同之处有疑问,请阅读 [为什么选择 LoveIt](#为什么选择-LoveIt),以便你能选择最适合你的一个。

Expand Down Expand Up @@ -85,6 +85,7 @@
* 支持 **[Facebook](https://developers.facebook.com/docs/plugins/comments/) 评论**系统
* 支持 **[Telegram comments](https://comments.app/) 评论**系统
* 支持 **[Commento](https://commento.io/)** 评论系统
* 支持 **[Utterances](https://utteranc.es/)** 评论系统

### 扩展功能

Expand Down Expand Up @@ -126,6 +127,7 @@ LoveIt 支持下列语言:
* 波兰语
* 巴西葡萄牙语
* 意大利语
* 西班牙语
* [贡献一种新的语言](https://github.com/dillonzq/LoveIt/pulls)

[语言兼容性](https://hugoloveit.com/zh-cn/theme-documentation-basics/#language-compatibility)
Expand Down
5 changes: 2 additions & 3 deletions assets/css/_core/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
.wrapper {
display: flex;
flex-direction: column;
min-height: 97.5vh;
min-height: 100vh;
width: 100%;

main {
flex: 1 0 auto;

.container {
padding-left: 1rem;
padding-right: 1rem;
padding: 0 1rem;
}
}
}
9 changes: 7 additions & 2 deletions assets/css/_page/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,21 @@
@include border-radius(100%);
@include box-shadow(0 0 0 .3618em rgba(0, 0, 0, .05));
@include transition(all 0.4s ease);
cursor: pointer;

&:hover {
position: relative;
@include transform(translateY(-.75rem));
cursor: pointer;
}
}
}

.home-title {
font-size: 1.2rem;
font-weight: bold;
margin: 0;
padding: .4rem;
}

.home-subtitle {
font-size: 1rem;
font-weight: normal;
Expand Down
4 changes: 2 additions & 2 deletions assets/css/_partial/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ footer {
height: 2rem;
width: 100%;
text-align: center;
line-height: 1.5rem;
padding-top: 2rem;
line-height: 1.25rem;
padding: 1rem 0;

.footer-container {
font-size: .875rem;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/_partial/_single/_comment.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.comment {
#comments {
padding: 4rem 0;
}
2 changes: 1 addition & 1 deletion assets/css/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,4 @@ $admonition-background-color-map: (
) !default;
// ========== Admonition ========== //

$MAX_LENGTH: 9999px;
$MAX_LENGTH: 12000px;
2 changes: 1 addition & 1 deletion assets/js/theme.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/theme.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/lib/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ [email protected] https://github.com/sachinchoolur/lg-thumbnail.js
[email protected] https://github.com/sachinchoolur/lg-zoom.js
[email protected] https://github.com/zenorocha/clipboard.js
[email protected] https://github.com/ellisonleao/sharer.js
typeit@6.5.1 https://github.com/alexmacarthur/typeit
typeit@7.0.4 https://github.com/alexmacarthur/typeit
[email protected] https://katex.org/
[email protected] https://github.com/knsv/mermaid
[email protected] https://echarts.apache.org/
Expand Down
6 changes: 2 additions & 4 deletions assets/lib/typeit/typeit.min.js

Large diffs are not rendered by default.

41 changes: 38 additions & 3 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ enableEmoji = true
gravatarEmail = ""
# URL of avatar shown in home page
avatarURL = "/images/avatar.png"
# title shown in home page
title = ""
# subtitle shown in home page
subtitle = "A Clean, Elegant but Advanced Hugo Theme"
# whether to use typeit animation for subtitle
Expand Down Expand Up @@ -340,6 +342,8 @@ enableEmoji = true
gravatarEmail = ""
# 主页显示头像的 URL
avatarURL = "/images/avatar.png"
# 主页显示的网站标题
title = ""
# 主页显示的网站副标题
subtitle = "一个简洁、优雅且高效的 Hugo 主题"
# 是否为副标题显示打字机动画
Expand Down Expand Up @@ -534,6 +538,8 @@ enableEmoji = true
gravatarEmail = ""
# URL of avatar shown in home page
avatarURL = "/images/avatar.png"
# title shown in home page
title = ""
# subtitle shown in home page
subtitle = "Un thème Hugo simple, élégant et efficace"
# whether to use typeit animation for subtitle
Expand Down Expand Up @@ -655,6 +661,9 @@ enableEmoji = true
# you can add extra information after the name (HTML format is supported), such as icons
# 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标
post = ""
# whether to use typeit animation for title name
# 是否为标题显示打字机动画
typeit = false

# Footer config
# 页面底部信息配置
Expand Down Expand Up @@ -883,10 +892,20 @@ enableEmoji = true
colorful = true
dislikes = false
outlined = false
# Commento comments config (https://commento.io/)
# Commento comments 评论系统设置 (https://commento.io/)
# Commento comment config (https://commento.io/)
# Commento comment 评论系统设置 (https://commento.io/)
[params.page.comment.commento]
enable = false
# Utterances comment config (https://utteranc.es/)
# Utterances comment 评论系统设置 (https://utteranc.es/)
[params.page.comment.utterances]
enable = false
# owner/repo
repo = ""
issueTerm = "pathname"
label = ""
lightTheme = "github-light"
darkTheme = "github-dark"
# SEO config
# SEO 配置
[params.page.seo]
Expand All @@ -911,6 +930,22 @@ enableEmoji = true
width = 800
height = 600

# TypeIt config
# TypeIt 配置
[params.typeit]
# typing speed between each step (measured in milliseconds)
# 每一步的打字速度 (单位是毫秒)
speed = 100
# blinking speed of the cursor (measured in milliseconds)
# 光标的闪烁速度 (单位是毫秒)
cursorSpeed = 1000
# character used for the cursor (HTML format is supported)
# 光标的字符 (支持 HTML 格式)
cursorChar = "|"
# cursor duration after typing finishing (measured in milliseconds, "-1" means unlimited)
# 打字结束之后光标的持续时间 (单位是毫秒, "-1" 代表无限大)
duration = -1

# Site verification code for Google/Bing/Yandex/Pinterest/Baidu
# 网站验证代码,用于 Google/Bing/Yandex/Pinterest/Baidu
[params.verification]
Expand Down Expand Up @@ -977,7 +1012,7 @@ enableEmoji = true
clipboardJS = ""
# [email protected] https://github.com/ellisonleao/sharer.js
sharerJS = ""
# typeit@6.5.1 https://github.com/alexmacarthur/typeit
# typeit@7.0.4 https://github.com/alexmacarthur/typeit
typeitJS = ""
# [email protected] https://katex.org/
katexCSS = ""
Expand Down
5 changes: 3 additions & 2 deletions exampleSite/content/about.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ math:

> [:(far fa-kiss-wink-heart fa-fw): 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/Fastbyte01/KeepIt).
![Hugo Theme LoveIt](/images/Apple-Devices-Preview.png "Hugo Theme LoveIt")

Expand Down Expand Up @@ -56,7 +56,8 @@ math:
* :(far fa-comment-alt fa-fw): **Valine** comment system supported by [Valine](https://valine.js.org/)
* :(far fa-comments fa-fw): **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/)
* :(fas fa-comment fa-fw): **Telegram comments** system supported by [Comments](https://comments.app/)
* :(fas fa-comment-dots fa-fw): **Commento** comments system supported by [Commento](https://commento.io/)
* :(fas fa-comment-dots fa-fw): **Commento** comment system supported by [Commento](https://commento.io/)
* :(fas fa-comment-alt fa-fw): **Utterances** comment system supported by [Utterances](https://utteranc.es/)

#### Extended Features

Expand Down
5 changes: 3 additions & 2 deletions exampleSite/content/about.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Welcome to take the time to propose a translation by [:(fas fa-code-branch fa-fw

> [:(far fa-kiss-wink-heart fa-fw): 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/Fastbyte01/KeepIt).
![Hugo Theme LoveIt](/images/Apple-Devices-Preview.png "Hugo Theme LoveIt")

Expand Down Expand Up @@ -61,7 +61,8 @@ Welcome to take the time to propose a translation by [:(fas fa-code-branch fa-fw
* :(far fa-comment-alt fa-fw): **Valine** comment system supported by [Valine](https://valine.js.org/)
* :(far fa-comments fa-fw): **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/)
* :(fas fa-comment fa-fw): **Telegram comments** system supported by [Comments](https://comments.app/)
* :(fas fa-comment-dots fa-fw): **Commento** comments system supported by [Commento](https://commento.io/)
* :(fas fa-comment-dots fa-fw): **Commento** comment system supported by [Commento](https://commento.io/)
* :(fas fa-comment-alt fa-fw): **Utterances** comment system supported by [Utterances](https://utteranc.es/)

#### Extended Features

Expand Down
3 changes: 2 additions & 1 deletion exampleSite/content/about.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ math:

> [:(far fa-kiss-wink-heart fa-fw): 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/Fastbyte01/KeepIt)
![Hugo 主题 LoveIt](/images/Apple-Devices-Preview.png "Hugo 主题 LoveIt")

Expand Down Expand Up @@ -57,6 +57,7 @@ math:
* :(far fa-comments fa-fw): 支持 **[Facebook](https://developers.facebook.com/docs/plugins/comments/) 评论**系统
* :(fas fa-comment fa-fw): 支持 **[Telegram comments](https://comments.app/) 评论**系统
* :(fas fa-comment-dots fa-fw): 支持 **[Commento](https://commento.io/)** 评论系统
* :(far fa-comment-alt fa-fw): 支持 **[Utterances](https://utteranc.es/)** 评论系统

#### 扩展功能

Expand Down
36 changes: 31 additions & 5 deletions exampleSite/content/posts/theme-documentation-basics.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ Discover what the Hugo - **LoveIt** theme is all about and the core-concepts beh

Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only dependency of this theme.

Just install latest version of [:(far fa-file-archive fa-fw): Hugo extended (> 0.62.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**).
Just install latest version of [:(far fa-file-archive fa-fw): Hugo (> 0.62.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**).

{{< admonition note "Why not support earlier versions of Hugo?" >}}
Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks) was introduced in the [Hugo Christmas Edition](https://gohugo.io/news/0.62.0-relnotes/), this theme only supports Hugo versions above **0.62.0**.
{{< /admonition >}}

{{< admonition note "Why need the Hugo extended version?" >}}
Since the theme processes SCSS to CSS, Hugo needs to be the **extended** version.
{{< admonition tip "Hugo extended version is recommended" >}}
Since some features of this theme need to processes :(fab fa-sass fa-fw): SCSS to :(fab fa-css3 fa-fw): CSS, it is recommended to use Hugo **extended** version for better experience.
{{< /admonition >}}

## 2 Installation
Expand Down Expand Up @@ -254,6 +254,8 @@ Please open the code block below to view the complete sample configuration :(far
pre = ""
# you can add extra information after the name (HTML format is supported), such as icons
post = ""
# {{< version 0.2.5 >}} whether to use typeit animation for title name
typeit = false

# Footer config
[params.footer]
Expand Down Expand Up @@ -302,6 +304,8 @@ Please open the code block below to view the complete sample configuration :(far
gravatarEmail = ""
# URL of avatar shown in home page
avatarURL = "/images/avatar.png"
# {{< version 0.2.5 >}} title shown in home page
title = ""
# subtitle shown in home page
subtitle = "This is My New Hugo Site"
# whether to use typeit animation for subtitle
Expand All @@ -315,7 +319,8 @@ Please open the code block below to view the complete sample configuration :(far
enable = true
# special amount of posts in each home posts page
paginate = 6
# {{< version 0.2.0 deleted >}} default behavior when you don't set "hiddenFromHomePage" in front matter
# {{< version 0.2.0 deleted >}} replaced with hiddenFromHomePage in params.page
# default behavior when you don't set "hiddenFromHomePage" in front matter
defaultHiddenFromHomePage = false

# Social config about the author
Expand Down Expand Up @@ -528,6 +533,15 @@ Please open the code block below to view the complete sample configuration :(far
# {{< version 0.2.0 >}} {{< link "https://commento.io/" "Commento" >}} comment config
[params.page.comment.commento]
enable = false
# {{< version 0.2.5 >}} {{< link "https://utteranc.es/" "Utterances" >}} comment config
[params.page.comment.utterances]
enable = false
# owner/repo
repo = ""
issueTerm = "pathname"
label = ""
lightTheme = "github-light"
darkTheme = "github-dark"
# {{< version 0.2.0 >}} SEO config
[params.page.seo]
# Publisher info
Expand All @@ -548,6 +562,17 @@ Please open the code block below to view the complete sample configuration :(far
width = 800
height = 600

# {{< version 0.2.5 >}} TypeIt config
[params.typeit]
# typing speed between each step (measured in milliseconds)
speed = 100
# blinking speed of the cursor (measured in milliseconds)
cursorSpeed = 1000
# character used for the cursor (HTML format is supported)
cursorChar = "|"
# cursor duration after typing finishing (measured in milliseconds, "-1" means unlimited)
duration = -1

# Site verification code config for Google/Bing/Yandex/Pinterest/Baidu
[params.verification]
google = ""
Expand Down Expand Up @@ -608,7 +633,7 @@ Please open the code block below to view the complete sample configuration :(far
clipboardJS = ""
# {{< link "https://github.com/ellisonleao/sharer.js" "sharer.js" >}}@0.4.0
sharerJS = ""
# {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@6.5.1
# {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@7.0.4
typeitJS = ""
# {{< link "https://github.com/KaTeX/KaTeX" "katex" >}}@0.11.1
katexCSS = ""
Expand Down Expand Up @@ -823,6 +848,7 @@ In `config/css/_custom.scss`, you can add some css style code to customize the s
| Polish | `pl` | `pl` | :(far fa-square fa-fw): | :(far fa-square fa-fw): |
| Brazilian Portuguese | `pt-br` | `pt-BR` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Italian | `it` | `it` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |
| Spanish | `es` | `es` | :(far fa-square fa-fw): | :(far fa-check-square fa-fw): |

### 4.2 Basic Configuration

Expand Down
Loading

0 comments on commit 01bd6e8

Please sign in to comment.