jekyll-theme-mdui 0.5.2.4 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +21 -21
  3. data/README.md +88 -89
  4. data/_includes/analytics/google.html +7 -7
  5. data/_includes/comment/comment.html +2 -2
  6. data/_includes/comment/disqus.html +72 -75
  7. data/_includes/comment/gitment.html +16 -16
  8. data/_includes/comment/livere.html +42 -26
  9. data/_includes/comment/valine.html +37 -18
  10. data/_includes/component/customCssJS.html +7 -7
  11. data/_includes/component/nprogress.html +24 -24
  12. data/_includes/component/sw.html +6 -6
  13. data/_includes/component/totop.html +13 -13
  14. data/_includes/content/category_list.html +86 -86
  15. data/_includes/content/category_post_list.html +108 -100
  16. data/_includes/content/component/highlight.html +11 -11
  17. data/_includes/content/component/imgboxed.html +304 -304
  18. data/_includes/content/component/lastupdate.html +35 -35
  19. data/_includes/content/component/lazyload.html +6 -6
  20. data/_includes/content/component/page_tags.html +17 -17
  21. data/_includes/content/component/qrcode.html +26 -26
  22. data/_includes/content/component/readtime.html +27 -27
  23. data/_includes/content/component/sns_share.html +42 -42
  24. data/_includes/content/component/toc.html +84 -84
  25. data/_includes/content/editor.html +1058 -1058
  26. data/_includes/content/friends.html +23 -23
  27. data/_includes/content/love.html +123 -0
  28. data/_includes/content/page_content.html +92 -87
  29. data/_includes/content/page_content_no_toc.html +69 -64
  30. data/_includes/content/paginator_button.html +24 -24
  31. data/_includes/content/paginator_post_list.html +103 -95
  32. data/_includes/content/tags_list.html +99 -99
  33. data/_includes/footer/footer.html +30 -30
  34. data/_includes/head.html +90 -87
  35. data/_includes/header/header.html +174 -174
  36. data/_includes/meng/aplayer.html +100 -100
  37. data/_includes/meng/background.html +34 -34
  38. data/_includes/meng/card.html +13 -13
  39. data/_includes/meng/console.html +10 -10
  40. data/_includes/meng/cplayer.html +61 -61
  41. data/_includes/meng/cursor.html +8 -8
  42. data/_includes/meng/head_card.html +67 -67
  43. data/_includes/meng/live2d.html +60 -60
  44. data/_includes/meng/title.html +23 -23
  45. data/_includes/submission/baidu.html +13 -13
  46. data/_layouts/category_content.html +3 -3
  47. data/_layouts/category_list.html +3 -3
  48. data/_layouts/compress.html +9 -9
  49. data/_layouts/default.html +49 -49
  50. data/_layouts/editor.html +4 -4
  51. data/_layouts/friends.html +3 -3
  52. data/_layouts/home.html +20 -20
  53. data/_layouts/love.html +4 -0
  54. data/_layouts/page.html +12 -12
  55. data/_layouts/post.html +12 -12
  56. data/_layouts/tags.html +4 -4
  57. data/assets/css/global.css +181 -181
  58. metadata +7 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17693c928906239453a1fa8894b35894548aad497f11e258a23cb2b9971a8df1
4
- data.tar.gz: 3aa865aeb3678052fdb1ef42c3a24cc86025099de0a3763a7fbade4b44cd5966
3
+ metadata.gz: 5d4c3fd348dfe948b4a10795fb0765f07b6a8d18dd66bcf5d8a7fa815456f583
4
+ data.tar.gz: 1ab2e81b157aa3d710e6786170c686be16b9814a54f2e5b92ee51a75dc1b09c0
5
5
  SHA512:
6
- metadata.gz: 33bc0d73673c3e4baeb0e84c43248b785af732fad85da093a32b48c4613b9917c965f1db16163bb464ccd879fb31b3dc8a9a19ed600b6601626e4dceeec4f243
7
- data.tar.gz: ca0c7ecd6a093101cc8a442cf5e99a6ff56e16d1f05322351f147ec4e9bcae219d9ba6b55713e9913075fc4437282714d7b249fe054166ed507f3dadc22a08bf
6
+ metadata.gz: 340f2ea014d740e65d034ce72f4b689ca2a16a445734d2362e21790989b852a3c9150325ef9aa112226ac3c251a3e384ede51d886c926ef0364e04569a248d1b
7
+ data.tar.gz: 5c9d62a7bc389b8e55c80a875483b746190768be5cefc26fe958a386ad934c9b6b5851491f7fcabe5ed5129f475defaf020fdd2c6d32da740a6be8cc4711b291
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,89 +1,88 @@
1
- ![](/jekylltheme.jpg)
2
-
3
- # Jekyll Theme MDUI
4
-
5
- > A Jekyll theme based on mdui
6
-
7
- > 主题停更,只做兼容性维护。期待 V2 吧!
8
-
9
- ## Contents
10
-
11
- * [General](#general)
12
- * [Demo](#demo)
13
- * [Quick start](#quick-start)
14
- * [Docs](#docs)
15
- * [TODO](#todo)
16
- * [Note](#note)
17
- * [Contributing](#contributing)
18
- * [Development](#development)
19
- * [License](#license)
20
-
21
- ## General
22
-
23
- [![Version](https://img.shields.io/badge/version-0.5.2-green.svg?style=flat-square)]()
24
- [![Jekyll](https://img.shields.io/badge/Jekyll-3.5+-green.svg?style=flat-square)](https://jekyllrb.com/)
25
- [![Gem](https://img.shields.io/gem/dt/jekyll-theme-mdui.svg?style=flat-square)](https://rubygems.org/gems/jekyll-theme-mdui/)
26
-
27
- [![Code Climate](https://img.shields.io/codeclimate/maintainability/KeJunMao/jekyll-theme-mdui.svg?style=flat-square&label=code%20climate)](https://codeclimate.com/github/KeJunMao/jekyll-theme-mdui/)
28
- [![Build Status](https://img.shields.io/travis/KeJunMao/jekyll-theme-mdui.svg?style=flat-square)](https://travis-ci.org/KeJunMao/jekyll-theme-mdui)
29
- [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/)
30
-
31
- [![Author](https://img.shields.io/badge/author-KeJun-blue.svg?style=flat-square)](https://blog.kejun.space)
32
-
33
- ## Demo
34
-
35
- [KeJun's Blog](https://blog.kejun.me)
36
-
37
- ## Quick start
38
-
39
- [Quick start](http://mdui.kejun.space/#/quickstart)
40
-
41
- [快速开始](http://mdui.kejun.space/#/zh-cn/quickstart)
42
-
43
- ## Docs
44
-
45
- [Docs](http://mdui.kejun.space/#/)(!!!Need Help!!!)
46
-
47
- [中文文档](http://mdui.kejun.space/#/zh-cn/)
48
-
49
- ## TODO
50
-
51
- - [ ] V2
52
-
53
- ## Note
54
-
55
- File Required or Optional:
56
-
57
- |files|Required or Optional|Description|
58
- |--- |--- |--- |
59
- |mainifest.json|Optional |Is the only file that every WebExtension must contain.See [here](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json).|
60
- |sw.js|Optional |Service Workers.See [here](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers).|
61
- |search.json|Optional|If you use the search page, it is required.|
62
- |tags.json|Optional|If you use the tags page, it is required.|
63
- |_data/friends.yml|Optional|If you use the friends page, it is required.|
64
- |_data/sns.yml|Optional|It is footer sns,if you want used, it is required.|
65
- |_data/meng.yml|Optional|It is Meng option,if you want used, it is required.|
66
- |_data/site.yml|Required|It is theme config.|
67
- |_data/lang.yml|Required|It is language config.|
68
- |_data/menus.yml|Required|It is site menus config.|
69
-
70
- How to use? See Docs.
71
-
72
- ## Contributing
73
-
74
- Bug reports and pull requests are welcome on GitHub at https://github.com/KeJunMao/jekyll-theme-mdui. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
75
-
76
- ## Development
77
-
78
- To set up your environment to develop this theme, run `bundle install`.
79
-
80
- Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
81
-
82
- When your theme is released, only the files in `_layouts`, `_includes`, and `assets` tracked with Git will be released.
83
-
84
- ## License
85
-
86
- [![license](https://img.shields.io/github/license/KeJunMao/jekyll-theme-mdui.svg?style=flat-square)](https://github.com/KeJunMao/jekyll-theme-mdui/blob/master/LICENSE.txt)
87
-
88
- The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
89
-
1
+ ![](/jekylltheme.jpg)
2
+
3
+ # Jekyll Theme MDUI
4
+
5
+ > A Jekyll theme based on mdui
6
+
7
+ > 主题停更,只做兼容性维护。期待 V2 吧!
8
+
9
+ ## Contents
10
+
11
+ * [General](#general)
12
+ * [Demo](#demo)
13
+ * [Quick start](#quick-start)
14
+ * [Docs](#docs)
15
+ * [TODO](#todo)
16
+ * [Note](#note)
17
+ * [Contributing](#contributing)
18
+ * [Development](#development)
19
+ * [License](#license)
20
+
21
+ ## General
22
+
23
+ [![Version](https://img.shields.io/badge/version-0.5.3-green.svg?style=flat-square)]()
24
+ [![Jekyll](https://img.shields.io/badge/Jekyll-3.5+-green.svg?style=flat-square)](https://jekyllrb.com/)
25
+ [![Gem](https://img.shields.io/gem/dt/jekyll-theme-mdui.svg?style=flat-square)](https://rubygems.org/gems/jekyll-theme-mdui/)
26
+
27
+ [![Code Climate](https://img.shields.io/codeclimate/maintainability/KeJunMao/jekyll-theme-mdui.svg?style=flat-square&label=code%20climate)](https://codeclimate.com/github/KeJunMao/jekyll-theme-mdui/)
28
+ [![Build Status](https://img.shields.io/travis/KeJunMao/jekyll-theme-mdui.svg?style=flat-square)](https://travis-ci.org/KeJunMao/jekyll-theme-mdui)
29
+ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/)
30
+
31
+ [![Author](https://img.shields.io/badge/author-KeJun-blue.svg?style=flat-square)](https://blog.kejun.me)
32
+
33
+ ## Demo
34
+
35
+ [KeJun's Blog](https://blog.kejun.me)
36
+
37
+ ## Quick start
38
+
39
+ [Quick start](http://mdui.kejun.me/#/quickstart)
40
+
41
+ [快速开始](http://mdui.kejun.me/#/zh-cn/quickstart)
42
+
43
+ ## Docs
44
+
45
+ [Docs](http://mdui.kejun.me/#/)(!!!Need Help!!!)
46
+
47
+ [中文文档](http://mdui.kejun.me/#/zh-cn/)
48
+
49
+ ## TODO
50
+
51
+ - [ ] V2
52
+
53
+ ## Note
54
+
55
+ File Required or Optional:
56
+
57
+ |files|Required or Optional|Description|
58
+ |--- |--- |--- |
59
+ |mainifest.json|Optional |Is the only file that every WebExtension must contain.See [here](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json).|
60
+ |sw.js|Optional |Service Workers.See [here](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers).|
61
+ |search.json|Optional|If you use the search page, it is required.|
62
+ |tags.json|Optional|If you use the tags page, it is required.|
63
+ |_data/friends.yml|Optional|If you use the friends page, it is required.|
64
+ |_data/sns.yml|Optional|It is footer sns,if you want used, it is required.|
65
+ |_data/meng.yml|Optional|It is Meng option,if you want used, it is required.|
66
+ |_data/site.yml|Required|It is theme config.|
67
+ |_data/lang.yml|Required|It is language config.|
68
+ |_data/menus.yml|Required|It is site menus config.|
69
+
70
+ How to use? See Docs.
71
+
72
+ ## Contributing
73
+
74
+ Bug reports and pull requests are welcome on GitHub at https://github.com/KeJunMao/jekyll-theme-mdui. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
75
+
76
+ ## Development
77
+
78
+ To set up your environment to develop this theme, run `bundle install`.
79
+
80
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
81
+
82
+ When your theme is released, only the files in `_layouts`, `_includes`, and `assets` tracked with Git will be released.
83
+
84
+ ## License
85
+
86
+ [![license](https://img.shields.io/github/license/KeJunMao/jekyll-theme-mdui.svg?style=flat-square)](https://github.com/KeJunMao/jekyll-theme-mdui/blob/master/LICENSE.txt)
87
+
88
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,8 +1,8 @@
1
- <script type="text/javascript">
2
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
6
- ga('create', '{{ site.data.site.google_analytics }}', 'auto');
7
- ga('send', 'pageview');
1
+ <script type="text/javascript">
2
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
6
+ ga('create', '{{ site.data.site.google_analytics }}', 'auto');
7
+ ga('send', 'pageview');
8
8
  </script>
@@ -1,3 +1,3 @@
1
- {% if site.data.site.comment.used != "" %}
2
- {% include comment/{{site.data.site.comment.used}}.html %}
1
+ {% if site.data.site.comment.used != "" %}
2
+ {% include comment/{{site.data.site.comment.used}}.html %}
3
3
  {% endif %}
@@ -1,75 +1,72 @@
1
- {% if site.data.site.lang == null or site.data.site.lang == "" %}
2
- {% assign lang = site.data.lang.en-US %}
3
- {% else %}
4
- {% assign lang = site.data.lang[site.data.site.lang] %}
5
- {% endif %}
6
- <style>
7
- #disqus_thread{
8
- padding: 16px;
9
- display: none;
10
- }
11
- </style>
12
- {% if site.data.site.comment.disqus_shortname != "" %}
13
- <div class="mdui-divider"></div>
14
- {% if site.data.site.comment.disqus_proxy == false %}
15
- {% if site.data.site.comment.disqus_button == true %}
16
- <button id="load-disqus" class="mdui-btn mdui-btn-block mdui-center" onclick="disqus.load();" data="{{ site.data.site.comment.disqus_shortname }}">{{lang.post.comments_load_button}}</button>
17
- <div id="disqus_thread"></div>
18
- <script>
19
- var disqus = {
20
- load :
21
- function disqus(){
22
- $('#disqus_thread').css('display','block');
23
- if ($('#dsq-app4').attr('name') == 'dsq-app4'){
24
- DISQUS.reset({
25
- reload: true,
26
- config: function () {
27
- }
28
- });
29
- }else{
30
- var disqus_shortname = $("#load-disqus").attr("data");
31
- if(typeof DISQUS !== 'object') {
32
- (function () {
33
- var s = document.createElement('script'); s.async = true;
34
- s.type = 'text/javascript';
35
- s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
36
- (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
37
- }());
38
- }
39
- }
40
- $('#load-disqus').remove();
41
- }
42
- };
43
- </script>
44
- {% else %}
45
- <div id="disqus_thread"></div>
46
- <script>
47
- function disqus(){
48
- var disqus_shortname = '{{ site.data.site.comment.disqus_shortname }}';
49
- if(typeof DISQUS !== 'object') {
50
- (function () {
51
- var s = document.createElement('script'); s.async = true;
52
- s.type = 'text/javascript';
53
- s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
54
- (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
55
- }());
56
- }
57
- if ($('#dsq-app4').attr('name') == 'dsq-app4'){
58
- DISQUS.reset({
59
- reload: true,
60
- config: function () {
61
- }
62
- });
63
- }
64
- }
65
- disqus();
66
- </script>
67
- {% endif %}
68
- {% endif %}
69
- {% if site.data.site.comment.disqus_proxy %}
70
- <div class="mdui-divider"></div>
71
- <div id="disqusreadonly" style="padding-top: 16px;">
72
- </div>
73
- {% endif %}
74
- {% endif %}
75
-
1
+ {% if site.data.site.lang == null or site.data.site.lang == "" %}
2
+ {% assign lang = site.data.lang.en-US %}
3
+ {% else %}
4
+ {% assign lang = site.data.lang[site.data.site.lang] %}
5
+ {% endif %}
6
+ <style>
7
+ #disqus_thread {
8
+ padding: 16px;
9
+ display: none;
10
+ }
11
+ </style>
12
+ {% if site.data.site.comment.disqus_shortname != "" %}
13
+ <div class="mdui-divider"></div>
14
+ {% if site.data.site.comment.disqus_proxy == false %}
15
+ {% if site.data.site.comment.disqus_button == true %}
16
+ <button id="load-disqus" class="mdui-btn mdui-btn-block mdui-center" onclick="disqus.load();"
17
+ data="{{ site.data.site.comment.disqus_shortname }}">{{lang.post.comments_load_button}}</button>
18
+ <div id="disqus_thread"></div>
19
+ <script>
20
+ var disqus = {
21
+ load: function disqus() {
22
+ $('#disqus_thread').css('display', 'block');
23
+ var disqus_shortname = $("#load-disqus").attr("data");
24
+ if (typeof DISQUS !== 'object') {
25
+ (function () {
26
+ var s = document.createElement('script');
27
+ s.async = true;
28
+ s.type = 'text/javascript';
29
+ s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
30
+ (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0])
31
+ .appendChild(s);
32
+ }());
33
+ } else {
34
+ DISQUS.reset({
35
+ reload: true,
36
+ });
37
+ }
38
+ $('#load-disqus').remove();
39
+ }
40
+ };
41
+ </script>
42
+ {% else %}
43
+ <div id="disqus_thread"></div>
44
+ <script>
45
+ function disqus() {
46
+ var disqus_shortname = '{{ site.data.site.comment.disqus_shortname }}';
47
+ if (typeof DISQUS !== 'object') {
48
+ (function () {
49
+ var s = document.createElement('script');
50
+ s.async = true;
51
+ s.type = 'text/javascript';
52
+ s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
53
+ (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(
54
+ s);
55
+ }());
56
+ } else {
57
+ DISQUS.reset({
58
+ reload: true,
59
+ config: function () {}
60
+ });
61
+ }
62
+ }
63
+ disqus();
64
+ </script>
65
+ {% endif %}
66
+ {% endif %}
67
+ {% if site.data.site.comment.disqus_proxy %}
68
+ <div class="mdui-divider"></div>
69
+ <div id="disqusreadonly" style="padding-top: 16px;">
70
+ </div>
71
+ {% endif %}
72
+ {% endif %}
@@ -1,17 +1,17 @@
1
- <div style="padding:0px 16px;" id="comments"></div>
2
- <link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
3
- <script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
4
- <script>
5
- setTimeout(function () {
6
- var gitment = new Gitment({
7
- id: '',
8
- owner: '{{site.data.site.comment.owner}}',
9
- repo: '{{site.data.site.comment.repo}}',
10
- oauth: {
11
- client_id: '{{site.data.site.comment.client_id}}',
12
- client_secret: '{{site.data.site.comment.client_secret}}',
13
- },
14
- });
15
- gitment.render('comments');
16
- }, 1000)
1
+ <div style="padding:0px 16px;" id="comments"></div>
2
+ <link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
3
+ <script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
4
+ <script>
5
+ setTimeout(function () {
6
+ var gitment = new Gitment({
7
+ id: '{{ page.title }}',
8
+ owner: '{{site.data.site.comment.owner}}',
9
+ repo: '{{site.data.site.comment.repo}}',
10
+ oauth: {
11
+ client_id: '{{site.data.site.comment.client_id}}',
12
+ client_secret: '{{site.data.site.comment.client_secret}}',
13
+ },
14
+ });
15
+ gitment.render('comments');
16
+ }, 1000)
17
17
  </script>
@@ -1,27 +1,43 @@
1
- <!-- 来必力City版安装代码 -->
2
- <div id="lv-container" style="padding:0px 16px;" data-id="{{site.data.site.comment.livere_type}}" data-uid="{{site.data.site.comment.livere_data_uid}}">
3
- <script type="text/javascript">
4
- (function (d, s) {
5
- var j, e = d.getElementsByTagName(s)[0];
6
-
7
- if (typeof LivereTower === 'function') { return; }
8
-
9
- j = d.createElement(s);
10
- j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
11
- j.async = true;
12
-
13
- e.parentNode.insertBefore(j, e);
14
- })(document, 'script');
15
- setTimeout(function () {
16
- if ($('iframe').length == 3) {
17
- var livereFlag = true;
18
- } else {
19
- $('body').find('iframe').remove();
20
- LivereTower.init();
21
- var livereFlag = false;
22
- }
23
- }, 2000);
24
- </script>
25
- <noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
26
- </div>
1
+ <!-- 来必力City版安装代码 -->
2
+ <script>
3
+ var livereurl = 'http://' + (document.location.hostname || document.location.host);
4
+ $(document).delegate('a[href^="/"],a[href^="' + livereurl + '"]', "click", function (e) {
5
+ $('script[src="https://cdn-city.livere.com/js/embed.dist.js"]').remove();
6
+ });
7
+ </script>
8
+ <style>
9
+ iframe+iframe {
10
+ display: none;
11
+ }
12
+ </style>
13
+ <div style="padding:0px 16px;" id="lv-container" data-id="{{site.data.site.comment.livere_type}}" data-uid="{{site.data.site.comment.livere_data_uid}}">
14
+ <script type="text/javascript">
15
+ $(function () {
16
+ (function (d, s) {
17
+ var j, e = d.getElementsByTagName(s)[0];
18
+
19
+ if (typeof LivereTower === 'function') {
20
+ return;
21
+ }
22
+
23
+ j = d.createElement(s);
24
+ j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
25
+ j.async = true;
26
+
27
+ e.parentNode.insertBefore(j, e);
28
+ })(document, 'script');
29
+ $('script[src="https://cdn-city.livere.com/js/embed.dist.js"]').eq(1).remove();
30
+ setTimeout(function () {
31
+ if ($('iframe').length == 2) {
32
+ var livereFlag = true;
33
+ } else {
34
+ $('body').find('iframe').eq(2).remove();
35
+ $('body').find('iframe').eq(3).remove();
36
+ var livereFlag = false;
37
+ }
38
+ }, 1000);
39
+ })
40
+ </script>
41
+ <noscript> 为正常使用来必力评论功能请激活JavaScript</noscript>
42
+ </div>
27
43
  <!-- City版安装代码已完成 -->