Skip to content

Commit

Permalink
Merge pull request #295 from dillonzq/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq authored Apr 30, 2020
2 parents 1e7dab4 + 1af17ef commit 63d04c7
Show file tree
Hide file tree
Showing 40 changed files with 253 additions and 191 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Thanks to the authors of following resources included in the theme:
* [Lunr.js](https://lunrjs.com/)
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
* [lazysizes](https://github.com/aFarkas/lazysizes)
* [object-fit-images](https://github.com/fregante/object-fit-images)
* [Twemoji](https://github.com/twitter/twemoji)
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
* [clipboard.js](https://github.com/zenorocha/clipboard.js)
Expand Down
1 change: 1 addition & 0 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ LoveIt 主题中用到了以下项目,感谢它们的作者:
* [Lunr.js](https://lunrjs.com/)
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
* [lazysizes](https://github.com/aFarkas/lazysizes)
* [object-fit-images](https://github.com/fregante/object-fit-images)
* [Twemoji](https://github.com/twitter/twemoji)
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
* [clipboard.js](https://github.com/zenorocha/clipboard.js)
Expand Down
7 changes: 4 additions & 3 deletions assets/css/_core/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ body {
}
}

@import "../_partial/mask";
@include ms;
@include link(true, true);

@import "../_partial/mask";
@import "../_partial/icon";
@import "../_partial/details";
@import "../_partial/fixed-button";

a {
text-decoration: none;
img {
@include object-fit(contain);
}
12 changes: 12 additions & 0 deletions assets/css/_mixin/_compatibility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,15 @@
-ms-line-break: $value;
line-break: $value;
}

@mixin ms {
input::-ms-clear {
display: none;
}
}

@mixin object-fit($value) {
-o-object-fit: $value;
object-fit: $value;
font-family: 'object-fit: #{$value};';
}
2 changes: 2 additions & 0 deletions assets/css/_mixin/_link.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@mixin link($light, $dark) {
a, a::before, a::after {
text-decoration: none;

color: if($light, $global-link-color, $single-link-color);

[theme=dark] & {
Expand Down
2 changes: 1 addition & 1 deletion assets/css/_mixin/_summary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
height: 100%;
left: 0;
top: 0;
object-fit: cover;
@include object-fit(cover);
}

&:hover {
Expand Down
2 changes: 1 addition & 1 deletion assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
}

.lazyloading {
object-fit: none;
@include object-fit(none);
}

blockquote {
Expand Down
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.

7 changes: 4 additions & 3 deletions assets/lib/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ [email protected] https://github.com/algolia/autocomplete.js
[email protected] https://lunrjs.com/
[email protected] https://github.com/algolia/algoliasearch-client-javascript
[email protected] https://github.com/aFarkas/lazysizes
[email protected] https://github.com/fregante/object-fit-images
[email protected] https://github.com/twitter/twemoji
[email protected] https://github.com/sachinchoolur/lightgallery.js
[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@7.0.3 https://github.com/alexmacarthur/typeit
typeit@6.5.1 https://github.com/alexmacarthur/typeit
[email protected] https://katex.org/
[email protected] https://github.com/knsv/mermaid
[email protected] https://echarts.apache.org/
mapbox-gl@1.9.1 https://github.com/mapbox/mapbox-gl-js
mapbox-gl@1.10.0 https://github.com/mapbox/mapbox-gl-js
[email protected] https://github.com/MoePlayer/APlayer
[email protected] https://github.com/metowolf/MetingJS
[email protected] https://github.com/gitalk/gitalk
[email protected].9 https://valine.js.org/
[email protected].14 https://valine.js.org/
6 changes: 3 additions & 3 deletions assets/lib/mapbox-gl/mapbox-gl.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions assets/lib/object-fit-images/ofi.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions assets/lib/typeit/typeit.min.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions assets/lib/valine/Valine.min.js

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions assets/svg/version.template.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ enableEmoji = true
# type of search engine ("lunr", "algolia")
type = "algolia"
# max index length of the chunked content
contentLength = 5000
contentLength = 4000
# placeholder of the search bar
placeholder = ""
# max number of results length
Expand Down Expand Up @@ -310,7 +310,7 @@ enableEmoji = true
# 搜索引擎的类型 ("lunr", "algolia")
type = "algolia"
# 文章内容最长索引长度
contentLength = 5000
contentLength = 4000
# 搜索框的占位提示语
placeholder = ""
# 最大结果数目
Expand Down Expand Up @@ -500,7 +500,7 @@ enableEmoji = true
# type of search engine ("lunr", "algolia")
type = "algolia"
# max index length of the chunked content
contentLength = 5000
contentLength = 4000
# placeholder of the search bar
placeholder = ""
# max number of results length
Expand Down Expand Up @@ -947,6 +947,8 @@ enableEmoji = true
algoliasearchJS = ""
# [email protected] https://github.com/aFarkas/lazysizes
lazysizesJS = ""
# [email protected] https://github.com/fregante/object-fit-images
objectFitImagesJS = ""
# [email protected] https://github.com/twitter/twemoji
twemojiJS = ""
# [email protected] https://github.com/sachinchoolur/lightgallery.js
Expand All @@ -960,7 +962,7 @@ enableEmoji = true
clipboardJS = ""
# [email protected] https://github.com/ellisonleao/sharer.js
sharerJS = ""
# typeit@7.0.3 https://github.com/alexmacarthur/typeit
# typeit@6.5.1 https://github.com/alexmacarthur/typeit
typeitJS = ""
# [email protected] https://katex.org/
katexCSS = ""
Expand All @@ -974,7 +976,7 @@ enableEmoji = true
# [email protected] https://echarts.apache.org/
echartsJS = ""
echartsMacaronsJS = ""
# mapbox-gl@1.9.1 https://docs.mapbox.com/mapbox-gl-js
# mapbox-gl@1.10.0 https://docs.mapbox.com/mapbox-gl-js
mapboxGLCSS = ""
mapboxGLJS = ""
# [email protected] https://github.com/MoePlayer/APlayer
Expand All @@ -985,7 +987,7 @@ enableEmoji = true
# [email protected] https://github.com/gitalk/gitalk
gitalkCSS = ""
gitalkJS = ""
# [email protected].9 https://valine.js.org/
# [email protected].14 https://valine.js.org/
valineJS = ""

# Markup related configuration in Hugo
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/about.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ Thanks to the authors of following resources included in the theme:
* [Lunr.js](https://lunrjs.com/)
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
* [lazysizes](https://github.com/aFarkas/lazysizes)
* [object-fit-images](https://github.com/fregante/object-fit-images)
* [Twemoji](https://github.com/twitter/twemoji)
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
* [clipboard.js](https://github.com/zenorocha/clipboard.js)
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/about.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Thanks to the authors of following resources included in the theme:
* [Lunr.js](https://lunrjs.com/)
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
* [lazysizes](https://github.com/aFarkas/lazysizes)
* [object-fit-images](https://github.com/fregante/object-fit-images)
* [Twemoji](https://github.com/twitter/twemoji)
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
* [clipboard.js](https://github.com/zenorocha/clipboard.js)
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/about.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ LoveIt 主题中用到了以下项目,感谢它们的作者:
* [Lunr.js](https://lunrjs.com/)
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
* [lazysizes](https://github.com/aFarkas/lazysizes)
* [object-fit-images](https://github.com/fregante/object-fit-images)
* [Twemoji](https://github.com/twitter/twemoji)
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
* [clipboard.js](https://github.com/zenorocha/clipboard.js)
Expand Down
16 changes: 9 additions & 7 deletions exampleSite/content/posts/theme-documentation-basics.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Please open the code block below to view the complete sample configuration :(far
# type of search engine ("lunr", "algolia")
type = "lunr"
# max index length of the chunked content
contentLength = 5000
contentLength = 4000
# placeholder of the search bar
placeholder = ""
# {{< version 0.2.1 >}} max number of results length
Expand Down Expand Up @@ -587,6 +587,8 @@ Please open the code block below to view the complete sample configuration :(far
algoliasearchJS = ""
# {{< link "https://github.com/aFarkas/lazysizes" "lazysizes" >}}@5.2.0
lazysizesJS = ""
# {{< version 0.2.3 >}} {{< link "https://github.com/fregante/object-fit-images" "object-fit-images" >}}@3.2.4
objectFitImagesJS = ""
# {{< version 0.2.0 >}} {{< link "https://github.com/twitter/twemoji" "twemoji" >}}@12.1.5
twemojiJS = ""
# {{< link "https://github.com/sachinchoolur/lightgallery.js" "lightgallery.js" >}}@1.1.3
Expand All @@ -600,7 +602,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" >}}@7.0.3
# {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@6.5.1
typeitJS = ""
# {{< link "https://github.com/KaTeX/KaTeX" "katex" >}}@0.11.1
katexCSS = ""
Expand All @@ -614,7 +616,7 @@ Please open the code block below to view the complete sample configuration :(far
# {{< link "https://echarts.apache.org/" "echarts" >}}@4.7.0
echartsJS = ""
echartsMacaronsJS = ""
# {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.9.1
# {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.10.0
mapboxGLCSS = ""
mapboxGLJS = ""
# {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1
Expand All @@ -625,7 +627,7 @@ Please open the code block below to view the complete sample configuration :(far
# {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2
gitalkCSS = ""
gitalkJS = ""
# {{< link "https://valine.js.org/" "valine" >}}@1.4.9
# {{< link "https://valine.js.org/" "valine" >}}@1.4.14
valineJS = ""

# Markup related config in Hugo
Expand Down Expand Up @@ -972,7 +974,7 @@ Here is the search configuration in your [site configuration](#site-configuratio
# type of search engine ("lunr", "algolia")
type = "lunr"
# max index length of the chunked content
contentLength = 5000
contentLength = 4000
# placeholder of the search bar
placeholder = ""
# {{< version 0.2.1 >}} max number of results length
Expand All @@ -992,8 +994,8 @@ The following is a comparison of two search engines:
but high bandwidth and low performance (Especially for Chinese which needs a large segmentit library)
* `algolia`: high performance and low bandwidth, but need to synchronize `index.json` and limit for `contentLength`

{{< version 0.2.1 >}} The content of the post is separated by `h2` HTML tag to improve query performance and basically implement full-text search.
`contentLength` is used to limit the max index length of the part starting with `h2` HTML tag.
{{< version 0.2.3 >}} The content of the post is separated by `h2` and `h3` HTML tag to improve query performance and basically implement full-text search.
`contentLength` is used to limit the max index length of the part starting with `h2` and `h3` HTML tag.
{{< /admonition >}}

{{< admonition tip "Tips about algolia" >}}
Expand Down
16 changes: 9 additions & 7 deletions exampleSite/content/posts/theme-documentation-basics.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Please open the code block below to view the complete sample configuration :(far
# type of search engine ("lunr", "algolia")
type = "lunr"
# max index length of the chunked content
contentLength = 5000
contentLength = 4000
# placeholder of the search bar
placeholder = ""
# {{< version 0.2.1 >}} max number of results length
Expand Down Expand Up @@ -592,6 +592,8 @@ Please open the code block below to view the complete sample configuration :(far
algoliasearchJS = ""
# {{< link "https://github.com/aFarkas/lazysizes" "lazysizes" >}}@5.2.0
lazysizesJS = ""
# {{< version 0.2.3 >}} {{< link "https://github.com/fregante/object-fit-images" "object-fit-images" >}}@3.2.4
objectFitImagesJS = ""
# {{< version 0.2.0 >}} {{< link "https://github.com/twitter/twemoji" "twemoji" >}}@12.1.5
twemojiJS = ""
# {{< link "https://github.com/sachinchoolur/lightgallery.js" "lightgallery.js" >}}@1.1.3
Expand All @@ -605,7 +607,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" >}}@7.0.3
# {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@6.5.1
typeitJS = ""
# {{< link "https://github.com/KaTeX/KaTeX" "katex" >}}@0.11.1
katexCSS = ""
Expand All @@ -619,7 +621,7 @@ Please open the code block below to view the complete sample configuration :(far
# {{< link "https://echarts.apache.org/" "echarts" >}}@4.7.0
echartsJS = ""
echartsMacaronsJS = ""
# {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.9.1
# {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.10.0
mapboxGLCSS = ""
mapboxGLJS = ""
# {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1
Expand All @@ -630,7 +632,7 @@ Please open the code block below to view the complete sample configuration :(far
# {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2
gitalkCSS = ""
gitalkJS = ""
# {{< link "https://valine.js.org/" "valine" >}}@1.4.9
# {{< link "https://valine.js.org/" "valine" >}}@1.4.14
valineJS = ""

# Markup related config in Hugo
Expand Down Expand Up @@ -977,7 +979,7 @@ Here is the search configuration in your [site configuration](#site-configuratio
# type of search engine ("lunr", "algolia")
type = "lunr"
# max index length of the chunked content
contentLength = 5000
contentLength = 4000
# placeholder of the search bar
placeholder = ""
# {{< version 0.2.1 >}} max number of results length
Expand All @@ -997,8 +999,8 @@ The following is a comparison of two search engines:
but high bandwidth and low performance (Especially for Chinese which needs a large segmentit library)
* `algolia`: high performance and low bandwidth, but need to synchronize `index.json` and limit for `contentLength`

{{< version 0.2.1 >}} The content of the post is separated by `h2` HTML tag to improve query performance and basically implement full-text search.
`contentLength` is used to limit the max index length of the part starting with `h2` HTML tag.
{{< version 0.2.3 >}} The content of the post is separated by `h2` and `h3` HTML tag to improve query performance and basically implement full-text search.
`contentLength` is used to limit the max index length of the part starting with `h2` and `h3` HTML tag.
{{< /admonition >}}

{{< admonition tip "Tips about algolia" >}}
Expand Down
Loading

0 comments on commit 63d04c7

Please sign in to comment.