whiteblog-theme 0.3.0 → 0.3.2

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: c55a6469e871c37d6992a2f2cbc000ba7ce371419735c0feaaa92ed8e2b7ad74
4
- data.tar.gz: bbfc901e9a5012fed0115321db4a9ac8b69ea8fba2cbcf589018496205768cb1
3
+ metadata.gz: d4397217dbd08cf15ad0c4419798e1ef79fe1d213d15291e4f6a9c7fcb3e180d
4
+ data.tar.gz: deea0cede86c0bf55fc8a55bf648d86ce142e1b758e235279fd53011b8ed8b4d
5
5
  SHA512:
6
- metadata.gz: 178701079f4b6127df1723e13120db1e703ab576ba99b3357046c038b4900b7db55c7682a5c99b6b8803ce712294ca9583cca29b9a192abe969b9b57434d0652
7
- data.tar.gz: 28eb1f5affb6aaf59ae2b450e9724c4bc6166181620bbfd962b50c57cdb2c1c7aa0b50c27135cc7a8cf9991938bde1908062995004d60f3d2353bed65ef61f4d
6
+ metadata.gz: a9dba8f104672aed6bfb6145f5451728eead5dc286ed6fe22e50815d8fb504499d2648568d6923590771098b8108bfb652373d1b4bc42362c6e2f690cfaf2aca
7
+ data.tar.gz: dfcc02a87f30f92e62926a060899d21ebb5782ee0d020773decf48b2baf4d4c4cdd51b8e08376471e95559c69407495db004d8b869ad3d57872835b8280504e4
@@ -8,10 +8,38 @@
8
8
  data-strict="0"
9
9
  data-reactions-enabled="{{ site.comments.giscus.reactions_enabled | default: '1' }}"
10
10
  data-emit-metadata="0"
11
- data-input-position="{{ site.comments.giscus.input_position | default: 'top' }}"
12
- data-theme="{{ site.comments.giscus.theme | default: 'preferred_color_scheme' }}"
11
+ data-input-position="{{ site.comments.giscus.input_position | default: 'bottom' }}"
12
+ data-theme="preferred_color_scheme"
13
13
  data-lang="{{ site.comments.giscus.lang | default: 'en' }}"
14
14
  crossorigin="anonymous"
15
15
  async>
16
16
  </script>
17
+ <script>
18
+ (function() {
19
+ function syncGiscusTheme() {
20
+ var theme = document.documentElement.getAttribute('data-theme') || 'light';
21
+ var iframe = document.querySelector('iframe.giscus-frame');
22
+ if (iframe) {
23
+ iframe.contentWindow.postMessage(
24
+ { giscus: { setConfig: { theme: theme } } },
25
+ 'https://giscus.app'
26
+ );
27
+ }
28
+ }
29
+
30
+ window.addEventListener('message', function(event) {
31
+ if (event.origin !== 'https://giscus.app') return;
32
+ if (event.data && event.data.giscus && event.data.giscus.resizeHeight) {
33
+ syncGiscusTheme();
34
+ }
35
+ });
36
+
37
+ var observer = new MutationObserver(function(mutations) {
38
+ mutations.forEach(function(m) {
39
+ if (m.attributeName === 'data-theme') syncGiscusTheme();
40
+ });
41
+ });
42
+ observer.observe(document.documentElement, { attributes: true });
43
+ })();
44
+ </script>
17
45
  {% endif %}
data/_layouts/post.html CHANGED
@@ -100,10 +100,11 @@ layout: default
100
100
  {% include backtotop.html %}
101
101
  {% endif %}
102
102
 
103
- {% if site.comments.provider%}
104
- {% if site.comments.provider == "disqus" %}
105
- {% include comments-providers/disqus.html %}
106
- {% endif %}
103
+ {% if site.comments.provider %}
104
+ {% case site.comments.provider %}
105
+ {% when "disqus" %}
106
+ {% include comments-providers/disqus.html %}
107
+ {% endcase %}
107
108
  {% endif %}
108
109
  </div>
109
110
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whiteblog-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Silva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-18 00:00:00.000000000 Z
11
+ date: 2026-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll