Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
feat(shortcode): refactor and improve image shortcode (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq authored Mar 19, 2020
1 parent 84d48f3 commit 774e831
Show file tree
Hide file tree
Showing 17 changed files with 650 additions and 279 deletions.
32 changes: 32 additions & 0 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,38 @@
@import "../_partial/_single/toc";

.content {
> h2 {
font-size: 1.5rem;

& code {
font-size: 1.25rem;
}
}

> h3 {
font-size: 1.375rem;

& code {
font-size: 1.125rem;
}
}

> h4 {
font-size: 1.25rem;

& code {
font-size: 1rem;
}
}

> h5 {
font-size: 1.125rem;
}

> h6 {
font-size: 1rem;
}

h2,
h3,
h4,
Expand Down
8 changes: 4 additions & 4 deletions assets/svg/loading.small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ enableEmoji = true
[languages.en.menu]
[[languages.en.menu.main]]
identifier = "posts"
# you can add extra information before the name (HTML format is allowed), such as icons
# you can add extra information before the name (HTML format is supported), such as icons
pre = ""
name = "Posts"
url = "/posts/"
Expand Down Expand Up @@ -108,7 +108,7 @@ enableEmoji = true
typeit = true
# whether to show social links
social = true
# disclaimer (HTML format is allowed)
# disclaimer (HTML format is supported)
disclaimer = ""
# Home Page Posts
[languages.en.params.home.posts]
Expand Down Expand Up @@ -342,7 +342,7 @@ enableEmoji = true
typeit = true
# 是否显示社交账号
social = true
# 免责声明 (允许使用 HTML 格式)
# 免责声明 (支持 HTML 格式)
disclaimer = ""
# 主页文章列表
[languages.zh-cn.params.home.posts]
Expand Down Expand Up @@ -576,7 +576,7 @@ enableEmoji = true
typeit = true
# whether to show social links
social = true
# disclaimer (HTML format is allowed)
# disclaimer (HTML format is supported)
disclaimer = ""
# Home Page Posts
[languages.fr.params.home.posts]
Expand Down Expand Up @@ -753,11 +753,11 @@ enableEmoji = true
# Site creation time
# 网站创立年份
since = 2019
# ICP info only in China (HTML format is allowed)
# ICP 备案信息,仅在中国使用 (允许使用 HTML 格式)
# ICP info only in China (HTML format is supported)
# ICP 备案信息,仅在中国使用 (支持 HTML 格式)
icp = ""
# license info (HTML format is allowed)
# 许可协议信息 (允许使用 HTML 格式)
# license info (HTML format is supported)
# 许可协议信息 (支持 HTML 格式)
license= '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
# Page config
# 文章页面配置
Expand Down
10 changes: 5 additions & 5 deletions exampleSite/content/posts/theme-documentation-basics.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-ma
{{< /admonition >}}

{{< admonition note "Why need the Hugo extended version?" >}}
Since this theme processes SCSS to CSS, the Hugo extended version is needed.
Since this theme processes SCSS to CSS, Hugo needs to be the extended version.
{{< /admonition >}}

## 2 Installation
Expand Down Expand Up @@ -99,7 +99,7 @@ theme = "LoveIt"
[menu]
[[menu.main]]
identifier = "posts"
# you can add extra information before the name (HTML format is allowed), such as icons
# you can add extra information before the name (HTML format is supported), such as icons
pre = ""
name = "Posts"
url = "/posts/"
Expand Down Expand Up @@ -206,9 +206,9 @@ Note that some of these parameters are explained in details in other sections of
[params.footer]
# Site creation time
since = 2019
# ICP info only in China (HTML format is allowed)
# ICP info only in China (HTML format is supported)
icp = ""
# license info (HTML format is allowed)
# license info (HTML format is supported)
license = '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
# Home Page Info
[params.home]
Expand All @@ -226,7 +226,7 @@ Note that some of these parameters are explained in details in other sections of
# whether to show social links
social = true
# {{< version 0.2.0 >}}
# disclaimer (HTML format is allowed)
# disclaimer (HTML format is supported)
disclaimer = ""
# Home Page Posts
[params.home.posts]
Expand Down
10 changes: 5 additions & 5 deletions exampleSite/content/posts/theme-documentation-basics.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-ma
{{< /admonition >}}

{{< admonition note "Why need the Hugo extended version?" >}}
Since this theme processes SCSS to CSS, the Hugo extended version is needed.
Since this theme processes SCSS to CSS, Hugo needs to be the extended version.
{{< /admonition >}}

## 2 Installation
Expand Down Expand Up @@ -104,7 +104,7 @@ theme = "LoveIt"
[menu]
[[menu.main]]
identifier = "posts"
# you can add extra information before the name (HTML format is allowed), such as icons
# you can add extra information before the name (HTML format is supported), such as icons
pre = ""
name = "Posts"
url = "/posts/"
Expand Down Expand Up @@ -211,9 +211,9 @@ Note that some of these parameters are explained in details in other sections of
[params.footer]
# Site creation time
since = 2019
# ICP info only in China (HTML format is allowed)
# ICP info only in China (HTML format is supported)
icp = ""
# license info (HTML format is allowed)
# license info (HTML format is supported)
license = '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
# Home Page Info
[params.home]
Expand All @@ -231,7 +231,7 @@ Note that some of these parameters are explained in details in other sections of
# whether to show social links
social = true
# {{< version 0.2.0 >}}
# disclaimer (HTML format is allowed)
# disclaimer (HTML format is supported)
disclaimer = ""
# Home Page Posts
[params.home.posts]
Expand Down
6 changes: 3 additions & 3 deletions exampleSite/content/posts/theme-documentation-basics.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ hugo
[params.footer]
# 网站创立年份
since = 2019
# ICP 备案信息,仅在中国使用 (允许使用 HTML 格式)
# ICP 备案信息,仅在中国使用 (支持 HTML 格式)
icp = ""
# 许可协议信息 (允许使用 HTML 格式)
# 许可协议信息 (支持 HTML 格式)
license = '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
# 文章页面配置
[params.home]
Expand All @@ -229,7 +229,7 @@ hugo
# 是否显示社交账号
social = true
# {{< version 0.2.0 >}}
# 免责声明 (允许使用 HTML 格式)
# 免责声明 (支持 HTML 格式)
disclaimer = ""
# 主页文章列表
[params.home.posts]
Expand Down
Loading

0 comments on commit 774e831

Please sign in to comment.