taletype 0.1.5 → 0.1.8

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: 12cbdae39e8dcf1cab7996327e34dc236fe3d58fc06bc30e19732db68c197977
4
- data.tar.gz: ee88312cd663e7f19dd22792ab434fc3d00bbd4f4332b2ba98be95c2a91d43e5
3
+ metadata.gz: d57ea908a282d0a89070913679d61dcba659d14b8badf326387e275afed63194
4
+ data.tar.gz: eb2e742a481bf0ed3ee1afdc70b8a4613fdec066f0591b2d9158904031df4381
5
5
  SHA512:
6
- metadata.gz: 23fbb70d43ccca85c91ee216eab5a39574024db1acd494813a3ba21f474ee3c2339cec1de747663ebb518f2f71fab15c7394c1b291de690b93f749b4828164e4
7
- data.tar.gz: 15f60a6349a57e5a07fe0e70debddbaacf3675580ae371f33178753f736e5717db05f68f63e43a4dc60c70d118239da5c24198fb84980a87416b51d6ac01a176
6
+ metadata.gz: 9842fa4c0d311892e8156e0ed94b7d4c5c4137486b84f6a44941e9ad8d97fd1114b9ffd5103a7d66daeb8a339cff10d7bdc555d4943231298a38f3a9f53971cc
7
+ data.tar.gz: 3a14745e771e8e3e7971bc324a49759d7f8606fb9f40576cf9681a6639bfa434a980e6c4be62cac35eb8ec7b12fe492699080594426422f9e100ebbde52504f6
@@ -0,0 +1,38 @@
1
+
2
+ <div class="commentation" onload="onSelectGiscus()">
3
+ <div>对我博客最大的鼓励来自于你的评论,欢迎选择
4
+ <button id="giscus-btn" onclick="onSelectGiscus()" class="active">giscus</button>
5
+
6
+ <button id="disqus-btn" onclick="onSelectDisqus()">disqus</button>
7
+ 来回复,
8
+ 也可以在 <a href="https://github.com/{{ site.giscus.repo }}/discussions/{{ page.gh_discussion }}" target="_blank">GitHub discussion</a> 留言。
9
+ </div>
10
+
11
+ <br />
12
+
13
+ <div id="giscus-tab" style="display:block">
14
+ {% include giscus_comments.html %}
15
+ </div>
16
+ <div id="disqus-tab" style="display:none">
17
+ {% include disqus_comments.html %}
18
+ </div>
19
+ </div>
20
+
21
+ <script type="text/javascript">
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
+ giscusBtn.classList.remove('active');
34
+ disqusBtn.classList.add('active');
35
+ giscusTab.style.display = "none";
36
+ disqusTab.style.display = "block";
37
+ }
38
+ </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() { // 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 -->
@@ -0,0 +1,15 @@
1
+ <!-- https://giscus.app/ -->
2
+ <script 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="pathname"
8
+ data-reactions-enabled="1"
9
+ data-emit-metadata="0"
10
+ data-input-position="bottom"
11
+ data-theme="light"
12
+ data-lang="en"
13
+ crossorigin="anonymous"
14
+ async>
15
+ </script>
@@ -2,8 +2,10 @@
2
2
  <!-- https://github.com/geektutu/hexo-theme-geektutu/blob/master/layout/_widget/comments.ejs#L31 -->
3
3
  <!-- ref: https://geektutu.com/post/blog-experience-7.html -->
4
4
 
5
+ <div>欢迎留言,请在下面评论框或直接在 <a href="https://github.com/{{ site.gitalk.owner }}/{{ site.gitalk.repo }}/issues/{{ page.gh_issue }}" target="_blank">GitHub issue</a> 评论。</div>
6
+
5
7
  <!-- Start gitalk -->
6
- <script src="{{ "/assets/js/gitalk.min.js" | relative_url }}" /></script>
8
+ <script src="{{ '/assets/js/gitalk.min.js' | relative_url }}" ></script>
7
9
  <!-- <div id="disqus_thread"><h3>Discussion and feedback</h3></div> -->
8
10
  <div id="gitalk-container">
9
11
  <div class="gt-container text-center" style="margin-top: 50px;">
data/_layouts/page.html CHANGED
@@ -10,14 +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
- {% else %}
19
- {% endif %}
20
-
13
+ {% include comments.html %}
21
14
  {% endif %}
22
15
 
23
16
  <div class="pagination">
data/_layouts/post.html CHANGED
@@ -23,14 +23,12 @@ layout: default
23
23
 
24
24
  <br />
25
25
 
26
- <div>欢迎<a href="/subscription">订阅“胡涂说”博客</a>;欢迎留言,请在下面评论框或直接在 <a href="https://github.com/{{ site.gitalk.owner }}/{{ site.gitalk.repo }}/issues/{{ page.gh_issue }}" target="_blank">GitHub issue</a> 评论。</div>
27
-
28
- {% if site.comments_engine == 'disqus' %}
29
- {% include disqus_comments.html %}
30
- {% elsif site.comments_engine == 'gitalk' %}
31
- {% include gitalk_comments.html %}
32
- {% else %}
33
- {% endif %}
26
+ <div>本文采用<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/deed.zh">「CC BY-SA 4.0」</a>知识共享许可协议,如果还喜欢其他文章,
27
+ 欢迎<a href="/subscription">订阅“胡涂说”博客</a>。
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
+ </div>
30
+
31
+ {% include comments.html %}
34
32
 
35
33
  <div class="pagination">
36
34
  {% if page.next.url %}
@@ -0,0 +1,13 @@
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;
8
+
9
+ .active, .btn:hover {
10
+ background-color: #666;
11
+ color: white;
12
+ }
13
+ }
data/_sass/tale.scss CHANGED
@@ -8,6 +8,7 @@
8
8
  @import 'tale/layout';
9
9
  @import 'tale/pagination';
10
10
  @import 'tale/catalogue';
11
+ @import 'tale/commentation';
11
12
 
12
13
  @import 'vendor/gitalk';
13
14
  @import 'vendor/gitalk-plus';
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.5
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - hutusi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-02 00:00:00.000000000 Z
11
+ date: 2022-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -106,8 +106,10 @@ 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
112
+ - _includes/giscus_comments.html
111
113
  - _includes/gitalk_comments.html
112
114
  - _includes/head.html
113
115
  - _includes/image.html
@@ -124,6 +126,7 @@ files:
124
126
  - _sass/tale/_base.scss
125
127
  - _sass/tale/_catalogue.scss
126
128
  - _sass/tale/_code.scss
129
+ - _sass/tale/_commentation.scss
127
130
  - _sass/tale/_layout.scss
128
131
  - _sass/tale/_pagination.scss
129
132
  - _sass/tale/_post.scss
@@ -161,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
164
  - !ruby/object:Gem::Version
162
165
  version: '0'
163
166
  requirements: []
164
- rubygems_version: 3.2.3
167
+ rubygems_version: 3.2.22
165
168
  signing_key:
166
169
  specification_version: 4
167
170
  summary: TaleType(Tale redistributed) is a minimal Jekyll theme curated for storytellers.