al_folio_core 1.0.13 → 1.0.15
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/CHANGELOG.md +12 -0
- data/_includes/head.liquid +15 -0
- data/_includes/plugins/al_email_protect_scripts.liquid +4 -0
- data/_includes/plugins/al_email_protect_styles.liquid +4 -0
- data/_includes/plugins/al_marimo_scripts.liquid +4 -0
- data/_includes/plugins/al_marimo_styles.liquid +4 -0
- data/_includes/plugins/al_rtl_html_attrs.liquid +7 -0
- data/_includes/plugins/al_rtl_styles.liquid +4 -0
- data/_includes/scripts.liquid +10 -0
- data/_layouts/bib.liquid +1 -1
- data/_layouts/default.liquid +18 -1
- data/_sass/_utilities.scss +23 -2
- data/assets/js/theme.js +9 -1
- data/lib/al_folio_core/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 33f4abd1450ddea086000cfada14301413b73290e2ceed10a64a6c6de52d3c43
|
|
4
|
+
data.tar.gz: cd5a489172370b4f7a8e8c7283dcfa9e5957e6306f3eb1de52f44b66ce6dfc3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 253a185eb0d59b0e641a020774f605e6b132c71bb1c7376117651dbea1685e647d7116fc84d2ee810dc1b27fcf9ce5de357324017ce7ffa4cc7ce914ffa09429
|
|
7
|
+
data.tar.gz: 809c3daf737a1745b64459cddd4e7f27786e6926830bc22161ca8771d8a803b31ee39adfcb159708a4c7d5a3a163afb5723ae931e9513f21cda9f4380c2946ff
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.15 - 2026-08-03
|
|
4
|
+
|
|
5
|
+
- Fixed text colour staggering when switching between light and dark themes, which read as a flicker. `color`, `fill` and `stroke` are inherited properties, but the theme-transition rule applied them to `html.transition *`, so every inheriting element ran its own 240ms ease toward a parent whose colour was still animating — convergence compounded once per level of nesting, and deeper text landed visibly later before snapping when the class was removed. Measured on the about page, an `h2 > a` sat at `rgb(50,50,50)` while the paragraph beside it was already at `rgb(130,130,130)`. Those properties are now transitioned once, on the root and on `body`; non-inherited properties keep their per-element transitions. Text now changes uniformly rather than in waves.
|
|
6
|
+
- Fixed `transition-delay: 0` being silently dropped by the CSS parser — a `<time>` value requires a unit even for zero, unlike `<length>`. Now `0s`.
|
|
7
|
+
- Widened the margin before the `.transition` class is removed. It was 260ms against a 240ms transition, so a single slow frame during the theme repaint truncated the transition into a snap; the cleanup delay is now derived from the duration.
|
|
8
|
+
|
|
9
|
+
## 1.0.14 - 2026-08-02
|
|
10
|
+
|
|
11
|
+
- Added invocation hooks for three new plugin gems: `al_rtl`, `al_email_protect` and `al_marimo`. Each is a parse-safe wrapper under `_includes/plugins/` called from `head.liquid`, `scripts.liquid` or `default.liquid`, and every call sits inside a `site.plugins contains` guard — an unguarded custom tag is a parse error on any site that has not installed the gem, which fails the whole build rather than just the feature.
|
|
12
|
+
- `al_rtl` needs `dir` on the `<html>` element, which is what the browser's bidi algorithm, CSS logical properties and Tailwind's `rtl:` variant key off; a wrapper `div` would leave the navbar, footer and scrollbar placement laid out left-to-right. The attributes are captured into a variable rather than the tag being wrapped in `{% if %}`, because a conditional there stops Prettier seeing a static root element and it re-indents the entire document body. Sites without `al_rtl` get byte-identical output from the fallback branch.
|
|
13
|
+
- Added `.gitignore`. The repo had none, so `npm ci` (needed for the prettier lint) left `node_modules` addable and a routine `git add -A` swept ~208k lines of vendored JS into a commit.
|
|
14
|
+
|
|
3
15
|
## 1.0.13 - 2026-07-29
|
|
4
16
|
|
|
5
17
|
- Added an `apple-touch-icon` link to `_includes/head.liquid`. Without it, "Add to Home Screen" on iOS falls back to a screenshot of the page instead of the site icon, because Safari only reads `rel="apple-touch-icon"` for that thumbnail — it never uses `rel="shortcut icon"`. The link is emitted only when a raster asset actually exists: a new optional `apple_touch_icon` config key (resolved under `/assets/img/` like `icon`, or used verbatim when it is a rooted path or an absolute URL), otherwise an `icon` that is itself a `.png`/`.jpg`/`.jpeg` file. The default emoji `icon` renders as an inline SVG data URI, which Safari ignores for touch icons, so in that case nothing is emitted rather than a link that would 404. Apple's recommended asset is a 180x180 PNG. Fixes alshedivat/al-folio#2774.
|
data/_includes/head.liquid
CHANGED
|
@@ -191,3 +191,18 @@
|
|
|
191
191
|
<!-- Cookie Consent -->
|
|
192
192
|
{% include plugins/al_cookie_styles.liquid %}
|
|
193
193
|
{% endif %}
|
|
194
|
+
|
|
195
|
+
{% if site.plugins contains 'al_rtl' %}
|
|
196
|
+
<!-- Right-to-left support -->
|
|
197
|
+
{% include plugins/al_rtl_styles.liquid %}
|
|
198
|
+
{% endif %}
|
|
199
|
+
|
|
200
|
+
{% if site.protect_email and site.plugins contains 'al_email_protect' %}
|
|
201
|
+
<!-- Email obfuscation -->
|
|
202
|
+
{% include plugins/al_email_protect_styles.liquid %}
|
|
203
|
+
{% endif %}
|
|
204
|
+
|
|
205
|
+
{% if page.marimo and site.plugins contains 'al_marimo' %}
|
|
206
|
+
<!-- Marimo notebooks -->
|
|
207
|
+
{% include plugins/al_marimo_styles.liquid %}
|
|
208
|
+
{% endif %}
|
data/_includes/scripts.liquid
CHANGED
|
@@ -142,3 +142,13 @@
|
|
|
142
142
|
{% include plugins/al_newsletter_scripts.liquid %}
|
|
143
143
|
{% endif %}
|
|
144
144
|
{% endif %}
|
|
145
|
+
|
|
146
|
+
{% if site.protect_email and site.plugins contains 'al_email_protect' %}
|
|
147
|
+
<!-- Email obfuscation -->
|
|
148
|
+
{% include plugins/al_email_protect_scripts.liquid %}
|
|
149
|
+
{% endif %}
|
|
150
|
+
|
|
151
|
+
{% if page.marimo and site.plugins contains 'al_marimo' %}
|
|
152
|
+
<!-- Marimo notebooks -->
|
|
153
|
+
{% include plugins/al_marimo_scripts.liquid %}
|
|
154
|
+
{% endif %}
|
data/_layouts/bib.liquid
CHANGED
data/_layouts/default.liquid
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
|
-
|
|
2
|
+
{%- comment -%}
|
|
3
|
+
al_rtl owns the language and direction attributes when it is installed, because
|
|
4
|
+
`dir` has to sit on <html> for the browser's bidi handling, CSS logical
|
|
5
|
+
properties and Tailwind's rtl: variant to apply to the whole document.
|
|
6
|
+
|
|
7
|
+
Captured into a variable rather than wrapping the <html> tag in a conditional:
|
|
8
|
+
a conditional there stops the tag being a single static element, and Prettier
|
|
9
|
+
then re-indents the entire document body. The guard keeps this parse-safe —
|
|
10
|
+
without the plugin the tag does not exist and Liquid fails on every page.
|
|
11
|
+
{%- endcomment -%}
|
|
12
|
+
{%- capture html_attributes -%}
|
|
13
|
+
{%- if site.plugins contains 'al_rtl' -%}
|
|
14
|
+
{%- include plugins/al_rtl_html_attrs.liquid -%}
|
|
15
|
+
{%- else -%}
|
|
16
|
+
lang="{{ site.lang }}"
|
|
17
|
+
{%- endif -%}
|
|
18
|
+
{%- endcapture -%}
|
|
19
|
+
<html {{ html_attributes }}>
|
|
3
20
|
<!-- Head -->
|
|
4
21
|
<head>
|
|
5
22
|
{% if page.redirect %}
|
data/_sass/_utilities.scss
CHANGED
|
@@ -120,14 +120,35 @@ progress::-moz-progress-bar {
|
|
|
120
120
|
|
|
121
121
|
// Themes transition
|
|
122
122
|
|
|
123
|
+
// `color`, `fill` and `stroke` are INHERITED properties, so they are
|
|
124
|
+
// transitioned on the root only. Applying them to every descendant made each
|
|
125
|
+
// inheriting element run its own 240ms ease toward a parent that was itself
|
|
126
|
+
// still animating — so text converged later the deeper it sat in the tree, and
|
|
127
|
+
// then snapped when this class was removed. Measured on the about page: an
|
|
128
|
+
// `h2 > a` was roughly 2.5x behind the surrounding paragraph mid-transition.
|
|
129
|
+
// Transitioning them once at the root lets every descendant inherit the same
|
|
130
|
+
// animated value on the same frame.
|
|
131
|
+
// `body` is included because it declares `color` itself; without it the value
|
|
132
|
+
// every descendant inherits would change instantly and text would snap rather
|
|
133
|
+
// than fade.
|
|
123
134
|
html.transition,
|
|
135
|
+
html.transition body {
|
|
136
|
+
transition-property: color, background-color, border-color, fill, stroke, box-shadow !important;
|
|
137
|
+
transition-duration: 240ms !important;
|
|
138
|
+
transition-timing-function: ease !important;
|
|
139
|
+
transition-delay: 0s !important;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Non-inherited properties still need to be transitioned per element.
|
|
124
143
|
html.transition *,
|
|
125
144
|
html.transition *:before,
|
|
126
145
|
html.transition *:after {
|
|
127
|
-
transition-property:
|
|
146
|
+
transition-property: background-color, border-color, box-shadow !important;
|
|
128
147
|
transition-duration: 240ms !important;
|
|
129
148
|
transition-timing-function: ease !important;
|
|
130
|
-
|
|
149
|
+
// `0` alone is invalid for a <time> value — unlike <length>, time requires a
|
|
150
|
+
// unit even for zero — so this declaration was being dropped by the parser.
|
|
151
|
+
transition-delay: 0s !important;
|
|
131
152
|
}
|
|
132
153
|
|
|
133
154
|
// Copy button
|
data/assets/js/theme.js
CHANGED
|
@@ -245,11 +245,19 @@ let setSearchTheme = (theme) => {
|
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
247
|
|
|
248
|
+
// Keep this comfortably longer than the 240ms transition-duration in
|
|
249
|
+
// _utilities.scss. Removing the class mid-transition snaps every element still
|
|
250
|
+
// interpolating straight to its final colour, which reads as a flicker; at the
|
|
251
|
+
// previous 260ms there were only 20ms of slack, so one slow frame during the
|
|
252
|
+
// repaint was enough to truncate it.
|
|
253
|
+
const THEME_TRANSITION_MS = 240;
|
|
254
|
+
const THEME_TRANSITION_CLEANUP_MS = THEME_TRANSITION_MS + 120;
|
|
255
|
+
|
|
248
256
|
let transTheme = () => {
|
|
249
257
|
document.documentElement.classList.add("transition");
|
|
250
258
|
window.setTimeout(() => {
|
|
251
259
|
document.documentElement.classList.remove("transition");
|
|
252
|
-
},
|
|
260
|
+
}, THEME_TRANSITION_CLEANUP_MS);
|
|
253
261
|
};
|
|
254
262
|
|
|
255
263
|
// Determine the expected state of the theme toggle, which can be "dark", "light", or
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: al_folio_core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- al-folio maintainers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -117,15 +117,21 @@ files:
|
|
|
117
117
|
- _includes/plugins/al_comments.liquid
|
|
118
118
|
- _includes/plugins/al_cookie_scripts.liquid
|
|
119
119
|
- _includes/plugins/al_cookie_styles.liquid
|
|
120
|
+
- _includes/plugins/al_email_protect_scripts.liquid
|
|
121
|
+
- _includes/plugins/al_email_protect_styles.liquid
|
|
120
122
|
- _includes/plugins/al_icons_styles.liquid
|
|
121
123
|
- _includes/plugins/al_img_tools_scripts.liquid
|
|
122
124
|
- _includes/plugins/al_img_tools_styles.liquid
|
|
125
|
+
- _includes/plugins/al_marimo_scripts.liquid
|
|
126
|
+
- _includes/plugins/al_marimo_styles.liquid
|
|
123
127
|
- _includes/plugins/al_math_scripts.liquid
|
|
124
128
|
- _includes/plugins/al_math_styles.liquid
|
|
125
129
|
- _includes/plugins/al_newsletter_form_center.liquid
|
|
126
130
|
- _includes/plugins/al_newsletter_form_center_margin.liquid
|
|
127
131
|
- _includes/plugins/al_newsletter_form_left.liquid
|
|
128
132
|
- _includes/plugins/al_newsletter_scripts.liquid
|
|
133
|
+
- _includes/plugins/al_rtl_html_attrs.liquid
|
|
134
|
+
- _includes/plugins/al_rtl_styles.liquid
|
|
129
135
|
- _includes/plugins/al_search_assets.liquid
|
|
130
136
|
- _includes/projects.liquid
|
|
131
137
|
- _includes/projects_horizontal.liquid
|