taletype 0.1.7 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fedae7750e52dc20a1d8f8990ef3d83be8166e1a355d313ebb215c43a9fcdec
4
- data.tar.gz: 838842aa575ff21ec7418918b0e4c9a8b08ee527089e630a459fede5532c3290
3
+ metadata.gz: 5e7e24d6c6d4256533303f7c98df2fd2b844b01fe1178451623e1be9f0bab1a6
4
+ data.tar.gz: 29eb5f3ffb4a2e8cb56d1d1b7a8fe30d1e3bbcb0d0d8154cf6539ec4bebea490
5
5
  SHA512:
6
- metadata.gz: ce025d52d350b5bd4baf6138e428bd684d02e72b147abbb9a9de75fa16f7cfe44807c11693b7ec1b1246fe3fd4dc331adef9aa3484e555a9a86f8068d1808bef
7
- data.tar.gz: 887f6d4cb4548a027bd4148c0742d1bf74be12d06464a8fe251e2fc2a1cc74765584a36ef94be9ddf0d18a8649140bd5c3267cf81f54c1bda8b8804234ed9f68
6
+ metadata.gz: 697d126faecc47be1e91eca904195f87a0f8d9fe203ac1cf3eb6b6d79087b2d78599a25f40fe82a520f099921df3ea9b53367c922a64de628b606fd50fdd1a0e
7
+ data.tar.gz: 87bd67b640e3e249c3229c44f36931ed6675ebef81b5df48dfc0be6ffd75239e17bf6b7cd7ec5e46a41b4e954211f6305c33a338b812d488eb498f3fb7b4a3ae
@@ -1,4 +1,4 @@
1
- <script>
1
+ <script async type="text/javascript">
2
2
  var _hmt = _hmt || [];
3
3
  (function() {
4
4
  var hm = document.createElement("script");
@@ -7,15 +7,3 @@
7
7
  s.parentNode.insertBefore(hm, s);
8
8
  })();
9
9
  </script>
10
-
11
- <!-- baidu auto push for seo -->
12
- <script>
13
- window.addEventListener('load', function () {
14
- var src = 'http://push.zhanzhang.baidu.com/push.js'
15
- var curProtocol = window.location.protocol.split(':')[0];
16
- if (curProtocol === 'https') {
17
- src = 'https://zz.bdstatic.com/linksubmit/push.js';
18
- }
19
- globalAddScript(src);
20
- })
21
- </script>
@@ -1,5 +1,5 @@
1
1
  <div>
2
2
  <center>
3
- <script type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_{{ site.cnzz_statistic }}'%3E%3C/span%3E%3Cscript src='https://s4.cnzz.com/z_stat.php%3Fid%3D{{ site.cnzz_statistic }}%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
3
+ <script async type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_{{ site.cnzz_statistic }}'%3E%3C/span%3E%3Cscript src='https://s4.cnzz.com/z_stat.php%3Fid%3D{{ site.cnzz_statistic }}%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
4
4
  </center>
5
5
  </div>
@@ -0,0 +1,42 @@
1
+ <div class="commentation" onload="onSelectGiscus()">
2
+ <div>对我博客最大的鼓励来自于你的评论,欢迎选择
3
+ <button id="giscus-btn" onclick="onSelectGiscus()" class="active">giscus</button>
4
+
5
+ <button id="disqus-btn" onclick="onSelectDisqus()">disqus</button>
6
+ 来回复,
7
+ 也可以在 <a href="https://github.com/{{ site.giscus.repo }}/discussions/{{ page.gh_discussion }}" target="_blank">GitHub discussion</a> 留言。
8
+ </div>
9
+
10
+ <br />
11
+
12
+ <div id="giscus-tab" style="display:block">
13
+ {% include giscus_comments.html %}
14
+ </div>
15
+ <div id="disqus-tab" style="display:none">
16
+ {% include disqus_comments.html %}
17
+ </div>
18
+ </div>
19
+
20
+ <script type="text/javascript">
21
+ var loadedDisqus = false;
22
+ var giscusBtn = document.querySelector('#giscus-btn');
23
+ var disqusBtn = document.querySelector('#disqus-btn')
24
+ var giscusTab = document.querySelector('#giscus-tab');
25
+ var disqusTab = document.querySelector('#disqus-tab')
26
+ function onSelectGiscus() {
27
+ giscusBtn.classList.add('active');
28
+ disqusBtn.classList.remove('active');
29
+ giscusTab.style.display = "block";
30
+ disqusTab.style.display = "none";
31
+ }
32
+ function onSelectDisqus() {
33
+ if (!loadedDisqus) {
34
+ loadedDisqus = true;
35
+ loadDisqus();
36
+ }
37
+ giscusBtn.classList.remove('active');
38
+ disqusBtn.classList.add('active');
39
+ giscusTab.style.display = "none";
40
+ disqusTab.style.display = "block";
41
+ }
42
+ </script>
@@ -1,11 +1,21 @@
1
1
  <!-- Start disqus -->
2
- <script src="{{ "/assets/js/disqusLoader.js" | relative_url }}" /></script>
3
- <div id="disqus_thread"><h3>Discussion and feedback</h3></div>
4
- <div class="disqus"></div>
2
+ <div id="disqus_thread"></div>
5
3
  <script>
