taletype 0.1.7 → 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 +4 -4
- data/_includes/comments.html +38 -0
- data/_includes/disqus_comments.html +16 -6
- data/_includes/giscus_comments.html +15 -22
- data/_layouts/page.html +1 -10
- data/_layouts/post.html +1 -8
- data/_sass/tale/_commentation.scss +11 -6
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d57ea908a282d0a89070913679d61dcba659d14b8badf326387e275afed63194
|
4
|
+
data.tar.gz: eb2e742a481bf0ed3ee1afdc70b8a4613fdec066f0591b2d9158904031df4381
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
<
|
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
|
-
|
7
|
-
|
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 -->
|
@@ -1,22 +1,15 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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 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>
|
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
|
-
{%
|
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 %}
|
@@ -1,8 +1,13 @@
|
|
1
1
|
.commentation {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taletype
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hutusi
|
@@ -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
|