whiteblog-theme 0.5.0 → 0.6.0
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/README.md +44 -14
- data/_includes/head.html +3 -3
- data/_includes/related-posts.html +65 -0
- data/_includes/scripts.html +2 -1
- data/_layouts/post.html +4 -0
- data/_sass/whiteblog-theme/_layout.scss +117 -33
- data/_sass/whiteblog-theme/_syntax-highlighting.scss +61 -61
- data/assets/css/previews.css +75 -44
- data/assets/images/previews/hello-world.png +0 -0
- data/assets/images/previews/test-post.png +0 -0
- data/assets/images/previews/welcome-jekyll.png +0 -0
- data/assets/images/previews/yet-another-post.png +0 -0
- data/assets/js/main.js +1 -1
- data/assets/js/theme-toggle.js +22 -6
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8bb9778cc4df1a3cfebd3d45da3877c61e63048b29bd1b90b28a411a9c00dbf8
|
|
4
|
+
data.tar.gz: 84a6bec28a82cc83638dc1ee4a6c72cfb277611cce4b9b671e61d218d175c873
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 157ba201750be2c69830326d5d7ce931c45d62945169bb3916092676a119bfb42f7be09125434d896c066b01ab1abf34809423baeadde17d03ce5c71e549d054
|
|
7
|
+
data.tar.gz: 15338014bb336818fc50485303f8997270a8dc55a2c0503565a06bc9fdd7e7faaccf815e646937bbac100efd58572a5ff92eca22826a6af12d9cc66dcabebdce
|
data/README.md
CHANGED
|
@@ -23,12 +23,15 @@ estimates, and pluggable comment providers.
|
|
|
23
23
|
- **Search** — client-side search over a generated `search.json`
|
|
24
24
|
(SimpleJekyllSearch, no external service).
|
|
25
25
|
- **Categories** — category index and per-category listing.
|
|
26
|
+
- **Related posts** — end-of-post section matched by shared category,
|
|
27
|
+
falling back to the most recent posts when there's no category overlap.
|
|
26
28
|
- **Post previews** — `_plugins/previews.rb` renders a social PNG per post
|
|
27
29
|
(see [Post preview plugin](#post-preview-plugin) for system requirements).
|
|
28
30
|
- **SEO** — meta description, Open Graph and Twitter tags, and JSON-LD
|
|
29
31
|
`BlogPosting`, all derived from the post excerpt.
|
|
30
32
|
- **Accessibility** — skip link, ARIA labels, accessible pagination,
|
|
31
33
|
keyboard-dismissable mobile nav, WCAG AA contrast.
|
|
34
|
+
- **Callouts** — Obsidian-style `> [!note]` blocks (see [Callouts](#callouts)).
|
|
32
35
|
- **Comments** — Disqus, Cusdis or Giscus, selected in `_config.yml`.
|
|
33
36
|
- **Analytics** — optional Google Analytics 4.
|
|
34
37
|
|
|
@@ -77,6 +80,9 @@ addons:
|
|
|
77
80
|
back_to_top : true # back-to-top button
|
|
78
81
|
share_post : true # share buttons on posts
|
|
79
82
|
old_post_warning : false # banner on old posts
|
|
83
|
+
related_posts:
|
|
84
|
+
enabled : true # related posts section at the end of a post
|
|
85
|
+
limit : 3 # max related posts to show
|
|
80
86
|
buymeacoffee:
|
|
81
87
|
id : "" # buymeacoffee username; empty disables the widget
|
|
82
88
|
description : "Support me on Buy me a coffee!"
|
|
@@ -155,30 +161,54 @@ analytics:
|
|
|
155
161
|
|
|
156
162
|
## Post preview plugin
|
|
157
163
|
|
|
158
|
-
`_plugins/previews.rb`
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
164
|
+
`_plugins/previews.rb` renders a 1200×630 PNG per post (used as `og:image` and
|
|
165
|
+
`twitter:image`) with **headless Chrome or Chromium**, styled by
|
|
166
|
+
`assets/css/previews.css`. No gems are needed. The plugin looks for Chrome,
|
|
167
|
+
Chromium or Edge in the usual install locations and on `PATH`; set
|
|
168
|
+
`WHITEBLOG_CHROME` to use a specific binary. If none is found, previews are
|
|
169
|
+
skipped with a warning and the build continues.
|
|
170
|
+
|
|
171
|
+
Existing PNGs are never overwritten: delete one from `assets/images/previews/`
|
|
172
|
+
to regenerate it. If `pngquant` is on `PATH` the PNG is compressed in place.
|
|
162
173
|
|
|
163
174
|
```bash
|
|
164
175
|
# macOS
|
|
165
|
-
brew install
|
|
166
|
-
brew install pngquant # optional, for compression
|
|
176
|
+
brew install pngquant # optional, for compression
|
|
167
177
|
|
|
168
178
|
# Debian / Ubuntu
|
|
169
|
-
apt-get install
|
|
179
|
+
apt-get install chromium pngquant
|
|
170
180
|
```
|
|
171
181
|
|
|
172
|
-
|
|
182
|
+
GitHub Pages runs in `--safe` mode and will not execute this plugin; build and
|
|
183
|
+
deploy the `_site` output yourself if you need previews.
|
|
173
184
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
185
|
+
## Callouts
|
|
186
|
+
|
|
187
|
+
`_plugins/callouts.rb` turns Obsidian-style callouts into styled blocks at build
|
|
188
|
+
time, so posts written in Obsidian render the same on the blog. GitHub alerts
|
|
189
|
+
(`> [!WARNING]`) work too, since the type is case-insensitive.
|
|
190
|
+
|
|
191
|
+
```markdown
|
|
192
|
+
> [!tip] Optional custom title
|
|
193
|
+
> Callout body. **Markdown** works as usual.
|
|
194
|
+
>
|
|
195
|
+
> Multiple paragraphs too.
|
|
178
196
|
```
|
|
179
197
|
|
|
180
|
-
|
|
181
|
-
|
|
198
|
+
| Variant | Types |
|
|
199
|
+
|---------|-------|
|
|
200
|
+
| note | `note`, `info`, `abstract`, `summary`, `tldr`, `todo`, `question`, `faq`, `example`, `quote` |
|
|
201
|
+
| tip | `tip`, `hint`, `important`, `success`, `done` |
|
|
202
|
+
| warning | `warning`, `caution`, `attention` |
|
|
203
|
+
| danger | `danger`, `error`, `failure`, `bug` |
|
|
204
|
+
|
|
205
|
+
Without a title, a default one is used (`Nota`, `Tip`, `Advertencia`, ...).
|
|
206
|
+
Unknown types render as `note` with the type as title. The foldable markers
|
|
207
|
+
(`[!note]+` / `[!note]-`) are accepted but the callout is always expanded.
|
|
208
|
+
|
|
209
|
+
Jekyll does not load plugins from a gem theme: copy `_plugins/callouts.rb` into
|
|
210
|
+
your site's `_plugins/` folder. Like any custom plugin, it does not run on
|
|
211
|
+
GitHub Pages' `--safe` build.
|
|
182
212
|
|
|
183
213
|
## Development
|
|
184
214
|
|
data/_includes/head.html
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<head>
|
|
2
2
|
<meta charset="utf-8">
|
|
3
3
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
4
|
-
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#
|
|
5
|
-
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#
|
|
4
|
+
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#FAF9FD">
|
|
5
|
+
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#25242F">
|
|
6
6
|
|
|
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">
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
39
39
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
40
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=
|
|
40
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@300..700&family=Geist+Mono:wght@400;500&display=swap">
|
|
41
41
|
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
|
|
42
42
|
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">
|
|
43
43
|
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Related posts by shared category, most relevant first.
|
|
3
|
+
Falls back to most recent posts when the current post has no
|
|
4
|
+
category match with any other post.
|
|
5
|
+
Config: site.addons.related_posts.enabled (bool), .limit (int, default 3)
|
|
6
|
+
{% endcomment %}
|
|
7
|
+
{% assign max_related = site.addons.related_posts.limit | default: 3 %}
|
|
8
|
+
{% assign date_format = site.theme.date_format | default: "%b %-d, %Y" %}
|
|
9
|
+
{% assign max_shared = 0 %}
|
|
10
|
+
|
|
11
|
+
{% for post in site.posts %}
|
|
12
|
+
{% if post.url != page.url %}
|
|
13
|
+
{% assign shared = 0 %}
|
|
14
|
+
{% for category in post.categories %}
|
|
15
|
+
{% if page.categories contains category %}
|
|
16
|
+
{% assign shared = shared | plus: 1 %}
|
|
17
|
+
{% endif %}
|
|
18
|
+
{% endfor %}
|
|
19
|
+
{% if shared > max_shared %}
|
|
20
|
+
{% assign max_shared = shared %}
|
|
21
|
+
{% endif %}
|
|
22
|
+
{% endif %}
|
|
23
|
+
{% endfor %}
|
|
24
|
+
|
|
25
|
+
{% assign min_shared = 1 %}
|
|
26
|
+
{% if max_shared == 0 %}
|
|
27
|
+
{% assign min_shared = 0 %}
|
|
28
|
+
{% endif %}
|
|
29
|
+
|
|
30
|
+
{% assign related_count = 0 %}
|
|
31
|
+
{% capture related_html %}
|
|
32
|
+
{% for shared_target in (min_shared..max_shared) reversed %}
|
|
33
|
+
{% for post in site.posts %}
|
|
34
|
+
{% if related_count >= max_related %}{% break %}{% endif %}
|
|
35
|
+
{% if post.url != page.url %}
|
|
36
|
+
{% assign shared = 0 %}
|
|
37
|
+
{% for category in post.categories %}
|
|
38
|
+
{% if page.categories contains category %}
|
|
39
|
+
{% assign shared = shared | plus: 1 %}
|
|
40
|
+
{% endif %}
|
|
41
|
+
{% endfor %}
|
|
42
|
+
{% if shared == shared_target %}
|
|
43
|
+
{% assign related_count = related_count | plus: 1 %}
|
|
44
|
+
<li class="post-resume">
|
|
45
|
+
<h3 class="post-resume-title">
|
|
46
|
+
<a href="{{ post.url | relative_url }}">
|
|
47
|
+
<span class="underline">{{ post.title | escape }}</span>
|
|
48
|
+
</a>
|
|
49
|
+
</h3>
|
|
50
|
+
<span class="text-secondary">{{ post.date | date: date_format }}</span>
|
|
51
|
+
</li>
|
|
52
|
+
{% endif %}
|
|
53
|
+
{% endif %}
|
|
54
|
+
{% endfor %}
|
|
55
|
+
{% endfor %}
|
|
56
|
+
{% endcapture %}
|
|
57
|
+
|
|
58
|
+
{% if related_count > 0 %}
|
|
59
|
+
<section class="related-posts" aria-labelledby="related-posts-heading">
|
|
60
|
+
<h2 id="related-posts-heading">Posts relacionados</h2>
|
|
61
|
+
<ul>
|
|
62
|
+
{{ related_html }}
|
|
63
|
+
</ul>
|
|
64
|
+
</section>
|
|
65
|
+
{% endif %}
|
data/_includes/scripts.html
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
(function() {
|
|
3
|
-
|
|
3
|
+
let saved = null;
|
|
4
|
+
try { saved = localStorage.getItem('whiteblog-theme'); } catch (e) {}
|
|
4
5
|
const theme = saved || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
|
5
6
|
document.documentElement.setAttribute('data-theme', theme);
|
|
6
7
|
})();
|
data/_layouts/post.html
CHANGED
|
@@ -1,40 +1,51 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--color-bg: #
|
|
3
|
-
--color-accent: #
|
|
4
|
-
--color-primary: #
|
|
5
|
-
--color-text: #
|
|
6
|
-
--color-dark: #
|
|
7
|
-
--color-highlight: #
|
|
8
|
-
--color-code: #
|
|
9
|
-
--color-code-bg: #
|
|
10
|
-
--color-notice: #
|
|
2
|
+
--color-bg: #FAF9FD;
|
|
3
|
+
--color-accent: #C7B2FA;
|
|
4
|
+
--color-primary: #6B38D4;
|
|
5
|
+
--color-text: #1A1726;
|
|
6
|
+
--color-dark: #6A6580;
|
|
7
|
+
--color-highlight: #C7B2FA;
|
|
8
|
+
--color-code: #6B38D4;
|
|
9
|
+
--color-code-bg: #1E1B2B;
|
|
10
|
+
--color-notice: #E3DEF0;
|
|
11
11
|
--color-success: #28a745;
|
|
12
|
-
--color-blockquote: #
|
|
12
|
+
--color-blockquote: #6B38D4;
|
|
13
13
|
--color-warning-bg: #fff3cd;
|
|
14
14
|
--color-warning-text: #856404;
|
|
15
15
|
--color-warning-border: #ffeaa7;
|
|
16
16
|
--color-warning-icon: #ffc107;
|
|
17
|
-
--
|
|
18
|
-
--font-
|
|
17
|
+
--color-danger: #dc3545;
|
|
18
|
+
--font-main: 'Geist', system-ui, -apple-system, sans-serif;
|
|
19
|
+
--font-heading: 'Geist', system-ui, -apple-system, sans-serif;
|
|
20
|
+
--font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
|
|
21
|
+
--syn-text: #E9E7F1;
|
|
22
|
+
--syn-comment: #7C7893;
|
|
23
|
+
--syn-keyword: #BFA2FF;
|
|
24
|
+
--syn-operator: #F08DB8;
|
|
25
|
+
--syn-string: #F5C98A;
|
|
26
|
+
--syn-number: #F2A98A;
|
|
27
|
+
--syn-function: #8FD3FF;
|
|
28
|
+
--syn-added: #A6D9A0;
|
|
19
29
|
--container-width: 90%;
|
|
20
30
|
--transition-default: all 0.3s ease-in-out;
|
|
21
31
|
}
|
|
22
32
|
|
|
23
33
|
[data-theme="dark"] {
|
|
24
|
-
--color-bg: #
|
|
25
|
-
--color-accent: #
|
|
26
|
-
--color-primary: #
|
|
27
|
-
--color-text: #
|
|
28
|
-
--color-dark: #
|
|
29
|
-
--color-highlight: #
|
|
30
|
-
--color-code: #
|
|
31
|
-
--color-code-bg: #
|
|
32
|
-
--color-notice: #
|
|
33
|
-
--color-blockquote: #
|
|
34
|
+
--color-bg: #25242F;
|
|
35
|
+
--color-accent: #4C2FA0;
|
|
36
|
+
--color-primary: #B794FF;
|
|
37
|
+
--color-text: #EEEBFA;
|
|
38
|
+
--color-dark: #9590AD;
|
|
39
|
+
--color-highlight: #4C2FA0;
|
|
40
|
+
--color-code: #B794FF;
|
|
41
|
+
--color-code-bg: #191724;
|
|
42
|
+
--color-notice: #403D52;
|
|
43
|
+
--color-blockquote: #B794FF;
|
|
34
44
|
--color-warning-bg: #3a2e10;
|
|
35
45
|
--color-warning-text: #f0c040;
|
|
36
46
|
--color-warning-border: #5a4820;
|
|
37
47
|
--color-warning-icon: #f0c040;
|
|
48
|
+
--color-danger: #ff6b6b;
|
|
38
49
|
}
|
|
39
50
|
|
|
40
51
|
.sr-only {
|
|
@@ -90,6 +101,8 @@ body {
|
|
|
90
101
|
min-height: 100vh;
|
|
91
102
|
position: relative;
|
|
92
103
|
overflow-y: scroll;
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
93
106
|
}
|
|
94
107
|
|
|
95
108
|
h1, h2, h3, h4, h5, h6 {
|
|
@@ -295,6 +308,7 @@ a#blog-title:focus-visible::before {
|
|
|
295
308
|
.navbar-toggler {
|
|
296
309
|
border: none;
|
|
297
310
|
background: transparent;
|
|
311
|
+
color: var(--color-text);
|
|
298
312
|
cursor: pointer;
|
|
299
313
|
padding: 0.5rem;
|
|
300
314
|
display: none;
|
|
@@ -383,6 +397,27 @@ a#blog-title:focus-visible::before {
|
|
|
383
397
|
}
|
|
384
398
|
}
|
|
385
399
|
|
|
400
|
+
.related-posts {
|
|
401
|
+
margin-top: 3rem;
|
|
402
|
+
padding-top: 2rem;
|
|
403
|
+
border-top: 1px solid var(--color-notice);
|
|
404
|
+
|
|
405
|
+
h2 {
|
|
406
|
+
font-size: 1.25rem;
|
|
407
|
+
margin-bottom: 0.5rem;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
ul {
|
|
411
|
+
list-style: none;
|
|
412
|
+
padding-left: 0;
|
|
413
|
+
margin: 0;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.post-resume-title {
|
|
417
|
+
font-size: 1.25rem;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
386
421
|
.nav-list {
|
|
387
422
|
display: flex;
|
|
388
423
|
align-items: center;
|
|
@@ -505,6 +540,11 @@ p {
|
|
|
505
540
|
}
|
|
506
541
|
}
|
|
507
542
|
|
|
543
|
+
.row .link,
|
|
544
|
+
.row .link * {
|
|
545
|
+
color: var(--color-text);
|
|
546
|
+
}
|
|
547
|
+
|
|
508
548
|
.next {
|
|
509
549
|
text-align: right;
|
|
510
550
|
}
|
|
@@ -538,7 +578,7 @@ p {
|
|
|
538
578
|
|
|
539
579
|
code {
|
|
540
580
|
font-size: .9em;
|
|
541
|
-
font-family:
|
|
581
|
+
font-family: var(--font-mono);
|
|
542
582
|
color: var(--color-code);
|
|
543
583
|
word-wrap: break-word;
|
|
544
584
|
}
|
|
@@ -560,6 +600,46 @@ blockquote p {
|
|
|
560
600
|
margin-bottom: 0;
|
|
561
601
|
}
|
|
562
602
|
|
|
603
|
+
blockquote.callout {
|
|
604
|
+
--callout-color: var(--color-primary);
|
|
605
|
+
display: block;
|
|
606
|
+
width: auto;
|
|
607
|
+
margin: 1.5rem 0;
|
|
608
|
+
padding: 0.75rem 1rem;
|
|
609
|
+
border: 0;
|
|
610
|
+
border-left: 4px solid var(--callout-color);
|
|
611
|
+
border-radius: 0.25rem;
|
|
612
|
+
background-color: color-mix(in srgb, var(--callout-color) 10%, transparent);
|
|
613
|
+
font-style: normal;
|
|
614
|
+
font-weight: 400;
|
|
615
|
+
font-size: 1rem;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
blockquote.callout p + p {
|
|
619
|
+
margin-top: 0.5rem;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
blockquote.callout .callout-title {
|
|
623
|
+
color: var(--callout-color);
|
|
624
|
+
font-weight: 700;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
blockquote.callout-tip {
|
|
628
|
+
--callout-color: var(--color-success);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
blockquote.callout-warning {
|
|
632
|
+
--callout-color: var(--color-warning-icon);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
blockquote.callout-warning .callout-title {
|
|
636
|
+
color: var(--color-warning-text);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
blockquote.callout-danger {
|
|
640
|
+
--callout-color: var(--color-danger);
|
|
641
|
+
}
|
|
642
|
+
|
|
563
643
|
.highlight {
|
|
564
644
|
margin: 1.3rem 0;
|
|
565
645
|
}
|
|
@@ -569,10 +649,15 @@ blockquote p {
|
|
|
569
649
|
padding: 1rem 1rem;
|
|
570
650
|
overflow: auto;
|
|
571
651
|
background-color: var(--color-code-bg);
|
|
652
|
+
color: var(--syn-text);
|
|
572
653
|
white-space: pre-wrap;
|
|
573
654
|
min-width: 100%;
|
|
574
655
|
}
|
|
575
656
|
|
|
657
|
+
.highlight pre code {
|
|
658
|
+
color: inherit;
|
|
659
|
+
}
|
|
660
|
+
|
|
576
661
|
.highlight pre button,
|
|
577
662
|
.copy-btn {
|
|
578
663
|
position: absolute;
|
|
@@ -582,11 +667,12 @@ blockquote p {
|
|
|
582
667
|
border: none;
|
|
583
668
|
cursor: pointer;
|
|
584
669
|
padding: 0.25rem;
|
|
670
|
+
color: var(--syn-text);
|
|
585
671
|
}
|
|
586
672
|
|
|
587
673
|
.highlight pre button.copy-success {
|
|
588
674
|
background-color: var(--color-success);
|
|
589
|
-
color:
|
|
675
|
+
color: var(--color-bg);
|
|
590
676
|
border-radius: 4px;
|
|
591
677
|
}
|
|
592
678
|
|
|
@@ -613,10 +699,8 @@ ul {
|
|
|
613
699
|
}
|
|
614
700
|
|
|
615
701
|
#site-footer {
|
|
616
|
-
position: absolute;
|
|
617
|
-
bottom: 0;
|
|
618
702
|
width: 100%;
|
|
619
|
-
height: 4rem;
|
|
703
|
+
min-height: 4rem;
|
|
620
704
|
color: var(--color-text);
|
|
621
705
|
background-color: var(--color-bg);
|
|
622
706
|
}
|
|
@@ -652,7 +736,7 @@ svg {
|
|
|
652
736
|
|
|
653
737
|
.ascii-404 {
|
|
654
738
|
display: inline-block;
|
|
655
|
-
font-family:
|
|
739
|
+
font-family: var(--font-mono);
|
|
656
740
|
color: var(--color-code);
|
|
657
741
|
white-space: pre;
|
|
658
742
|
text-align: left;
|
|
@@ -770,7 +854,7 @@ svg {
|
|
|
770
854
|
top: 50%;
|
|
771
855
|
left: 50%;
|
|
772
856
|
transform: translate(-50%, -50%);
|
|
773
|
-
color:
|
|
857
|
+
color: var(--color-bg);
|
|
774
858
|
font-size: 9px;
|
|
775
859
|
font-weight: bold;
|
|
776
860
|
}
|
|
@@ -811,7 +895,7 @@ svg {
|
|
|
811
895
|
|
|
812
896
|
.divider {
|
|
813
897
|
background: var(--color-primary);
|
|
814
|
-
height:
|
|
898
|
+
height: 2px;
|
|
815
899
|
margin: 0 auto;
|
|
816
900
|
max-width: var(--container-width);
|
|
817
901
|
opacity: 1;
|
|
@@ -867,7 +951,7 @@ svg {
|
|
|
867
951
|
|
|
868
952
|
.pagination a.current {
|
|
869
953
|
background: var(--color-primary);
|
|
870
|
-
color:
|
|
954
|
+
color: var(--color-bg);
|
|
871
955
|
}
|
|
872
956
|
|
|
873
957
|
.pagination a.disabled {
|
|
@@ -893,7 +977,7 @@ svg {
|
|
|
893
977
|
|
|
894
978
|
&.current {
|
|
895
979
|
background: var(--color-primary);
|
|
896
|
-
color:
|
|
980
|
+
color: var(--color-bg);
|
|
897
981
|
}
|
|
898
982
|
}
|
|
899
983
|
|
|
@@ -962,7 +1046,7 @@ svg {
|
|
|
962
1046
|
width: 100%;
|
|
963
1047
|
text-align: center;
|
|
964
1048
|
padding: 0.5rem 0;
|
|
965
|
-
border-bottom: 1px solid
|
|
1049
|
+
border-bottom: 1px solid var(--color-notice);
|
|
966
1050
|
a {
|
|
967
1051
|
display: block;
|
|
968
1052
|
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
.highlight {
|
|
2
|
-
pre { background-color:
|
|
3
|
-
.hll { background-color:
|
|
4
|
-
.c { color:
|
|
5
|
-
.err { color:
|
|
6
|
-
.k { color:
|
|
7
|
-
.l { color:
|
|
8
|
-
.n { color:
|
|
9
|
-
.o { color:
|
|
10
|
-
.p { color:
|
|
11
|
-
.cm { color:
|
|
12
|
-
.cp { color:
|
|
13
|
-
.c1 { color:
|
|
14
|
-
.cs { color:
|
|
2
|
+
pre { background-color: var(--color-code-bg); }
|
|
3
|
+
.hll { background-color: var(--color-code-bg); }
|
|
4
|
+
.c { color: var(--syn-comment) } /* Comment */
|
|
5
|
+
.err { color: var(--color-danger) } /* Error */
|
|
6
|
+
.k { color: var(--syn-keyword) } /* Keyword */
|
|
7
|
+
.l { color: var(--syn-number) } /* Literal */
|
|
8
|
+
.n { color: var(--syn-text) } /* Name */
|
|
9
|
+
.o { color: var(--syn-operator) } /* Operator */
|
|
10
|
+
.p { color: var(--syn-text) } /* Punctuation */
|
|
11
|
+
.cm { color: var(--syn-comment) } /* Comment.Multiline */
|
|
12
|
+
.cp { color: var(--syn-comment) } /* Comment.Preproc */
|
|
13
|
+
.c1 { color: var(--syn-comment) } /* Comment.Single */
|
|
14
|
+
.cs { color: var(--syn-comment) } /* Comment.Special */
|
|
15
15
|
.ge { font-style: italic } /* Generic.Emph */
|
|
16
16
|
.gs { font-weight: bold } /* Generic.Strong */
|
|
17
|
-
.kc { color:
|
|
18
|
-
.kd { color:
|
|
19
|
-
.kn { color:
|
|
20
|
-
.kp { color:
|
|
21
|
-
.kr { color:
|
|
22
|
-
.kt { color:
|
|
23
|
-
.ld { color:
|
|
24
|
-
.m { color:
|
|
25
|
-
.s { color:
|
|
26
|
-
.na { color:
|
|
27
|
-
.nb { color:
|
|
28
|
-
.nc { color:
|
|
29
|
-
.no { color:
|
|
30
|
-
.nd { color:
|
|
31
|
-
.ni { color:
|
|
32
|
-
.ne { color:
|
|
33
|
-
.nf { color:
|
|
34
|
-
.nl { color:
|
|
35
|
-
.nn { color:
|
|
36
|
-
.nx { color:
|
|
37
|
-
.py { color:
|
|
38
|
-
.nt { color:
|
|
39
|
-
.nv { color:
|
|
40
|
-
.ow { color:
|
|
41
|
-
.w { color:
|
|
42
|
-
.mf { color:
|
|
43
|
-
.mh { color:
|
|
44
|
-
.mi { color:
|
|
45
|
-
.mo { color:
|
|
46
|
-
.sb { color:
|
|
47
|
-
.sc { color:
|
|
48
|
-
.sd { color:
|
|
49
|
-
.s2 { color:
|
|
50
|
-
.se { color:
|
|
51
|
-
.sh { color:
|
|
52
|
-
.si { color:
|
|
53
|
-
.sx { color:
|
|
54
|
-
.sr { color:
|
|
55
|
-
.s1 { color:
|
|
56
|
-
.ss { color:
|
|
57
|
-
.bp { color:
|
|
58
|
-
.vc { color:
|
|
59
|
-
.vg { color:
|
|
60
|
-
.vi { color:
|
|
61
|
-
.il { color:
|
|
62
|
-
.gu { color:
|
|
63
|
-
.gd { color:
|
|
64
|
-
.gi { color:
|
|
17
|
+
.kc { color: var(--syn-keyword) } /* Keyword.Constant */
|
|
18
|
+
.kd { color: var(--syn-keyword) } /* Keyword.Declaration */
|
|
19
|
+
.kn { color: var(--syn-operator) } /* Keyword.Namespace */
|
|
20
|
+
.kp { color: var(--syn-keyword) } /* Keyword.Pseudo */
|
|
21
|
+
.kr { color: var(--syn-keyword) } /* Keyword.Reserved */
|
|
22
|
+
.kt { color: var(--syn-keyword) } /* Keyword.Type */
|
|
23
|
+
.ld { color: var(--syn-string) } /* Literal.Date */
|
|
24
|
+
.m { color: var(--syn-number) } /* Literal.Number */
|
|
25
|
+
.s { color: var(--syn-string) } /* Literal.String */
|
|
26
|
+
.na { color: var(--syn-function) } /* Name.Attribute */
|
|
27
|
+
.nb { color: var(--syn-text) } /* Name.Builtin */
|
|
28
|
+
.nc { color: var(--syn-function) } /* Name.Class */
|
|
29
|
+
.no { color: var(--syn-keyword) } /* Name.Constant */
|
|
30
|
+
.nd { color: var(--syn-function) } /* Name.Decorator */
|
|
31
|
+
.ni { color: var(--syn-text) } /* Name.Entity */
|
|
32
|
+
.ne { color: var(--syn-function) } /* Name.Exception */
|
|
33
|
+
.nf { color: var(--syn-function) } /* Name.Function */
|
|
34
|
+
.nl { color: var(--syn-text) } /* Name.Label */
|
|
35
|
+
.nn { color: var(--syn-text) } /* Name.Namespace */
|
|
36
|
+
.nx { color: var(--syn-function) } /* Name.Other */
|
|
37
|
+
.py { color: var(--syn-text) } /* Name.Property */
|
|
38
|
+
.nt { color: var(--syn-operator) } /* Name.Tag */
|
|
39
|
+
.nv { color: var(--syn-text) } /* Name.Variable */
|
|
40
|
+
.ow { color: var(--syn-operator) } /* Operator.Word */
|
|
41
|
+
.w { color: var(--syn-text) } /* Text.Whitespace */
|
|
42
|
+
.mf { color: var(--syn-number) } /* Literal.Number.Float */
|
|
43
|
+
.mh { color: var(--syn-number) } /* Literal.Number.Hex */
|
|
44
|
+
.mi { color: var(--syn-number) } /* Literal.Number.Integer */
|
|
45
|
+
.mo { color: var(--syn-number) } /* Literal.Number.Oct */
|
|
46
|
+
.sb { color: var(--syn-string) } /* Literal.String.Backtick */
|
|
47
|
+
.sc { color: var(--syn-string) } /* Literal.String.Char */
|
|
48
|
+
.sd { color: var(--syn-string) } /* Literal.String.Doc */
|
|
49
|
+
.s2 { color: var(--syn-string) } /* Literal.String.Double */
|
|
50
|
+
.se { color: var(--syn-number) } /* Literal.String.Escape */
|
|
51
|
+
.sh { color: var(--syn-string) } /* Literal.String.Heredoc */
|
|
52
|
+
.si { color: var(--syn-string) } /* Literal.String.Interpol */
|
|
53
|
+
.sx { color: var(--syn-string) } /* Literal.String.Other */
|
|
54
|
+
.sr { color: var(--syn-string) } /* Literal.String.Regex */
|
|
55
|
+
.s1 { color: var(--syn-string) } /* Literal.String.Single */
|
|
56
|
+
.ss { color: var(--syn-string) } /* Literal.String.Symbol */
|
|
57
|
+
.bp { color: var(--syn-text) } /* Name.Builtin.Pseudo */
|
|
58
|
+
.vc { color: var(--syn-text) } /* Name.Variable.Class */
|
|
59
|
+
.vg { color: var(--syn-text) } /* Name.Variable.Global */
|
|
60
|
+
.vi { color: var(--syn-text) } /* Name.Variable.Instance */
|
|
61
|
+
.il { color: var(--syn-number) } /* Literal.Number.Integer.Long */
|
|
62
|
+
.gu { color: var(--syn-comment); } /* Generic.Subheading & Diff Unified/Comment? */
|
|
63
|
+
.gd { color: var(--syn-operator); } /* Generic.Deleted & Diff Deleted */
|
|
64
|
+
.gi { color: var(--syn-added); } /* Generic.Inserted & Diff Inserted */
|
|
65
65
|
}
|
data/assets/css/previews.css
CHANGED
|
@@ -1,44 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
/* Rendered at 600x315 CSS px with device scale factor 2 -> 1200x630 PNG */
|
|
2
|
+
:root {
|
|
3
|
+
--preview-bg: #FAF9FD;
|
|
4
|
+
--preview-text: #1A1726;
|
|
5
|
+
--preview-muted: #6A6580;
|
|
6
|
+
--preview-primary: #6B38D4;
|
|
7
|
+
--preview-accent: #B794FF;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
* {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
html,
|
|
15
|
+
body {
|
|
16
|
+
margin: 0;
|
|
17
|
+
width: 600px;
|
|
18
|
+
height: 315px;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
body {
|
|
23
|
+
background: linear-gradient(40deg, var(--preview-primary) 15%, var(--preview-accent) 85%);
|
|
24
|
+
padding: 18px;
|
|
25
|
+
font-family: 'Geist', 'Helvetica Neue', Arial, sans-serif;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.box {
|
|
29
|
+
height: 100%;
|
|
30
|
+
background-color: var(--preview-bg);
|
|
31
|
+
color: var(--preview-text);
|
|
32
|
+
padding: 32px 36px 26px;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.title {
|
|
39
|
+
margin: 0;
|
|
40
|
+
font-size: 34px;
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
line-height: 1.15;
|
|
43
|
+
letter-spacing: -0.02em;
|
|
44
|
+
display: -webkit-box;
|
|
45
|
+
-webkit-box-orient: vertical;
|
|
46
|
+
-webkit-line-clamp: 4;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.title .hash {
|
|
51
|
+
color: var(--preview-primary);
|
|
52
|
+
font-family: 'Geist Mono', ui-monospace, Menlo, monospace;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.footer {
|
|
57
|
+
display: flex;
|
|
58
|
+
justify-content: space-between;
|
|
59
|
+
align-items: baseline;
|
|
60
|
+
gap: 16px;
|
|
61
|
+
font-family: 'Geist Mono', ui-monospace, Menlo, monospace;
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
color: var(--preview-muted);
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.footer .author {
|
|
68
|
+
color: var(--preview-text);
|
|
69
|
+
font-weight: 500;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.footer .site {
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
text-overflow: ellipsis;
|
|
75
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/assets/js/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const copyButtonSVG = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="
|
|
1
|
+
const copyButtonSVG = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16">
|
|
2
2
|
<path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"/>
|
|
3
3
|
</svg>`;
|
|
4
4
|
|
data/assets/js/theme-toggle.js
CHANGED
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
const LIGHT_THEME = 'light';
|
|
7
7
|
const DARK_THEME = 'dark';
|
|
8
8
|
|
|
9
|
+
function getSavedTheme() {
|
|
10
|
+
try { return localStorage.getItem(THEME_KEY); } catch (e) { return null; }
|
|
11
|
+
}
|
|
12
|
+
|
|
9
13
|
function getThemePreference() {
|
|
10
|
-
const saved =
|
|
14
|
+
const saved = getSavedTheme();
|
|
11
15
|
if (saved) return saved;
|
|
12
16
|
|
|
13
17
|
return window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
@@ -15,12 +19,24 @@
|
|
|
15
19
|
: LIGHT_THEME;
|
|
16
20
|
}
|
|
17
21
|
|
|
18
|
-
function applyTheme(theme) {
|
|
22
|
+
function applyTheme(theme, persist) {
|
|
19
23
|
document.documentElement.setAttribute('data-theme', theme);
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
if (persist) {
|
|
25
|
+
try { localStorage.setItem(THEME_KEY, theme); } catch (e) {}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
updateThemeColor();
|
|
22
29
|
updateToggleButton(theme);
|
|
23
30
|
}
|
|
31
|
+
|
|
32
|
+
function updateThemeColor() {
|
|
33
|
+
const bg = getComputedStyle(document.documentElement)
|
|
34
|
+
.getPropertyValue('--color-bg').trim();
|
|
35
|
+
if (!bg) return;
|
|
36
|
+
document.querySelectorAll('meta[name="theme-color"]').forEach((meta) => {
|
|
37
|
+
meta.setAttribute('content', bg);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
24
40
|
|
|
25
41
|
function updateToggleButton(theme) {
|
|
26
42
|
const toggle = document.getElementById('theme-toggle');
|
|
@@ -38,7 +54,7 @@
|
|
|
38
54
|
function toggleTheme() {
|
|
39
55
|
const current = document.documentElement.getAttribute('data-theme') || LIGHT_THEME;
|
|
40
56
|
const newTheme = current === LIGHT_THEME ? DARK_THEME : LIGHT_THEME;
|
|
41
|
-
applyTheme(newTheme);
|
|
57
|
+
applyTheme(newTheme, true);
|
|
42
58
|
}
|
|
43
59
|
|
|
44
60
|
function init() {
|
|
@@ -52,7 +68,7 @@
|
|
|
52
68
|
|
|
53
69
|
window.matchMedia('(prefers-color-scheme: dark)')
|
|
54
70
|
.addEventListener('change', (e) => {
|
|
55
|
-
if (!
|
|
71
|
+
if (!getSavedTheme()) {
|
|
56
72
|
applyTheme(e.matches ? DARK_THEME : LIGHT_THEME);
|
|
57
73
|
}
|
|
58
74
|
});
|
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
|
+
version: 0.6.0
|
|
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-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -92,6 +92,7 @@ files:
|
|
|
92
92
|
- _includes/gallery
|
|
93
93
|
- _includes/head.html
|
|
94
94
|
- _includes/header.html
|
|
95
|
+
- _includes/related-posts.html
|
|
95
96
|
- _includes/scripts.html
|
|
96
97
|
- _includes/sharepost.html
|
|
97
98
|
- _includes/sidebar.html
|
|
@@ -145,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
145
146
|
- !ruby/object:Gem::Version
|
|
146
147
|
version: '0'
|
|
147
148
|
requirements: []
|
|
148
|
-
rubygems_version: 3.
|
|
149
|
+
rubygems_version: 3.4.19
|
|
149
150
|
signing_key:
|
|
150
151
|
specification_version: 4
|
|
151
152
|
summary: Minimal, wide and white blogging theme for Jekyll
|