6
- disqusLoader('.disqus', {
7
- scriptUrl: 'https://{{ site.disqus }}.disqus.com/embed.js'
8
- });
4
+ /**
5
+ * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
6
+ * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */
7
+ /*
8
+ var disqus_config = function () {
9
+ this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
10
+ this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
11
+ };
12
+ */
13
+ function loadDisqus() { // DON'T EDIT BELOW THIS LINE
14
+ var d = document, s = d.createElement('script');
15
+ s.src = 'https://{{ site.disqus }}.disqus.com/embed.js';
16
+ s.setAttribute('data-timestamp', +new Date());
17
+ (d.head || d.body).appendChild(s);
18
+ }
9
19
  </script>
10
20
  <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
11
21
  <!-- End disqus -->
@@ -1,22 +1,15 @@
1
-
2
- <div class="commentation">
3
- <div>欢迎留下你的宝贵评论,也可以在 <a href="https://github.com/{{ site.giscus.repo }}/discussions/{{ page.gh_discussion }}" target="_blank">GitHub discussion</a> 留言。</div>
4
-
5
- <br />
6
-
7
- <!-- https://giscus.app/ -->
8
- <script src="https://giscus.app/client.js"
9
- data-repo="{{ site.giscus.repo }}"
10
- data-repo-id="{{ site.giscus.repo_id }}"
11
- data-category="{{ site.giscus.category }}"
12
- data-category-id="{{ site.giscus.category_id }}"
13
- data-mapping="pathname"
14
- data-reactions-enabled="1"
15
- data-emit-metadata="0"
16
- data-input-position="bottom"
17
- data-theme="light"
18
- data-lang="en"
19
- crossorigin="anonymous"
20
- async>
21
- </script>
22
- </div>
1
+ <!-- https://giscus.app/ -->
2
+ <script async src="https://giscus.app/client.js"
3
+ data-repo="{{ site.giscus.repo }}"
4
+ data-repo-id="{{ site.giscus.repo_id }}"
5
+ data-category="{{ site.giscus.category }}"
6
+ data-category-id="{{ site.giscus.category_id }}"
7
+ data-mapping="{{ site.giscus.mapping }}"
8
+ data-reactions-enabled="1"
9
+ data-emit-metadata="0"
10
+ data-input-position="{{ site.giscus.input_position }}"
11
+ data-theme="{{ site.giscus.theme }}"
12
+ data-lang="{{ site.giscus.lang }}"
13
+ crossorigin="anonymous"
14
+ async>
15
+ </script>
data/_includes/head.html CHANGED
@@ -22,5 +22,5 @@
22
22
  {% endif %}
23
23
 
24
24
  <!-- Google AdSense-->
25
- <script data-ad-client="{{ site.google_adsense }}" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
25
+ <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ site.google_adsense }}" crossorigin="anonymous"></script>
26
26
  </head>
data/_layouts/page.html CHANGED
@@ -10,16 +10,7 @@ layout: default
10
10
  </div>
11
11
 
12
12
  {% if page.commentable %}
13
-
14
- {% if site.comments_engine == 'disqus' %}
15
- {% include disqus_comments.html %}
16
- {% elsif site.comments_engine == 'gitalk' %}
17
- {% include gitalk_comments.html %}
18
- {% elsif site.comments_engine == 'giscus' %}
19
- {% include giscus_comments.html %}
20
- {% else %}
21
- {% endif %}
22
-
13
+ {% include comments.html %}
23
14
  {% endif %}
24
15
 
25
16
  <div class="pagination">
data/_layouts/post.html CHANGED
@@ -28,14 +28,7 @@ layout: default
28
28
  <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png" /></a>
29
29
  </div>
30
30
 
31
- {% if site.comments_engine == 'disqus' %}
32
- {% include disqus_comments.html %}
33
- {% elsif site.comments_engine == 'gitalk' %}
34
- {% include gitalk_comments.html %}
35
- {% elsif site.comments_engine == 'giscus' %}
36
- {% include giscus_comments.html %}
37
- {% else %}
38
- {% endif %}
31
+ {% include comments.html %}
39
32
 
40
33
  <div class="pagination">
41
34
  {% if page.next.url %}
@@ -48,5 +41,7 @@ layout: default
48
41
  <a href="#" class="top">Top</a>
49
42
  </div>
50
43
 
51
- <!-- Go to www.addthis.com/dashboard to customize your tools -->
52
- <script async type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4fa6932104ee5f3f"></script>
44
+ {% if site.addthis %}
45
+ <!-- Go to www.addthis.com/dashboard to customize your tools -->
46
+ <script async type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ site.addthis }}"></script>
47
+ {% endif %}
@@ -1,8 +1,13 @@
1
1
  .commentation {
2
- border-top: .5px solid $grey-2;
3
- font-family: $serif-secondary;
4
- padding-top: 2rem;
5
- margin-top: 1rem;
6
- position: relative;
7
- text-align: center;
2
+ border-top: .5px solid $grey-2;
3
+ font-family: $serif-secondary;
4
+ padding-top: 2rem;
5
+ margin-top: 1rem;
6
+ position: relative;
7
+ text-align: center;
8
+
9
+ .active, .btn:hover {
10
+ background-color: #666;
11
+ color: white;
12
+ }
8
13
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taletype
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - hutusi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-03 00:00:00.000000000 Z
11
+ date: 2022-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -106,6 +106,7 @@ files:
106
106
  - _includes/analytics.html
107
107
  - _includes/baidu_statistic.html
108
108
  - _includes/cnzz_statistic.html
109
+ - _includes/comments.html
109
110
  - _includes/disqus_comments.html
110
111
  - _includes/footer.html
111
112
  - _includes/giscus_comments.html