whiteblog-theme 0.4.2 → 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 +192 -11
- data/_includes/buymeacoffee.html +51 -0
- data/_includes/head.html +3 -3
- data/_includes/related-posts.html +65 -0
- data/_includes/scripts.html +6 -1
- data/_layouts/post.html +4 -0
- data/_sass/whiteblog-theme/_layout.scss +136 -32
- 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 +5 -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
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
[](http://doge.mit-license.org)
|
|
4
4
|

|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
A minimal, wide and white Jekyll theme for technical blogs. Ships with a
|
|
7
|
+
dark/light toggle, category pages, client-side search, automatic PNG preview
|
|
8
|
+
generation for posts, an RSS feed, an automatic sitemap, reading-time
|
|
9
|
+
estimates, and pluggable comment providers.
|
|
10
10
|
|
|
11
11
|
## Live preview
|
|
12
12
|
|
|
@@ -14,7 +14,26 @@ To experiment with this code, add some sample content and run `bundle exec jekyl
|
|
|
14
14
|
|
|
15
15
|
## Screenshot
|
|
16
16
|
|
|
17
|
-

|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- **Dark mode** — `[data-theme="dark"]` toggle with `prefers-color-scheme`
|
|
22
|
+
detection and `localStorage` persistence. Colours are CSS variables.
|
|
23
|
+
- **Search** — client-side search over a generated `search.json`
|
|
24
|
+
(SimpleJekyllSearch, no external service).
|
|
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.
|
|
28
|
+
- **Post previews** — `_plugins/previews.rb` renders a social PNG per post
|
|
29
|
+
(see [Post preview plugin](#post-preview-plugin) for system requirements).
|
|
30
|
+
- **SEO** — meta description, Open Graph and Twitter tags, and JSON-LD
|
|
31
|
+
`BlogPosting`, all derived from the post excerpt.
|
|
32
|
+
- **Accessibility** — skip link, ARIA labels, accessible pagination,
|
|
33
|
+
keyboard-dismissable mobile nav, WCAG AA contrast.
|
|
34
|
+
- **Callouts** — Obsidian-style `> [!note]` blocks (see [Callouts](#callouts)).
|
|
35
|
+
- **Comments** — Disqus, Cusdis or Giscus, selected in `_config.yml`.
|
|
36
|
+
- **Analytics** — optional Google Analytics 4.
|
|
18
37
|
|
|
19
38
|
## Installation
|
|
20
39
|
|
|
@@ -38,20 +57,182 @@ Or install it yourself as:
|
|
|
38
57
|
|
|
39
58
|
$ gem install whiteblog-theme
|
|
40
59
|
|
|
60
|
+
## Configuration
|
|
41
61
|
|
|
42
|
-
|
|
62
|
+
All configuration lives in `_config.yml`.
|
|
63
|
+
|
|
64
|
+
### Layouts
|
|
65
|
+
|
|
66
|
+
| Layout | Use |
|
|
67
|
+
|-------------|----------------------------------------|
|
|
68
|
+
| `default` | Base for every other layout |
|
|
69
|
+
| `home` | Paginated index |
|
|
70
|
+
| `post` | Blog entry |
|
|
71
|
+
| `page` | Static page with sidebar |
|
|
72
|
+
| `page-wide` | Static page without sidebar |
|
|
73
|
+
| `allposts` | Full post listing |
|
|
74
|
+
| `categories`| Category view |
|
|
75
|
+
|
|
76
|
+
### Addons
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
addons:
|
|
80
|
+
back_to_top : true # back-to-top button
|
|
81
|
+
share_post : true # share buttons on posts
|
|
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
|
|
86
|
+
buymeacoffee:
|
|
87
|
+
id : "" # buymeacoffee username; empty disables the widget
|
|
88
|
+
description : "Support me on Buy me a coffee!"
|
|
89
|
+
message : ""
|
|
90
|
+
color : "" # empty uses the theme's --color-accent, or a hex
|
|
91
|
+
position : "left" # left, right
|
|
92
|
+
x_margin : "18" # mobile horizontal margin
|
|
93
|
+
x_margin_desktop : "72" # margin at >= 950px, aligned to the sidebar edge
|
|
94
|
+
y_margin : "18"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Comments
|
|
98
|
+
|
|
99
|
+
Set `comments.provider` and fill in the matching block. Any other blocks are
|
|
100
|
+
ignored.
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
comments:
|
|
104
|
+
provider : false # false, "disqus", "cusdis", "giscus"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Disqus** — create a site at [disqus.com](https://disqus.com/), then:
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
comments:
|
|
111
|
+
provider : "disqus"
|
|
112
|
+
disqus:
|
|
113
|
+
shortname : "your-disqus-shortname"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Cusdis** — self-hosted or [cusdis.com](https://cusdis.com/); copy the App ID
|
|
117
|
+
from your dashboard:
|
|
118
|
+
|
|
119
|
+
```yaml
|
|
120
|
+
comments:
|
|
121
|
+
provider : "cusdis"
|
|
122
|
+
cusdis:
|
|
123
|
+
appId : "your-cusdis-app-id"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Giscus** — enable GitHub Discussions on a public repo, install the
|
|
127
|
+
[giscus app](https://github.com/apps/giscus), then run the configurator at
|
|
128
|
+
[giscus.app](https://giscus.app/) to get the IDs:
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
comments:
|
|
132
|
+
provider : "giscus"
|
|
133
|
+
giscus:
|
|
134
|
+
repo : "username/repo-name"
|
|
135
|
+
repo_id : "..." # from giscus.app
|
|
136
|
+
category : "General"
|
|
137
|
+
category_id : "..." # from giscus.app
|
|
138
|
+
mapping : "pathname"
|
|
139
|
+
reactions_enabled : "1"
|
|
140
|
+
input_position : "top"
|
|
141
|
+
theme : "preferred_color_scheme"
|
|
142
|
+
lang : "en"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Giscus and Cusdis follow the site's dark/light toggle without a page reload.
|
|
146
|
+
|
|
147
|
+
### Analytics
|
|
148
|
+
|
|
149
|
+
```yaml
|
|
150
|
+
analytics:
|
|
151
|
+
google:
|
|
152
|
+
tracking_id : "G-XXXXXXXXXX" # empty / false disables GA4
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Per-page frontmatter
|
|
43
156
|
|
|
44
|
-
|
|
157
|
+
- `head_inline` — raw HTML injected into `<head>` for a single page (extra
|
|
158
|
+
meta tags, a page-specific stylesheet, etc.).
|
|
159
|
+
- `slug` — overrides the slug used for the preview PNG path,
|
|
160
|
+
`assets/images/previews/<slug>.png`.
|
|
161
|
+
|
|
162
|
+
## Post preview plugin
|
|
163
|
+
|
|
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.
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# macOS
|
|
176
|
+
brew install pngquant # optional, for compression
|
|
177
|
+
|
|
178
|
+
# Debian / Ubuntu
|
|
179
|
+
apt-get install chromium pngquant
|
|
180
|
+
```
|
|
181
|
+
|
|
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.
|
|
184
|
+
|
|
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.
|
|
196
|
+
```
|
|
197
|
+
|
|
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.
|
|
45
212
|
|
|
46
213
|
## Development
|
|
47
214
|
|
|
48
215
|
To set up your environment to develop this theme, run `bundle install`.
|
|
49
216
|
|
|
50
|
-
|
|
217
|
+
```bash
|
|
218
|
+
bundle exec jekyll serve # local server at http://localhost:4000
|
|
219
|
+
bundle exec jekyll serve --drafts # include drafts
|
|
220
|
+
bundle exec jekyll build # production build
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
When the theme is released, only the files in `_layouts`, `_includes`,
|
|
224
|
+
`_sass`, `_pages` and `assets` tracked with Git are bundled. To add a custom
|
|
225
|
+
directory, edit the regexp in `whiteblog-theme.gemspec`.
|
|
226
|
+
|
|
227
|
+
## Contributing
|
|
51
228
|
|
|
52
|
-
|
|
53
|
-
|
|
229
|
+
Bug reports and pull requests are welcome on GitHub at
|
|
230
|
+
https://github.com/vmsilvamolina/whiteblog-theme. This project is intended to
|
|
231
|
+
be a safe, welcoming space for collaboration, and contributors are expected to
|
|
232
|
+
adhere to the [Contributor Covenant](http://contributor-covenant.org) code of
|
|
233
|
+
conduct.
|
|
54
234
|
|
|
55
235
|
## License
|
|
56
236
|
|
|
57
|
-
The theme is available as open source under the terms of the
|
|
237
|
+
The theme is available as open source under the terms of the
|
|
238
|
+
[MIT License](https://opensource.org/licenses/MIT).
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script data-name="BMC-Widget" data-cfasync="false" src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
|
|
2
|
+
data-id="{{ site.addons.buymeacoffee.id }}"
|
|
3
|
+
data-description="{{ site.addons.buymeacoffee.description }}"
|
|
4
|
+
data-message="{{ site.addons.buymeacoffee.message }}"
|
|
5
|
+
data-color="{{ site.addons.buymeacoffee.color }}"
|
|
6
|
+
data-position="{{ site.addons.buymeacoffee.position }}"
|
|
7
|
+
data-x_margin="{{ site.addons.buymeacoffee.x_margin }}"
|
|
8
|
+
data-y_margin="{{ site.addons.buymeacoffee.y_margin }}"></script>
|
|
9
|
+
{% if site.addons.buymeacoffee.color == "" or site.addons.buymeacoffee.color == nil %}
|
|
10
|
+
<script>
|
|
11
|
+
(function() {
|
|
12
|
+
var s = document.querySelector('script[data-name="BMC-Widget"]');
|
|
13
|
+
function accent() {
|
|
14
|
+
return getComputedStyle(document.documentElement).getPropertyValue('--color-accent').trim();
|
|
15
|
+
}
|
|
16
|
+
s.dataset.color = accent();
|
|
17
|
+
|
|
18
|
+
// the widget only paints the button's background once at render time, so follow
|
|
19
|
+
// theme toggles (data-theme attribute) manually to keep it in sync
|
|
20
|
+
new MutationObserver(function() {
|
|
21
|
+
var color = accent();
|
|
22
|
+
s.dataset.color = color;
|
|
23
|
+
var btn = document.getElementById('bmc-wbtn');
|
|
24
|
+
if (btn) btn.style.background = color;
|
|
25
|
+
}).observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme'] });
|
|
26
|
+
})();
|
|
27
|
+
</script>
|
|
28
|
+
{% endif %}
|
|
29
|
+
{% if site.addons.buymeacoffee.x_margin_desktop and site.addons.buymeacoffee.x_margin_desktop != "" %}
|
|
30
|
+
<script>
|
|
31
|
+
(function() {
|
|
32
|
+
var side = '{{ site.addons.buymeacoffee.position }}'.toLowerCase() === 'left' ? 'left' : 'right';
|
|
33
|
+
var mq = window.matchMedia('(min-width: 950px)');
|
|
34
|
+
function position() {
|
|
35
|
+
var btn = document.getElementById('bmc-wbtn');
|
|
36
|
+
if (!btn) return;
|
|
37
|
+
// the widget only sets style.left/right once at render time, so this override sticks
|
|
38
|
+
// through its hover/click animations (which only touch style.transform)
|
|
39
|
+
btn.style[side] = (mq.matches ? '{{ site.addons.buymeacoffee.x_margin_desktop }}' : '{{ site.addons.buymeacoffee.x_margin }}') + 'px';
|
|
40
|
+
}
|
|
41
|
+
var observer = new MutationObserver(function() {
|
|
42
|
+
if (document.getElementById('bmc-wbtn')) {
|
|
43
|
+
position();
|
|
44
|
+
observer.disconnect();
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
observer.observe(document.body, { childList: true });
|
|
48
|
+
mq.addEventListener('change', position);
|
|
49
|
+
})();
|
|
50
|
+
</script>
|
|
51
|
+
{% endif %}
|
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
|
})();
|
|
@@ -12,3 +13,7 @@
|
|
|
12
13
|
{% if site.analytics.google.tracking_id and site.analytics.google.tracking_id != "" %}
|
|
13
14
|
{% include /analytics/googleAnalytics.html %}
|
|
14
15
|
{% endif %}
|
|
16
|
+
|
|
17
|
+
{% if site.addons.buymeacoffee.id and site.addons.buymeacoffee.id != "" %}
|
|
18
|
+
{% include buymeacoffee.html %}
|
|
19
|
+
{% endif %}
|
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
|
}
|
|
@@ -641,6 +725,26 @@ svg {
|
|
|
641
725
|
vertical-align: unset;
|
|
642
726
|
}
|
|
643
727
|
|
|
728
|
+
.error-404 {
|
|
729
|
+
display: flex;
|
|
730
|
+
flex-direction: column;
|
|
731
|
+
align-items: center;
|
|
732
|
+
text-align: center;
|
|
733
|
+
gap: 1.5rem;
|
|
734
|
+
margin: 2rem 0;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.ascii-404 {
|
|
738
|
+
display: inline-block;
|
|
739
|
+
font-family: var(--font-mono);
|
|
740
|
+
color: var(--color-code);
|
|
741
|
+
white-space: pre;
|
|
742
|
+
text-align: left;
|
|
743
|
+
overflow-x: auto;
|
|
744
|
+
max-width: 100%;
|
|
745
|
+
line-height: 1.15;
|
|
746
|
+
}
|
|
747
|
+
|
|
644
748
|
.float-abajo {
|
|
645
749
|
display: flex;
|
|
646
750
|
justify-content: flex-end;
|
|
@@ -750,7 +854,7 @@ svg {
|
|
|
750
854
|
top: 50%;
|
|
751
855
|
left: 50%;
|
|
752
856
|
transform: translate(-50%, -50%);
|
|
753
|
-
color:
|
|
857
|
+
color: var(--color-bg);
|
|
754
858
|
font-size: 9px;
|
|
755
859
|
font-weight: bold;
|
|
756
860
|
}
|
|
@@ -791,7 +895,7 @@ svg {
|
|
|
791
895
|
|
|
792
896
|
.divider {
|
|
793
897
|
background: var(--color-primary);
|
|
794
|
-
height:
|
|
898
|
+
height: 2px;
|
|
795
899
|
margin: 0 auto;
|
|
796
900
|
max-width: var(--container-width);
|
|
797
901
|
opacity: 1;
|
|
@@ -847,7 +951,7 @@ svg {
|
|
|
847
951
|
|
|
848
952
|
.pagination a.current {
|
|
849
953
|
background: var(--color-primary);
|
|
850
|
-
color:
|
|
954
|
+
color: var(--color-bg);
|
|
851
955
|
}
|
|
852
956
|
|
|
853
957
|
.pagination a.disabled {
|
|
@@ -873,7 +977,7 @@ svg {
|
|
|
873
977
|
|
|
874
978
|
&.current {
|
|
875
979
|
background: var(--color-primary);
|
|
876
|
-
color:
|
|
980
|
+
color: var(--color-bg);
|
|
877
981
|
}
|
|
878
982
|
}
|
|
879
983
|
|
|
@@ -942,7 +1046,7 @@ svg {
|
|
|
942
1046
|
width: 100%;
|
|
943
1047
|
text-align: center;
|
|
944
1048
|
padding: 0.5rem 0;
|
|
945
|
-
border-bottom: 1px solid
|
|
1049
|
+
border-bottom: 1px solid var(--color-notice);
|
|
946
1050
|
a {
|
|
947
1051
|
display: block;
|
|
948
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
|
|
@@ -83,6 +83,7 @@ files:
|
|
|
83
83
|
- README.md
|
|
84
84
|
- _includes/analytics/googleAnalytics.html
|
|
85
85
|
- _includes/backtotop.html
|
|
86
|
+
- _includes/buymeacoffee.html
|
|
86
87
|
- _includes/comments-providers/cusdis.html
|
|
87
88
|
- _includes/comments-providers/disqus.html
|
|
88
89
|
- _includes/comments-providers/giscus.html
|
|
@@ -91,6 +92,7 @@ files:
|
|
|
91
92
|
- _includes/gallery
|
|
92
93
|
- _includes/head.html
|
|
93
94
|
- _includes/header.html
|
|
95
|
+
- _includes/related-posts.html
|
|
94
96
|
- _includes/scripts.html
|
|
95
97
|
- _includes/sharepost.html
|
|
96
98
|
- _includes/sidebar.html
|
|
@@ -144,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
144
146
|
- !ruby/object:Gem::Version
|
|
145
147
|
version: '0'
|
|
146
148
|
requirements: []
|
|
147
|
-
rubygems_version: 3.
|
|
149
|
+
rubygems_version: 3.4.19
|
|
148
150
|
signing_key:
|
|
149
151
|
specification_version: 4
|
|
150
152
|
summary: Minimal, wide and white blogging theme for Jekyll
|