pandorga 2.3.12 → 2.3.16
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 +28 -0
- data/_layouts/home.html +3 -2
- data/assets/css/ledger/home.css +74 -36
- data/examples/full/_config.yml +3 -2
- data/examples/minimal/_config.yml +3 -2
- data/lib/pandorga/commands/new.rb +1 -1
- data/lib/pandorga/registry/schema.yml +1 -1
- data/lib/pandorga/version.rb +1 -1
- data/scripts/test/test-home-hero-overlay-split.rb +112 -0
- data/scripts/test/test-home-hero-overlay-strength.rb +99 -0
- data/scripts/validate.sh +2 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a40b75762591bdeac34570da02abe59b95e228f96dc1c5452705a4bf3cbd29e9
|
|
4
|
+
data.tar.gz: 3455162a8d38311c091c54acc2546075e83259bf6c9945977f91f25834d5f4d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c5b2e3caaac639e87e1c6347991138ccbd6975a7a505f99dc0285056eeedd2216abc87d5a7b2934a6ba51f82c5fd44d2772875631c65a0ce7e5f87ded03dd1b
|
|
7
|
+
data.tar.gz: aab5ae86c928198b31698dd99119dd6f1dba4efa36e4b8080460ce8f244bab5b09da56db5433d1c2bcd2c9afdc9a6947973b58ce3f0aadcda61764e77a356993
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.3.16
|
|
4
|
+
|
|
5
|
+
- CR-24 overlay split: `strength` (`--home-hero-vignette`) darkens the photo area via `::after` (masked off the text band); `pool` (`--home-hero-pool`) is an **absolute** text-band alpha on `::before` (not scaled by strength) (PLT-AC-102).
|
|
6
|
+
- Every overlay stop uses `min(cap, …)` with `--home-hero-strength-cap` (~0.42) and `--home-hero-pool-cap` (0.90), both < 1; shade is charcoal (`--home-hero-shade`) so composites never hit pure-black RGB (PLT-AC-102).
|
|
7
|
+
- Removed the historic `… * vignette / 0.6` overscale that pushed alphas past 1 at strength ≥ 0.6.
|
|
8
|
+
|
|
3
9
|
## [Unreleased]
|
|
4
10
|
|
|
11
|
+
## [2.3.15] — 2026-10-30
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- PLT-AC-101 strength emit test runs under CI `bundle exec` (no mise) so the gem publish validate can pass.
|
|
16
|
+
|
|
17
|
+
## [2.3.14] — 2026-10-30
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- `pandorga.home.hero_overlay.strength` (0–1) preferred overlay-darkness key; falls back to legacy `vignette`; emitted as `--home-hero-vignette` (PLT-AC-101).
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- CR-24: soft edgeless hero overlay base stops set to local recipe D; sites darken further via `hero_overlay.strength` (PLT-AC-100). Hero name = band title + 2pt unchanged (PLT-AC-98/99).
|
|
26
|
+
|
|
27
|
+
## [2.3.13] — 2026-10-30
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Superseded before RubyGems publish by 2.3.14 (strength config + darker recipe D base).
|
|
32
|
+
|
|
5
33
|
## [2.3.12] — 2026-10-30
|
|
6
34
|
|
|
7
35
|
### Fixed
|
data/_layouts/home.html
CHANGED
|
@@ -23,10 +23,11 @@ layout: shell
|
|
|
23
23
|
<main class="home-ledger">
|
|
24
24
|
{%- assign _hero_overlay = site.pandorga.home.hero_overlay -%}
|
|
25
25
|
{%- if _hero_overlay -%}
|
|
26
|
+
{%- assign _hero_overlay_strength = _hero_overlay.strength | default: _hero_overlay.vignette -%}
|
|
26
27
|
<style>
|
|
27
28
|
:root {
|
|
28
|
-
{%- if
|
|
29
|
-
--home-hero-vignette: {{
|
|
29
|
+
{%- if _hero_overlay_strength -%}
|
|
30
|
+
--home-hero-vignette: {{ _hero_overlay_strength }};
|
|
30
31
|
{%- endif -%}
|
|
31
32
|
{%- if _hero_overlay.pool -%}
|
|
32
33
|
--home-hero-pool: {{ _hero_overlay.pool }};
|
data/assets/css/ledger/home.css
CHANGED
|
@@ -1859,16 +1859,25 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
1859
1859
|
}
|
|
1860
1860
|
|
|
1861
1861
|
/* ═══════════════════════════════════════════════════════════════════════════
|
|
1862
|
-
CR-22…22.4 — Home hero B3 + C4 (PLT-AC-81…94)
|
|
1862
|
+
CR-22…22.4 — Home hero B3 + C4 (PLT-AC-81…94) + overlay strength/pool (PLT-AC-100…102)
|
|
1863
1863
|
Photo as hero background + 50/50 masthead with Projects from 1024px.
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1864
|
+
Config (pandorga.home.hero_overlay):
|
|
1865
|
+
strength | vignette → --home-hero-vignette (0–1): photo-area darkness
|
|
1866
|
+
(radial, left falloff, upper vertical). Linear in [0,1]; at 1.0 every
|
|
1867
|
+
photo-area stop is capped ≤ --home-hero-strength-cap (~0.42) so the
|
|
1868
|
+
figure stays recognizable.
|
|
1869
|
+
pool → --home-hero-pool (0–1): absolute black alpha of the text band
|
|
1870
|
+
(lower vertical stops / stacked copy band). Not a multiplier.
|
|
1871
|
+
Every alpha is min(cap, …); caps < 1; shade is charcoal (not #000) so composites never hit pure-black RGB.
|
|
1867
1872
|
═══════════════════════════════════════════════════════════════════════════ */
|
|
1868
1873
|
|
|
1869
1874
|
:root {
|
|
1870
1875
|
--home-hero-vignette: 0.60;
|
|
1871
|
-
--home-hero-pool: 0.
|
|
1876
|
+
--home-hero-pool: 0.70;
|
|
1877
|
+
--home-hero-strength-cap: 0.42;
|
|
1878
|
+
--home-hero-pool-cap: 0.90;
|
|
1879
|
+
/* Deep charcoal (not #000): even over black clothing, composites stay RGB sum ≥ 3. */
|
|
1880
|
+
--home-hero-shade: 18, 20, 26;
|
|
1872
1881
|
--home-masthead-gutter: clamp(1.25rem, 2.2vw, 2rem);
|
|
1873
1882
|
}
|
|
1874
1883
|
|
|
@@ -1882,8 +1891,10 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
1882
1891
|
object-position: center;
|
|
1883
1892
|
}
|
|
1884
1893
|
|
|
1885
|
-
/* Soft edgeless photo overlay (C4 / PLT-AC-89 / PLT-AC-100)
|
|
1886
|
-
|
|
1894
|
+
/* Soft edgeless photo overlay (C4 / PLT-AC-89 / PLT-AC-100…102).
|
|
1895
|
+
::after = strength (photo area). ::before = pool (text-band absolute alpha).
|
|
1896
|
+
Independent; every stop min(cap, …); charcoal shade + caps < 1 → no pure-black pixels from the overlay. */
|
|
1897
|
+
.home-hero-portrait::before,
|
|
1887
1898
|
.home-hero-portrait::after {
|
|
1888
1899
|
content: "";
|
|
1889
1900
|
position: absolute;
|
|
@@ -1891,29 +1902,47 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
1891
1902
|
z-index: 2;
|
|
1892
1903
|
pointer-events: none;
|
|
1893
1904
|
border-radius: 0;
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
/* Text band: absolute pool alpha only (not scaled by strength).
|
|
1908
|
+
Ramp starts high enough that title + summary sit fully in the opaque band. */
|
|
1909
|
+
.home-hero-portrait::before {
|
|
1910
|
+
background: linear-gradient(
|
|
1911
|
+
180deg,
|
|
1912
|
+
transparent 34%,
|
|
1913
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-pool-cap), calc(var(--home-hero-pool) * 0.45))) 46%,
|
|
1914
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-pool-cap), calc(var(--home-hero-pool) * 0.78))) 56%,
|
|
1915
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-pool-cap), var(--home-hero-pool))) 66%,
|
|
1916
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-pool-cap), var(--home-hero-pool))) 100%
|
|
1917
|
+
);
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
/* Photo area: strength only; masked off the text band so pool stays independent. */
|
|
1921
|
+
.home-hero-portrait::after {
|
|
1922
|
+
-webkit-mask-image: linear-gradient(180deg, #000 0%, #000 32%, transparent 46%);
|
|
1923
|
+
mask-image: linear-gradient(180deg, #000 0%, #000 32%, transparent 46%);
|
|
1894
1924
|
background:
|
|
1895
1925
|
radial-gradient(
|
|
1896
|
-
ellipse
|
|
1897
|
-
rgba(
|
|
1898
|
-
rgba(
|
|
1899
|
-
rgba(
|
|
1926
|
+
ellipse 80% 50% at 55% 26%,
|
|
1927
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.05 * var(--home-hero-vignette)))) 0%,
|
|
1928
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.16 * var(--home-hero-vignette)))) 50%,
|
|
1929
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.28 * var(--home-hero-vignette)))) 78%,
|
|
1930
|
+
transparent 100%
|
|
1900
1931
|
),
|
|
1901
1932
|
linear-gradient(
|
|
1902
1933
|
90deg,
|
|
1903
|
-
rgba(
|
|
1904
|
-
rgba(
|
|
1905
|
-
rgba(
|
|
1906
|
-
rgba(
|
|
1907
|
-
transparent
|
|
1934
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.30 * var(--home-hero-vignette)))) 0%,
|
|
1935
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.22 * var(--home-hero-vignette)))) 14%,
|
|
1936
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.12 * var(--home-hero-vignette)))) 34%,
|
|
1937
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.04 * var(--home-hero-vignette)))) 52%,
|
|
1938
|
+
transparent 70%
|
|
1908
1939
|
),
|
|
1909
1940
|
linear-gradient(
|
|
1910
1941
|
180deg,
|
|
1911
|
-
rgba(
|
|
1912
|
-
rgba(
|
|
1913
|
-
rgba(
|
|
1914
|
-
|
|
1915
|
-
rgba(0, 0, 0, calc(0.72 * var(--home-hero-vignette) / 0.6)) 68%,
|
|
1916
|
-
rgba(0, 0, 0, calc(0.82 * var(--home-hero-vignette) / 0.6)) 100%
|
|
1942
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.16 * var(--home-hero-vignette)))) 0%,
|
|
1943
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.07 * var(--home-hero-vignette)))) 12%,
|
|
1944
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.08 * var(--home-hero-vignette)))) 24%,
|
|
1945
|
+
transparent 48%
|
|
1917
1946
|
);
|
|
1918
1947
|
}
|
|
1919
1948
|
|
|
@@ -2002,27 +2031,36 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
2002
2031
|
filter: saturate(0.95) contrast(1.06) brightness(0.98);
|
|
2003
2032
|
}
|
|
2004
2033
|
|
|
2005
|
-
/* PLT-AC-100: stack
|
|
2034
|
+
/* PLT-AC-100…102: stack — ::after strength (upper); ::before pool (copy band) */
|
|
2035
|
+
.home-hero-portrait::before {
|
|
2036
|
+
background: linear-gradient(
|
|
2037
|
+
180deg,
|
|
2038
|
+
transparent 22%,
|
|
2039
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-pool-cap), calc(var(--home-hero-pool) * 0.45))) 34%,
|
|
2040
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-pool-cap), calc(var(--home-hero-pool) * 0.78))) 46%,
|
|
2041
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-pool-cap), var(--home-hero-pool))) 56%,
|
|
2042
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-pool-cap), var(--home-hero-pool))) 78%,
|
|
2043
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-pool-cap), calc(var(--home-hero-pool) * 0.92))) 100%
|
|
2044
|
+
);
|
|
2045
|
+
}
|
|
2006
2046
|
.home-hero-portrait::after {
|
|
2007
2047
|
border-radius: 0;
|
|
2048
|
+
-webkit-mask-image: linear-gradient(180deg, #000 0%, #000 28%, transparent 40%);
|
|
2049
|
+
mask-image: linear-gradient(180deg, #000 0%, #000 28%, transparent 40%);
|
|
2008
2050
|
background:
|
|
2009
2051
|
radial-gradient(
|
|
2010
|
-
ellipse
|
|
2011
|
-
rgba(
|
|
2012
|
-
rgba(
|
|
2013
|
-
rgba(
|
|
2052
|
+
ellipse 90% 42% at 50% 12%,
|
|
2053
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.06 * var(--home-hero-vignette)))) 0%,
|
|
2054
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.18 * var(--home-hero-vignette)))) 55%,
|
|
2055
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.28 * var(--home-hero-vignette)))) 80%,
|
|
2056
|
+
transparent 100%
|
|
2014
2057
|
),
|
|
2015
2058
|
linear-gradient(
|
|
2016
2059
|
180deg,
|
|
2017
|
-
rgba(
|
|
2018
|
-
rgba(
|
|
2019
|
-
rgba(
|
|
2020
|
-
|
|
2021
|
-
rgba(0, 0, 0, calc(0.62 * var(--home-hero-vignette) / 0.6)) 40%,
|
|
2022
|
-
rgba(0, 0, 0, calc(0.66 * var(--home-hero-vignette) / 0.6)) 52%,
|
|
2023
|
-
rgba(0, 0, 0, calc(0.58 * var(--home-hero-vignette) / 0.6)) 66%,
|
|
2024
|
-
rgba(0, 0, 0, calc(0.42 * var(--home-hero-vignette) / 0.6)) 82%,
|
|
2025
|
-
rgba(0, 0, 0, calc(0.28 * var(--home-hero-vignette) / 0.6)) 100%
|
|
2060
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.14 * var(--home-hero-vignette)))) 0%,
|
|
2061
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.10 * var(--home-hero-vignette)))) 8%,
|
|
2062
|
+
rgba(var(--home-hero-shade), min(var(--home-hero-strength-cap), calc(0.16 * var(--home-hero-vignette)))) 18%,
|
|
2063
|
+
transparent 34%
|
|
2026
2064
|
);
|
|
2027
2065
|
}
|
|
2028
2066
|
|
data/examples/full/_config.yml
CHANGED
|
@@ -20,8 +20,9 @@ pandorga:
|
|
|
20
20
|
hero_art: page/hero-default.html
|
|
21
21
|
# CR-22: centered spotlight overlay strength (0–1). See docs/features/home-hero-b3.md
|
|
22
22
|
hero_overlay:
|
|
23
|
-
vignette
|
|
24
|
-
|
|
23
|
+
# strength = photo-area (alias vignette); pool = absolute text-band alpha. Independent (PLT-AC-102).
|
|
24
|
+
strength: 0.60
|
|
25
|
+
pool: 0.70
|
|
25
26
|
fonts:
|
|
26
27
|
title: "Ancizar Serif"
|
|
27
28
|
body:
|
|
@@ -16,8 +16,9 @@ pandorga:
|
|
|
16
16
|
home:
|
|
17
17
|
hero_art: page/hero-default.html
|
|
18
18
|
hero_overlay:
|
|
19
|
-
vignette
|
|
20
|
-
|
|
19
|
+
# strength = photo-area (alias vignette); pool = absolute text-band alpha. Independent (PLT-AC-102).
|
|
20
|
+
strength: 0.60
|
|
21
|
+
pool: 0.70
|
|
21
22
|
taxonomies:
|
|
22
23
|
articles:
|
|
23
24
|
tags: [Writing, Design]
|
|
@@ -24,7 +24,7 @@ module Pandorga
|
|
|
24
24
|
|
|
25
25
|
gem "pandorga", "~> 2.0"
|
|
26
26
|
# Local checkout: gem "pandorga", path: "../pandorga"
|
|
27
|
-
# GitHub tag: gem "pandorga", github: "alexandrelheinen/pandorga", tag: "v2.3.
|
|
27
|
+
# GitHub tag: gem "pandorga", github: "alexandrelheinen/pandorga", tag: "v2.3.16"
|
|
28
28
|
gem "csv"
|
|
29
29
|
gem "base64"
|
|
30
30
|
RUBY
|
|
@@ -54,7 +54,7 @@ home:
|
|
|
54
54
|
notes: Optional stem or path fragment; when set, the home hydrator prefers that pool entry instead of a random draw (e.g. `DSC00571`). Omit for random selection each load.
|
|
55
55
|
hero_overlay:
|
|
56
56
|
type: map
|
|
57
|
-
notes: Optional `{ vignette, pool }` (0–1)
|
|
57
|
+
notes: Optional `{ strength, vignette, pool }` (0–1). `strength` (preferred) or legacy `vignette` → `--home-hero-vignette` (photo-area darkness, default 0.60). `pool` → `--home-hero-pool` absolute text-band alpha (default 0.70). Independent; CSS caps alphas < 1 (PLT-AC-102).
|
|
58
58
|
|
|
59
59
|
fonts:
|
|
60
60
|
title: "`pandorga.fonts`"
|
data/lib/pandorga/version.rb
CHANGED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# PLT-AC-102 — strength/pool independence, caps < 1, charcoal shade, no /0.6 overscale.
|
|
4
|
+
|
|
5
|
+
require "pathname"
|
|
6
|
+
|
|
7
|
+
ROOT = Pathname.new(__dir__).join("../..").expand_path
|
|
8
|
+
errors = []
|
|
9
|
+
|
|
10
|
+
css = ROOT.join("assets/css/ledger/home.css").read
|
|
11
|
+
|
|
12
|
+
unless css.include?("--home-hero-strength-cap")
|
|
13
|
+
errors << "home.css must define --home-hero-strength-cap (PLT-AC-102)"
|
|
14
|
+
end
|
|
15
|
+
unless css.include?("--home-hero-pool-cap")
|
|
16
|
+
errors << "home.css must define --home-hero-pool-cap (PLT-AC-102)"
|
|
17
|
+
end
|
|
18
|
+
unless css.include?("--home-hero-shade")
|
|
19
|
+
errors << "home.css must define charcoal --home-hero-shade (PLT-AC-102)"
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Caps must be strictly below 1 (dead-config: alpha never reaches pure black).
|
|
23
|
+
cap_s = css[/--home-hero-strength-cap:\s*([\d.]+)/, 1]
|
|
24
|
+
cap_p = css[/--home-hero-pool-cap:\s*([\d.]+)/, 1]
|
|
25
|
+
unless cap_s && cap_s.to_f > 0 && cap_s.to_f < 1
|
|
26
|
+
errors << "strength-cap must be in (0,1), got #{cap_s.inspect} (PLT-AC-102)"
|
|
27
|
+
end
|
|
28
|
+
unless cap_p && cap_p.to_f > 0 && cap_p.to_f < 1
|
|
29
|
+
errors << "pool-cap must be in (0,1), got #{cap_p.inspect} (PLT-AC-102)"
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Independence: pool only on ::before backgrounds; vignette only on ::after; mask on ::after.
|
|
33
|
+
pool_before = css.scan(/\.home-hero-portrait::before \{.*?^\}/m)
|
|
34
|
+
vig_after = css.scan(/\.home-hero-portrait::after \{.*?^\}/m)
|
|
35
|
+
# Prefer the rule bodies that actually paint gradients (skip the shared content/inset rule).
|
|
36
|
+
before_paint = pool_before.find { |c| c.include?("linear-gradient") && c.include?("--home-hero-pool") }
|
|
37
|
+
after_paint = vig_after.find { |c| c.include?("linear-gradient") && c.include?("--home-hero-vignette") }
|
|
38
|
+
unless before_paint
|
|
39
|
+
errors << "::before must use --home-hero-pool (absolute text-band alpha) (PLT-AC-102)"
|
|
40
|
+
end
|
|
41
|
+
if before_paint&.include?("var(--home-hero-vignette)")
|
|
42
|
+
errors << "::before must not scale with --home-hero-vignette (independence) (PLT-AC-102)"
|
|
43
|
+
end
|
|
44
|
+
unless after_paint
|
|
45
|
+
errors << "::after must use --home-hero-vignette (strength) (PLT-AC-102)"
|
|
46
|
+
end
|
|
47
|
+
if after_paint&.include?("var(--home-hero-pool)")
|
|
48
|
+
errors << "::after must not use --home-hero-pool (independence) (PLT-AC-102)"
|
|
49
|
+
end
|
|
50
|
+
unless css.match?(/\.home-hero-portrait::after[\s\S]*?mask-image:\s*linear-gradient/)
|
|
51
|
+
errors << "::after must mask off the text band (PLT-AC-102)"
|
|
52
|
+
end
|
|
53
|
+
# Stack media also keeps the split (comment marker from home.css)
|
|
54
|
+
unless css.include?("PLT-AC-100…102: stack") && css.include?("var(--home-hero-pool)") && css.include?("var(--home-hero-vignette)")
|
|
55
|
+
errors << "stack overlay marker + pool/strength vars required (PLT-AC-102)"
|
|
56
|
+
end
|
|
57
|
+
# At least two pool ::before paints (desk + stack) and two strength ::after paints
|
|
58
|
+
pool_paints = css.scan(/--home-hero-pool\)/).length
|
|
59
|
+
vig_paints = css.scan(/--home-hero-vignette\)/).length
|
|
60
|
+
if pool_paints < 4
|
|
61
|
+
errors << "expected multiple pool stops (desk+stack), got #{pool_paints} (PLT-AC-102)"
|
|
62
|
+
end
|
|
63
|
+
if vig_paints < 4
|
|
64
|
+
errors << "expected multiple strength stops (desk+stack), got #{vig_paints} (PLT-AC-102)"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Every stop clamped
|
|
68
|
+
unless css.include?("min(var(--home-hero-strength-cap)")
|
|
69
|
+
errors << "strength stops must use min(strength-cap, …) (PLT-AC-102)"
|
|
70
|
+
end
|
|
71
|
+
unless css.include?("min(var(--home-hero-pool-cap)")
|
|
72
|
+
errors << "pool stops must use min(pool-cap, …) (PLT-AC-102)"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# No historic overscale that pushed alpha > 1
|
|
76
|
+
if css.match?(%r{var\(--home-hero-vignette\)\s*/\s*0\.6})
|
|
77
|
+
errors << "home.css must not use vignette/0.6 overscale (PLT-AC-102)"
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Shade is not pure black RGB(0,0,0)
|
|
81
|
+
shade = css[/--home-hero-shade:\s*([^;]+);/, 1].to_s.strip
|
|
82
|
+
parts = shade.split(",").map { |x| x.strip.to_i }
|
|
83
|
+
if parts.length != 3 || parts.all?(&:zero?)
|
|
84
|
+
errors << "--home-hero-shade must be non-zero charcoal RGB, got #{shade.inspect} (PLT-AC-102)"
|
|
85
|
+
end
|
|
86
|
+
unless css.include?("rgba(var(--home-hero-shade)")
|
|
87
|
+
errors << "overlay stops must paint with rgba(var(--home-hero-shade), …) (PLT-AC-102)"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Layout still emits both vars
|
|
91
|
+
home_layout = ROOT.join("_layouts/home.html").read
|
|
92
|
+
unless home_layout.include?("--home-hero-pool:")
|
|
93
|
+
errors << "home.html must emit --home-hero-pool (PLT-AC-102)"
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Docs + schema mention independence / caps
|
|
97
|
+
docs = ROOT.join("docs/features/home-hero-scale-overlay.md").read
|
|
98
|
+
unless docs.include?("PLT-AC-102")
|
|
99
|
+
errors << "docs/features/home-hero-scale-overlay.md must document PLT-AC-102"
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
schema = ROOT.join("lib/pandorga/registry/schema.yml").read
|
|
103
|
+
unless schema.include?("strength") && schema.include?("pool")
|
|
104
|
+
errors << "schema hero_overlay must document strength and pool"
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if errors.empty?
|
|
108
|
+
puts "OK home-hero-overlay-split (PLT-AC-102)"
|
|
109
|
+
else
|
|
110
|
+
warn "FAIL test-home-hero-overlay-split:\n#{errors.join("\n")}"
|
|
111
|
+
exit 1
|
|
112
|
+
end
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# PLT-AC-101 — pandorga.home.hero_overlay.strength reaches --home-hero-vignette on home.
|
|
4
|
+
|
|
5
|
+
require "fileutils"
|
|
6
|
+
require "open3"
|
|
7
|
+
require "pathname"
|
|
8
|
+
require "yaml"
|
|
9
|
+
|
|
10
|
+
ROOT = Pathname.new(__dir__).join("../..").expand_path
|
|
11
|
+
EXE = ROOT.join("exe/pandorga")
|
|
12
|
+
errors = []
|
|
13
|
+
|
|
14
|
+
home_layout = ROOT.join("_layouts/home.html").read
|
|
15
|
+
unless home_layout.include?("_hero_overlay.strength") && home_layout.include?("--home-hero-vignette:")
|
|
16
|
+
errors << "home.html must emit --home-hero-vignette from hero_overlay.strength (PLT-AC-101)"
|
|
17
|
+
end
|
|
18
|
+
unless home_layout.include?("default: _hero_overlay.vignette")
|
|
19
|
+
errors << "home.html must fall back to hero_overlay.vignette (PLT-AC-101)"
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
css = ROOT.join("assets/css/ledger/home.css").read
|
|
23
|
+
unless css.include?("var(--home-hero-vignette)")
|
|
24
|
+
errors << "home.css must scale overlay with --home-hero-vignette (PLT-AC-101)"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
%w[minimal full].each do |name|
|
|
28
|
+
cfg = ROOT.join("examples", name, "_config.yml").read
|
|
29
|
+
unless cfg.match?(/hero_overlay:[\s\S]*?strength:\s*[\d.]+/)
|
|
30
|
+
errors << "examples/#{name} must document hero_overlay.strength (PLT-AC-101)"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def run_cmd(*cmd, chdir:, env: {})
|
|
35
|
+
base = {
|
|
36
|
+
"RUBYOPT" => "-I#{ROOT.join('lib')}",
|
|
37
|
+
"PANDORGA_SITE_ROOT" => chdir.to_s,
|
|
38
|
+
"CONTENT_API_BASE_URL" => "",
|
|
39
|
+
"CONTENT_EXPORT_SKIP_VALIDATE" => "1",
|
|
40
|
+
"JEKYLL_ENV" => "production"
|
|
41
|
+
}
|
|
42
|
+
Open3.capture3(base.merge(env), *cmd, chdir: chdir.to_s)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
example = ROOT.join("examples/minimal")
|
|
46
|
+
site_cfg = YAML.safe_load(example.join("_config.yml").read)
|
|
47
|
+
site_cfg["pandorga"] ||= {}
|
|
48
|
+
site_cfg["pandorga"]["home"] ||= {}
|
|
49
|
+
site_cfg["pandorga"]["home"]["hero_overlay"] = { "strength" => 0.82, "pool" => 0.94 }
|
|
50
|
+
|
|
51
|
+
# Mutate example config briefly, build, assert, restore — same pattern as other example gates.
|
|
52
|
+
cfg_path = example.join("_config.yml")
|
|
53
|
+
original = cfg_path.read
|
|
54
|
+
begin
|
|
55
|
+
cfg_path.write(YAML.dump(site_cfg))
|
|
56
|
+
FileUtils.rm_rf(example.join("_site"))
|
|
57
|
+
FileUtils.rm_rf(example.join("_content_json"))
|
|
58
|
+
|
|
59
|
+
if example.join("Gemfile").file?
|
|
60
|
+
_o, err, st = run_cmd("bundle", "install", "--quiet", chdir: example)
|
|
61
|
+
unless st.success?
|
|
62
|
+
errors << "bundle install failed: #{err[0, 400]}"
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
if errors.empty?
|
|
67
|
+
_o, err, st = run_cmd("ruby", EXE.to_s, "export", "content", "_content_json", chdir: example)
|
|
68
|
+
unless st.success?
|
|
69
|
+
errors << "pandorga export failed: #{err[0, 400]}"
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if errors.empty?
|
|
74
|
+
_o, err, st = run_cmd("bundle", "exec", "jekyll", "build", "--quiet", chdir: example)
|
|
75
|
+
unless st.success?
|
|
76
|
+
errors << "jekyll build failed: #{err[0, 400]}"
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if errors.empty?
|
|
81
|
+
index = example.join("_site/index.html")
|
|
82
|
+
html = index.file? ? index.read : ""
|
|
83
|
+
unless html.match?(/--home-hero-vignette:\s*0\.82/)
|
|
84
|
+
style = html[/<style>.*?<\/style>/m].to_s[0, 400]
|
|
85
|
+
errors << "built home must emit --home-hero-vignette: 0.82 from config strength (PLT-AC-101); style=#{style.inspect}"
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
ensure
|
|
89
|
+
cfg_path.write(original)
|
|
90
|
+
FileUtils.rm_rf(example.join("_site"))
|
|
91
|
+
FileUtils.rm_rf(example.join("_content_json"))
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if errors.empty?
|
|
95
|
+
puts "OK home-hero-overlay-strength (PLT-AC-101)"
|
|
96
|
+
else
|
|
97
|
+
warn "FAIL test-home-hero-overlay-strength:\n#{errors.join("\n")}"
|
|
98
|
+
exit 1
|
|
99
|
+
end
|
data/scripts/validate.sh
CHANGED
|
@@ -81,6 +81,8 @@ TESTS=(
|
|
|
81
81
|
scripts/test/test-home-article-cards.rb
|
|
82
82
|
scripts/test/test-home-hero-c4.rb
|
|
83
83
|
scripts/test/test-home-hero-scale.rb
|
|
84
|
+
scripts/test/test-home-hero-overlay-strength.rb
|
|
85
|
+
scripts/test/test-home-hero-overlay-split.rb
|
|
84
86
|
scripts/test/test-detail-action-icons.rb
|
|
85
87
|
scripts/test/test-parallel-content-publish.rb
|
|
86
88
|
scripts/test/test-mobile-density-home-measure.rb
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pandorga
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- The Pandorga contributors
|
|
@@ -445,6 +445,8 @@ files:
|
|
|
445
445
|
- scripts/test/test-home-band-art.rb
|
|
446
446
|
- scripts/test/test-home-band-intro.rb
|
|
447
447
|
- scripts/test/test-home-hero-c4.rb
|
|
448
|
+
- scripts/test/test-home-hero-overlay-split.rb
|
|
449
|
+
- scripts/test/test-home-hero-overlay-strength.rb
|
|
448
450
|
- scripts/test/test-home-hero-scale.rb
|
|
449
451
|
- scripts/test/test-home-lists.rb
|
|
450
452
|
- scripts/test/test-hydrate-reserve.rb
|