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 +4 -4
- data/_includes/comments.html +2 -0
- data/_includes/head.html +5 -6
- data/_includes/video +2 -2
- data/_layouts/post.html +1 -7
- data/assets/css/previews.css +0 -2
- data/assets/js/main.js +23 -13
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45a0326c5e5c35bd0a3bfbc4177297bd6fa1d084e47b282a3181a681a95c2d07
|
|
4
|
+
data.tar.gz: 4cc7275d2324d4d843e64fb3ebce99fb5d5291317c602a60b6c9494aadb4b621
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d0adb86492d3fa856593e21b9a7f96d8ba00d9482b02761da74df31943bfc13f75886f574893717201a5eafdc34177dc2f15eeb81ac1fe1dcb99d211e737a52
|
|
7
|
+
data.tar.gz: 47b049292fb97a82f7aa7529b4b43be25f55be47eb196096910437ca7a28b7cf8b1a654a094d983b6c3c1dfed5054ff161c8fe0f1899cf41f193bb50e6fb5a0c
|
data/_includes/comments.html
CHANGED
|
@@ -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
|
-
{%
|
|
11
|
-
|
|
12
|
-
|
|
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="{{
|
|
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="{{
|
|
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"
|
|
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>
|
data/assets/css/previews.css
CHANGED
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
|
-
|
|
10
|
-
|
|
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
|
-
|
|
22
|
-
|
|
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.
|
|
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-
|
|
11
|
+
date: 2026-07-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|