whiteblog-theme 0.4.1 → 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: 9a3995856c22e9d7a12798f5860e53157670901c3dff2631b2517fc9dbf32a06
4
- data.tar.gz: b07804f7710c7e334eee316a8a8c88ba57befd4ead5cae6f242868a890260f21
3
+ metadata.gz: 45a0326c5e5c35bd0a3bfbc4177297bd6fa1d084e47b282a3181a681a95c2d07
4
+ data.tar.gz: 4cc7275d2324d4d843e64fb3ebce99fb5d5291317c602a60b6c9494aadb4b621
5
5
  SHA512:
6
- metadata.gz: b416620b6b819b44db45befdc09d47a5ec289fcbb6a80cd09e3d97032979e019f42796e12146c86e881e196b832c77f793c397591346f3a40a02e2a5f54b2361
7
- data.tar.gz: 18f9501815396ed88bd075c523e7ec3c4ffe92925fba0b3175c175ef76764a4a0c6ff6c7f1275254ac0d63ff2df3256ecdc41a3ccabc3ba67359bb1788e9be0f
6
+ metadata.gz: 6d0adb86492d3fa856593e21b9a7f96d8ba00d9482b02761da74df31943bfc13f75886f574893717201a5eafdc34177dc2f15eeb81ac1fe1dcb99d211e737a52
7
+ data.tar.gz: 47b049292fb97a82f7aa7529b4b43be25f55be47eb196096910437ca7a28b7cf8b1a654a094d983b6c3c1dfed5054ff161c8fe0f1899cf41f193bb50e6fb5a0c
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>
@@ -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.1
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-21 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