whiteblog-theme 0.4.0 → 0.4.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: b5c3a5005e806c67bf000b693ad1aecfdd01c9a78047775205d8b29906f1f8d3
4
- data.tar.gz: d482ec318c9742de362ede4621f34aa8ea2241c8c29dc182d5572c4a984d0cd7
3
+ metadata.gz: 45a0326c5e5c35bd0a3bfbc4177297bd6fa1d084e47b282a3181a681a95c2d07
4
+ data.tar.gz: 4cc7275d2324d4d843e64fb3ebce99fb5d5291317c602a60b6c9494aadb4b621
5
5
  SHA512:
6
- metadata.gz: 9f98d68b1762bb8061cd26b99565a8d56d5ee6c277bbd74fd88ac9fa8fedc5a6e1b984d4745a1e919b265528207dd0afe2fc65b2f590ca84430ae98e934c4789
7
- data.tar.gz: 864ced7612fe1019620c744dd5c9801027d0368c8ffc46bacdf223e815685f59cefc21e8937c7f7bb46829709d83fe38bcc993894226f4b7f1a6c43f12774d58
6
+ metadata.gz: 6d0adb86492d3fa856593e21b9a7f96d8ba00d9482b02761da74df31943bfc13f75886f574893717201a5eafdc34177dc2f15eeb81ac1fe1dcb99d211e737a52
7
+ data.tar.gz: 47b049292fb97a82f7aa7529b4b43be25f55be47eb196096910437ca7a28b7cf8b1a654a094d983b6c3c1dfed5054ff161c8fe0f1899cf41f193bb50e6fb5a0c
@@ -3,10 +3,12 @@
3
3
  {% when "disqus" %}
4
4
  <h4>Comments</h4>
5
5
  <section id="disqus_thread"></section>
6
+ {% include comments-providers/disqus.html %}
6
7
  {% when "cusdis" %}
7
8
  <h4>Comments</h4>
8
9
  {% include comments-providers/cusdis.html %}
9
10
  {% when "giscus" %}
11
+ <h4>Comments</h4>
10
12
  {% include comments-providers/giscus.html %}
11
13
  {% endcase %}
12
14
  </div>
data/_includes/head.html CHANGED
@@ -7,14 +7,13 @@
7
7
  <title>{% if page.title %}{{ page.title }} | {{ site.title }}{% else %}{{ site.title }}{% endif %}</title>
8
8
  <link rel="icon" type="image/x-icon" href="/assets/images/favicon.ico">
9
9
 
10
- {% if page.description %}
11
- <meta name="description" content="{{ page.description | escape }}">
12
- {% elsif site.description %}
13
- <meta name="description" content="{{ site.description | escape }}">
10
+ {% assign _desc = page.excerpt | strip_html | truncate: 160 | default: page.description | default: site.description %}
11
+ {% if _desc %}
12
+ <meta name="description" content="{{ _desc | escape }}">
14
13
  {% endif %}
15
14
 
16
15
  <meta property="og:title" content="{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}">
17
- <meta property="og:description" content="{{ page.description | default: site.description | escape }}">
16
+ <meta property="og:description" content="{{ _desc | escape }}">
18
17
  <meta property="og:url" content="{{ page.url | absolute_url }}">
19
18
  <meta property="og:site_name" content="{{ site.title | escape }}">
20
19
  {% if page.layout == "post" %}
@@ -27,7 +26,7 @@
27
26
 
28
27
  <meta name="twitter:card" content="summary_large_image">
29
28
  <meta name="twitter:title" content="{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}">
30
- <meta name="twitter:description" content="{{ page.description | default: site.description | escape }}">
29
+ <meta name="twitter:description" content="{{ _desc | escape }}">
31
30
  {% if page.slug %}
32
31
  <meta name="twitter:image" content="{{ site.url }}/assets/images/previews/{{ page.slug }}.png">
33
32
  <meta property="og:image" content="{{ site.url }}/assets/images/previews/{{ page.slug }}.png">
data/_includes/video CHANGED
@@ -3,8 +3,8 @@
3
3
 
4
4
  <div>
5
5
  {% if video_provider == "vimeo" %}
6
- <iframe src="https://player.vimeo.com/video/{{ video_id }}" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
6
+ <iframe src="https://player.vimeo.com/video/{{ video_id }}" title="Vimeo video player" frameborder="0" loading="lazy" allowfullscreen></iframe>
7
7
  {% elsif video_provider == "youtube" %}
8
- <iframe src="https://www.youtube.com/embed/{{ video_id }}" width="560" height="315" frameborder="0" allowfullscreen></iframe>
8
+ <iframe src="https://www.youtube.com/embed/{{ video_id }}" title="YouTube video player" width="560" height="315" frameborder="0" loading="lazy" allowfullscreen></iframe>
9
9
  {% endif %}
10
10
  </div>
data/_layouts/post.html CHANGED
@@ -9,7 +9,7 @@ layout: default
9
9
  "datePublished": "{{ page.date | date_to_xmlschema }}",
10
10
  "dateModified": "{{ page.last_modified_at | default: page.date | date_to_xmlschema }}",
11
11
  "url": "{{ page.url | absolute_url }}",
12
- "description": {{ page.description | default: site.description | jsonify }},
12
+ "description": {{ page.excerpt | strip_html | truncate: 200 | default: page.description | default: site.description | jsonify }},
13
13
  "author": {
14
14
  "@type": "Person",
15
15
  "name": {{ site.author.name | jsonify }},
@@ -102,12 +102,6 @@ layout: default
102
102
  {% include backtotop.html %}
103
103
  {% endif %}
104
104
 
105
- {% if site.comments.provider %}
106
- {% case site.comments.provider %}
107
- {% when "disqus" %}
108
- {% include comments-providers/disqus.html %}
109
- {% endcase %}
110
- {% endif %}
111
105
  </div>
112
106
 
113
107
  </article>
@@ -1,5 +1,3 @@
1
- @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');
2
-
3
1
  html {
4
2
  font-size: 16px;
5
3
  }
data/assets/js/main.js CHANGED
@@ -6,23 +6,23 @@ const checkmarkSVG = `Copied <svg xmlns="http://www.w3.org/2000/svg" width="16"
6
6
  <path d="M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425z"/>
7
7
  </svg>`;
8
8
 
9
- // use a class selector if available
10
- let blocks = document.querySelectorAll("pre");
11
-
12
- blocks.forEach((block) => {
13
- // only add button if browser supports Clipboard API
14
- if (navigator.clipboard) {
15
- let button = document.createElement("button");
9
+ if (navigator.clipboard) {
10
+ document.querySelectorAll("pre").forEach((block) => {
11
+ const button = document.createElement("button");
16
12
  button.innerHTML = copyButtonSVG;
17
13
  button.setAttribute("aria-label", "Copiar código");
18
14
  button.classList.add("copy-btn");
19
15
  block.style.position = "relative";
20
16
  block.appendChild(button);
21
- button.addEventListener("click", async () => {
22
- await copyCode(block, button);
23
- });
24
- }
25
- });
17
+ });
18
+
19
+ document.addEventListener("click", async (e) => {
20
+ const button = e.target.closest(".copy-btn");
21
+ if (!button) return;
22
+ const block = button.closest("pre");
23
+ if (block) await copyCode(block, button);
24
+ });
25
+ }
26
26
 
27
27
  async function copyCode(block, button) {
28
28
  let code = block.querySelector("code");
@@ -53,4 +53,14 @@ if (navBarToggle) {
53
53
  const isExpanded = mainNav.classList.toggle("active");
54
54
  navBarToggle.setAttribute("aria-expanded", isExpanded);
55
55
  });
56
- }
56
+ }
57
+
58
+ document.addEventListener("keydown", function(e) {
59
+ if (e.key === "Escape" && mainNav && mainNav.classList.contains("active")) {
60
+ mainNav.classList.remove("active");
61
+ if (navBarToggle) {
62
+ navBarToggle.setAttribute("aria-expanded", "false");
63
+ navBarToggle.focus();
64
+ }
65
+ }
66
+ });
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.4.0
4
+ version: 0.4.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-06-19 00:00:00.000000000 Z
11
+ date: 2026-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll