pandorga 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/assets/css/ledger/home.css +75 -37
- data/lib/pandorga/commands/new.rb +1 -1
- data/lib/pandorga/version.rb +1 -1
- data/scripts/test/test-css-structure.rb +6 -2
- data/scripts/test/test-hero-16x9.rb +3 -3
- data/scripts/test/test-hero-name.rb +5 -1
- data/scripts/test/test-regression-gate.mjs +64 -13
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 033b25b962720ad3de24da118ed243bf1766ae1f33e79f67b79e4b2472427171
|
|
4
|
+
data.tar.gz: '0081cf9f03ea89cb1b243fd4513528bed8dd97fe9463020fe55a53e4a35bb345'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d1fc6869ebf3b6273c8d60231a15e025166fa44a6b4f53992b2ba1c10bd877fcb453a370a70054e2809f345d5548340622216cc65835474f0cbc53e6edd1598f
|
|
7
|
+
data.tar.gz: 6ff96c087c8f99bf6be86d98ac8956dac4e9d8764b391539eafb087c1023e480dfb9b1132924c8951b8301da6276b4f3a3dbc4d3f52904c3d7d220a922522aff
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [2.3.2] — 2026-10-29
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- CR-22.2: Home hero B3 pixel parity — masthead content width `1337.625px` with stage `padding-block` so hero/projects top aligns with approved mocks; title `margin-bottom: 1rem` and actions `margin-top: 1.5rem` restore B3 name/summary/button positions; stack hero bottom padding +5px; desk copy bottom pad +2.25px. Key measures (hero x/y/w/h, nameFs, name/summary/actions tops, projects left, topSpace) within ~2px of `measures-b3.json` at 390/768/1024/1440.
|
|
10
|
+
|
|
11
|
+
## [2.3.1] — 2026-10-29
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- CR-22.1: Home hero name uses approved B3 clamps (~35px@1024 / ~40px@1440 / stack clamp) and must fit inside the panel (PLT-AC-86); summary/tagline forced light on the photo (specificity over legend); desktop hero panel uses B3 aspect ratios 454/736 and 637/693 (PLT-AC-87); featured home posters keep 16:9 instead of stretching to content height; stronger bottom scrim for stack legibility.
|
|
16
|
+
|
|
5
17
|
## [2.3.0] — 2026-10-29
|
|
6
18
|
|
|
7
19
|
### Added
|
data/assets/css/ledger/home.css
CHANGED
|
@@ -1716,12 +1716,15 @@ button.home-project-inventory-row {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
|
|
1718
1718
|
/* ── Featured article poster ──
|
|
1719
|
-
|
|
1719
|
+
Plate is always 16:9; cover crops the photo inside (PLT-AC-85 companion). */
|
|
1720
1720
|
.home-featured .ledger-poster {
|
|
1721
|
-
|
|
1722
|
-
|
|
1721
|
+
width: 100%;
|
|
1722
|
+
height: auto;
|
|
1723
|
+
aspect-ratio: 16 / 9;
|
|
1724
|
+
min-height: 0;
|
|
1723
1725
|
border: 1.5px solid var(--border-ink);
|
|
1724
1726
|
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-on-surface) 10%, transparent);
|
|
1727
|
+
overflow: hidden;
|
|
1725
1728
|
}
|
|
1726
1729
|
|
|
1727
1730
|
:root:not([data-theme="dark"]) .home-featured .ledger-poster,
|
|
@@ -1748,7 +1751,9 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
1748
1751
|
|
|
1749
1752
|
.home-featured .ledger-poster {
|
|
1750
1753
|
order: 2;
|
|
1751
|
-
|
|
1754
|
+
width: 100%;
|
|
1755
|
+
height: auto;
|
|
1756
|
+
aspect-ratio: 16 / 9;
|
|
1752
1757
|
}
|
|
1753
1758
|
}
|
|
1754
1759
|
|
|
@@ -1835,9 +1840,10 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
1835
1840
|
}
|
|
1836
1841
|
|
|
1837
1842
|
/* ═══════════════════════════════════════════════════════════════════════════
|
|
1838
|
-
CR-22 — Home hero B3 (PLT-AC-81…
|
|
1843
|
+
CR-22 / CR-22.2 — Home hero B3 pixel parity (PLT-AC-81…87)
|
|
1839
1844
|
Photo as hero background + 50/50 masthead with Projects from 1024px.
|
|
1840
|
-
|
|
1845
|
+
Name/summary/actions/spacing match approved B3 measures within ~2px;
|
|
1846
|
+
masthead width 1337.625px; crops centered; home plates 16:9.
|
|
1841
1847
|
Config: --home-hero-vignette, --home-hero-pool (see pandorga.home.hero_overlay).
|
|
1842
1848
|
═══════════════════════════════════════════════════════════════════════════ */
|
|
1843
1849
|
|
|
@@ -1847,7 +1853,7 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
1847
1853
|
--home-masthead-gutter: clamp(1.25rem, 2.2vw, 2rem);
|
|
1848
1854
|
}
|
|
1849
1855
|
|
|
1850
|
-
/* Shared: centered crop on home specimen/card plates (hero
|
|
1856
|
+
/* Shared: centered crop on home specimen/card plates (hero centers in CR-22 media). */
|
|
1851
1857
|
.home-specimen-figure > .ledger-poster img,
|
|
1852
1858
|
.home-specimen-figure > .ledger-poster video,
|
|
1853
1859
|
.home-card-grid .ledger-poster img,
|
|
@@ -1876,15 +1882,15 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
1876
1882
|
90deg,
|
|
1877
1883
|
rgba(0, 0, 0, calc(0.55 * var(--home-hero-vignette) / 0.6)) 0%,
|
|
1878
1884
|
rgba(0, 0, 0, calc(0.28 * var(--home-hero-vignette) / 0.6)) 28%,
|
|
1879
|
-
rgba(0, 0, 0, calc(0.10 * var(--home-hero-vignette) / 0.6))
|
|
1885
|
+
rgba(0, 0, 0, calc(0.10 * var(--home-hero-vignette) / 0.6)) 55%,
|
|
1880
1886
|
transparent 76%
|
|
1881
1887
|
),
|
|
1882
1888
|
linear-gradient(
|
|
1883
1889
|
180deg,
|
|
1884
1890
|
rgba(0, 0, 0, calc(0.18 * var(--home-hero-vignette) / 0.6)) 0%,
|
|
1885
1891
|
transparent 22%,
|
|
1886
|
-
transparent
|
|
1887
|
-
rgba(0, 0, 0, calc(0.
|
|
1892
|
+
transparent 48%,
|
|
1893
|
+
rgba(0, 0, 0, calc(0.62 * var(--home-hero-vignette) / 0.6)) 100%
|
|
1888
1894
|
);
|
|
1889
1895
|
}
|
|
1890
1896
|
|
|
@@ -1913,12 +1919,17 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
1913
1919
|
}
|
|
1914
1920
|
|
|
1915
1921
|
.home-hero {
|
|
1916
|
-
display:
|
|
1922
|
+
display: flex;
|
|
1923
|
+
flex-direction: column;
|
|
1917
1924
|
position: relative;
|
|
1918
1925
|
isolation: isolate;
|
|
1919
1926
|
min-height: 0;
|
|
1920
1927
|
height: auto;
|
|
1921
1928
|
gap: 0;
|
|
1929
|
+
justify-content: flex-end;
|
|
1930
|
+
align-items: stretch;
|
|
1931
|
+
padding: clamp(1.35rem, 4.5vw, 2.1rem) clamp(1.15rem, 5vw, 2rem) calc(clamp(1.5rem, 4.5vw, 2.1rem) + 5px);
|
|
1932
|
+
box-sizing: border-box;
|
|
1922
1933
|
}
|
|
1923
1934
|
|
|
1924
1935
|
.home-hero-portrait {
|
|
@@ -1969,17 +1980,23 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
1969
1980
|
flex-direction: column;
|
|
1970
1981
|
justify-content: flex-end;
|
|
1971
1982
|
gap: 0.85rem;
|
|
1972
|
-
padding:
|
|
1983
|
+
padding: 0;
|
|
1973
1984
|
max-width: 36rem;
|
|
1974
1985
|
width: 100%;
|
|
1975
1986
|
box-sizing: border-box;
|
|
1976
1987
|
background: transparent;
|
|
1977
1988
|
}
|
|
1978
1989
|
|
|
1990
|
+
/* B3 stack name (~33.4px @390, ~45.8px @768) */
|
|
1991
|
+
.home-ledger .home-hero-title,
|
|
1979
1992
|
.home-hero-title {
|
|
1993
|
+
white-space: normal;
|
|
1994
|
+
font-size: clamp(1.9rem, 7vw, 2.6rem);
|
|
1995
|
+
line-height: 1.08;
|
|
1996
|
+
max-width: 100%;
|
|
1980
1997
|
color: #f4f4f4;
|
|
1981
1998
|
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
|
|
1982
|
-
margin-bottom:
|
|
1999
|
+
margin-bottom: 1rem;
|
|
1983
2000
|
}
|
|
1984
2001
|
|
|
1985
2002
|
.home-hero-given {
|
|
@@ -1998,11 +2015,15 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
1998
2015
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
1999
2016
|
}
|
|
2000
2017
|
|
|
2001
|
-
.home-hero-summary
|
|
2002
|
-
.home-hero-
|
|
2018
|
+
/* Specificity beats .home-hero .home-hero-summary { color: legend } */
|
|
2019
|
+
.home-hero .home-hero-summary,
|
|
2020
|
+
.home-hero .home-hero-summary p,
|
|
2021
|
+
.home-hero .home-hero-tagline {
|
|
2003
2022
|
color: #f0f0f0;
|
|
2004
2023
|
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
|
|
2005
|
-
max-width: 100
|
|
2024
|
+
max-width: min(34rem, 100%);
|
|
2025
|
+
font-size: clamp(0.95rem, 3.6vw, 1.05rem);
|
|
2026
|
+
line-height: 1.45;
|
|
2006
2027
|
}
|
|
2007
2028
|
|
|
2008
2029
|
.home-hero-tagline {
|
|
@@ -2014,7 +2035,9 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
2014
2035
|
}
|
|
2015
2036
|
|
|
2016
2037
|
.home-hero-actions {
|
|
2017
|
-
margin-top:
|
|
2038
|
+
margin-top: 1.5rem;
|
|
2039
|
+
flex-wrap: wrap;
|
|
2040
|
+
gap: 0.4rem 0.55rem;
|
|
2018
2041
|
}
|
|
2019
2042
|
|
|
2020
2043
|
.home-hero-actions .ledger-cta,
|
|
@@ -2037,10 +2060,12 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
2037
2060
|
display: grid;
|
|
2038
2061
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
2039
2062
|
column-gap: 0;
|
|
2040
|
-
align-items:
|
|
2041
|
-
width
|
|
2042
|
-
|
|
2063
|
+
align-items: start;
|
|
2064
|
+
/* B3 masthead content width (not rem — rem is fluid on this site) */
|
|
2065
|
+
width: min(1337.625px, calc(100% - 2 * var(--gutter, 2rem)));
|
|
2066
|
+
max-width: 1337.625px;
|
|
2043
2067
|
margin-inline: auto;
|
|
2068
|
+
padding-block: 1.25rem 1.75rem;
|
|
2044
2069
|
box-sizing: border-box;
|
|
2045
2070
|
}
|
|
2046
2071
|
|
|
@@ -2056,9 +2081,11 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
2056
2081
|
background: #050505;
|
|
2057
2082
|
border-radius: 3px;
|
|
2058
2083
|
overflow: hidden;
|
|
2059
|
-
align-self:
|
|
2060
|
-
|
|
2084
|
+
align-self: start;
|
|
2085
|
+
/* B3 @1024 ≈ 454×736 (w/h ≈ 0.617) */
|
|
2086
|
+
aspect-ratio: 454 / 736;
|
|
2061
2087
|
height: auto;
|
|
2088
|
+
min-height: 0;
|
|
2062
2089
|
}
|
|
2063
2090
|
|
|
2064
2091
|
.home-band--hero .home-hero-art,
|
|
@@ -2080,10 +2107,10 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
2080
2107
|
justify-self: stretch;
|
|
2081
2108
|
width: 100%;
|
|
2082
2109
|
margin: 0;
|
|
2083
|
-
padding-block:
|
|
2110
|
+
padding-block: 0;
|
|
2084
2111
|
padding-inline: 0;
|
|
2085
2112
|
border-bottom: 0;
|
|
2086
|
-
align-self:
|
|
2113
|
+
align-self: start;
|
|
2087
2114
|
}
|
|
2088
2115
|
|
|
2089
2116
|
.home-band[data-home-kind="portfolio"] .home-band-inner {
|
|
@@ -2093,21 +2120,20 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
2093
2120
|
padding-inline: 0;
|
|
2094
2121
|
}
|
|
2095
2122
|
|
|
2096
|
-
/* Remaining bands span the full masthead width */
|
|
2097
2123
|
.home-band:not(.home-band--hero):not([data-home-kind="portfolio"]) {
|
|
2098
2124
|
grid-column: 1 / -1;
|
|
2099
2125
|
}
|
|
2100
2126
|
|
|
2101
|
-
/* Override prior 1024 copy|portrait flex — photo is the panel background */
|
|
2102
2127
|
.home-hero {
|
|
2103
2128
|
display: flex;
|
|
2104
2129
|
flex-direction: column;
|
|
2105
2130
|
position: relative;
|
|
2106
2131
|
isolation: isolate;
|
|
2107
|
-
min-height:
|
|
2132
|
+
min-height: 100%;
|
|
2108
2133
|
height: 100%;
|
|
2109
2134
|
gap: 0;
|
|
2110
2135
|
align-items: stretch;
|
|
2136
|
+
justify-content: flex-end;
|
|
2111
2137
|
}
|
|
2112
2138
|
|
|
2113
2139
|
.home-hero-portrait {
|
|
@@ -2157,7 +2183,7 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
2157
2183
|
.home-hero-copy {
|
|
2158
2184
|
position: relative;
|
|
2159
2185
|
z-index: 3;
|
|
2160
|
-
flex:
|
|
2186
|
+
flex: 0 0 auto;
|
|
2161
2187
|
display: flex;
|
|
2162
2188
|
flex-direction: column;
|
|
2163
2189
|
justify-content: flex-end;
|
|
@@ -2165,19 +2191,22 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
2165
2191
|
width: 100%;
|
|
2166
2192
|
max-width: 100%;
|
|
2167
2193
|
min-width: 0;
|
|
2168
|
-
|
|
2169
|
-
padding: 1.75rem 1.35rem 1.85rem 1.45rem;
|
|
2194
|
+
padding: 1.75rem 1.35rem calc(1.85rem + 2.25px) 1.45rem;
|
|
2170
2195
|
box-sizing: border-box;
|
|
2171
2196
|
background: transparent;
|
|
2172
2197
|
}
|
|
2173
2198
|
|
|
2174
|
-
/*
|
|
2175
|
-
.home-ledger .home-hero-title
|
|
2199
|
+
/* B3 desk name (~35.2px @1024, ~40.1px @1440) */
|
|
2200
|
+
.home-ledger .home-hero-title,
|
|
2201
|
+
.home-hero-title {
|
|
2176
2202
|
white-space: nowrap;
|
|
2177
|
-
font-size: calc(
|
|
2203
|
+
font-size: calc(clamp(1.85rem, 2.6vw, 2.55rem) + 2pt);
|
|
2204
|
+
line-height: 1.08;
|
|
2205
|
+
max-width: 100%;
|
|
2206
|
+
overflow: hidden;
|
|
2178
2207
|
color: #f4f4f4;
|
|
2179
2208
|
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
|
|
2180
|
-
margin-bottom:
|
|
2209
|
+
margin-bottom: 1rem;
|
|
2181
2210
|
}
|
|
2182
2211
|
|
|
2183
2212
|
.home-hero-given {
|
|
@@ -2196,11 +2225,14 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
2196
2225
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
2197
2226
|
}
|
|
2198
2227
|
|
|
2199
|
-
.home-hero-summary,
|
|
2200
|
-
.home-hero-
|
|
2228
|
+
.home-hero .home-hero-summary,
|
|
2229
|
+
.home-hero .home-hero-summary p,
|
|
2230
|
+
.home-hero .home-hero-tagline {
|
|
2201
2231
|
color: #f0f0f0;
|
|
2202
2232
|
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
|
|
2203
2233
|
max-width: 100%;
|
|
2234
|
+
font-size: clamp(0.95rem, 1.15vw, 1.05rem);
|
|
2235
|
+
line-height: 1.45;
|
|
2204
2236
|
}
|
|
2205
2237
|
|
|
2206
2238
|
.home-hero-tagline::after {
|
|
@@ -2211,7 +2243,7 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
2211
2243
|
display: flex;
|
|
2212
2244
|
flex-wrap: nowrap;
|
|
2213
2245
|
gap: 0.4rem 0.5rem;
|
|
2214
|
-
margin-top:
|
|
2246
|
+
margin-top: 1.5rem;
|
|
2215
2247
|
width: 100%;
|
|
2216
2248
|
}
|
|
2217
2249
|
|
|
@@ -2230,5 +2262,11 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
2230
2262
|
.home-hero-actions .material-symbols-outlined {
|
|
2231
2263
|
color: #111;
|
|
2232
2264
|
}
|
|
2265
|
+
}
|
|
2233
2266
|
|
|
2267
|
+
/* Wider desktop: B3 @1440 ≈ 637×693 (w/h ≈ 0.92) */
|
|
2268
|
+
@media (min-width: 1280px) {
|
|
2269
|
+
.home-band--hero {
|
|
2270
|
+
aspect-ratio: 637 / 693;
|
|
2271
|
+
}
|
|
2234
2272
|
}
|
|
@@ -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.2"
|
|
28
28
|
gem "csv"
|
|
29
29
|
gem "base64"
|
|
30
30
|
RUBY
|
data/lib/pandorga/version.rb
CHANGED
|
@@ -302,8 +302,12 @@ end
|
|
|
302
302
|
if home_sheet.match?(/Cinzel/i) || home_sheet.include?("5.55")
|
|
303
303
|
errors << "assets/css/ledger/home.css must not contain Cinzel or obsolete 5.55 comments/divisors (PLT-AC-68)"
|
|
304
304
|
end
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
# Phone/base keep Ancizar 6.9; desktop CR-22.1 uses the approved B3 vw clamp.
|
|
306
|
+
unless home_sheet.include?("calc(100cqi * 0.92 / 6.9)")
|
|
307
|
+
errors << "assets/css/ledger/home.css: phone/base hero clamp must use Ancizar ~6.9 (PLT-AC-68)"
|
|
308
|
+
end
|
|
309
|
+
unless home_sheet.include?("calc(clamp(1.85rem, 2.6vw, 2.55rem) + 2pt)")
|
|
310
|
+
errors << "assets/css/ledger/home.css: desktop B3 name clamp missing (CR-22.1 / PLT-AC-86)"
|
|
307
311
|
end
|
|
308
312
|
|
|
309
313
|
# PLT-AC-69. Inventory / project logo icon font-sizes +2pt.
|
|
@@ -221,11 +221,11 @@ end
|
|
|
221
221
|
# ── 51.6 Name from 1024px ───────────────────────────────────────────────────
|
|
222
222
|
|
|
223
223
|
item(6) do
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
# CR-22.1: B3 desk name clamp (also declared on .home-hero-title)
|
|
225
|
+
title = ".home-hero-title"
|
|
226
226
|
expect_decl(title, "white-space", "nowrap", media: DESKTOP)
|
|
227
227
|
expect_decl(title, "font-size",
|
|
228
|
-
"calc(
|
|
228
|
+
"calc(clamp(1.85rem, 2.6vw, 2.55rem) + 2pt)",
|
|
229
229
|
media: DESKTOP)
|
|
230
230
|
end
|
|
231
231
|
|
|
@@ -145,7 +145,11 @@ check!(hero.include?("@media (min-width: 640px) and (max-width: 767px)"),
|
|
|
145
145
|
"missing 640-767 size query")
|
|
146
146
|
check!(hero.include?("calc(clamp(var(--type-section-lg), calc(100cqi * 0.92 / 6.9), var(--type-page-lg)) + 3pt)"),
|
|
147
147
|
"from 640px to 767px the name must be the section-lg clamp plus 3pt")
|
|
148
|
-
|
|
148
|
+
# CR-22.1 supersedes desktop --hero-name-fit 6.9 with the approved B3 clamp.
|
|
149
|
+
check!(css.include?("calc(clamp(1.85rem, 2.6vw, 2.55rem) + 2pt)"),
|
|
150
|
+
"desktop B3 name clamp must be present (CR-22.1)")
|
|
151
|
+
check!(css.include?("clamp(1.9rem, 7vw, 2.6rem)"),
|
|
152
|
+
"stack B3 name clamp must be present (CR-22.1)")
|
|
149
153
|
|
|
150
154
|
plain = hero.index("@media (min-width: 640px) {")
|
|
151
155
|
banded = hero.index("@media (min-width: 640px) and (max-width: 767px)")
|
|
@@ -512,13 +512,28 @@ const ASSERT_EXPRESSION = `
|
|
|
512
512
|
}
|
|
513
513
|
|
|
514
514
|
|
|
515
|
-
// CR-22 / PLT-AC-81…
|
|
515
|
+
// CR-22 / CR-22.1 / PLT-AC-81…87: B3 masthead, photo-bg, name fit, contrast, 16:9 plates
|
|
516
516
|
{
|
|
517
517
|
const hero = document.querySelector('.home-band--hero');
|
|
518
518
|
const proj = document.querySelector('.home-band[data-home-kind="portfolio"]');
|
|
519
519
|
const title = document.querySelector('.home-hero-title');
|
|
520
520
|
const actions = document.querySelector('.home-hero-actions');
|
|
521
521
|
const plateImg = document.querySelector('.home-hero-plate img');
|
|
522
|
+
const summary = document.querySelector('.home-hero-summary') || document.querySelector('.home-hero-summary p');
|
|
523
|
+
|
|
524
|
+
function parseRgb(c) {
|
|
525
|
+
if (!c) return null;
|
|
526
|
+
const m = String(c).match(/rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i);
|
|
527
|
+
if (!m) return null;
|
|
528
|
+
return { r: +m[1], g: +m[2], b: +m[3] };
|
|
529
|
+
}
|
|
530
|
+
function relLum({ r, g, b }) {
|
|
531
|
+
const f = (v) => {
|
|
532
|
+
v /= 255;
|
|
533
|
+
return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);
|
|
534
|
+
};
|
|
535
|
+
return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);
|
|
536
|
+
}
|
|
522
537
|
|
|
523
538
|
if (hero && proj && window.innerWidth >= 1024) {
|
|
524
539
|
const ledger = document.querySelector('.home-ledger');
|
|
@@ -530,21 +545,16 @@ const ASSERT_EXPRESSION = `
|
|
|
530
545
|
if (delta > 1) {
|
|
531
546
|
errors.push('Projects left (' + pb.left.toFixed(1) + ') not within 1px of content mid (' + mid.toFixed(1) + ') Δ=' + delta.toFixed(1) + ' (PLT-AC-81)');
|
|
532
547
|
}
|
|
533
|
-
// Hero should occupy left half minus gutter (not wider than mid)
|
|
534
548
|
if (hb.right > mid + 1) {
|
|
535
549
|
errors.push('Hero right (' + hb.right.toFixed(1) + ') crosses content mid (' + mid.toFixed(1) + ') (PLT-AC-81)');
|
|
536
550
|
}
|
|
537
|
-
// Buttons on one line
|
|
538
551
|
if (actions) {
|
|
539
|
-
const tops = new Set([...actions.querySelectorAll('.ledger-cta, .home-hero-cta, a')].map(el => Math.round(el.getBoundingClientRect().top)));
|
|
540
|
-
// contacts slot may inject extra anchors — count visible CTA tops from direct actionable children
|
|
541
552
|
const ctas = [...actions.querySelectorAll(':scope > .ledger-cta, :scope > .home-hero-cta, :scope > span > .ledger-cta, :scope > span > a')];
|
|
542
553
|
const ctaTops = new Set(ctas.filter(el => el.getBoundingClientRect().width > 4).map(el => Math.round(el.getBoundingClientRect().top)));
|
|
543
554
|
if (ctaTops.size > 1) {
|
|
544
555
|
errors.push('Hero CTAs wrap to ' + ctaTops.size + ' rows at desktop; expected one line (PLT-AC-82)');
|
|
545
556
|
}
|
|
546
557
|
}
|
|
547
|
-
// Portrait is background (absolute covering hero)
|
|
548
558
|
const portrait = document.querySelector('.home-hero-portrait');
|
|
549
559
|
if (portrait) {
|
|
550
560
|
const pcs = getComputedStyle(portrait);
|
|
@@ -552,6 +562,28 @@ const ASSERT_EXPRESSION = `
|
|
|
552
562
|
errors.push('Hero portrait position is ' + pcs.position + ', expected absolute background (PLT-AC-82)');
|
|
553
563
|
}
|
|
554
564
|
}
|
|
565
|
+
|
|
566
|
+
// PLT-AC-86: name fits in panel; size near B3 (±4px)
|
|
567
|
+
if (title && hb.width > 40) {
|
|
568
|
+
const tr = title.getBoundingClientRect();
|
|
569
|
+
if (tr.right > hb.right + 1) {
|
|
570
|
+
errors.push('Hero name right (' + tr.right.toFixed(1) + ') past panel right (' + hb.right.toFixed(1) + ') (PLT-AC-86)');
|
|
571
|
+
}
|
|
572
|
+
const fs = parseFloat(getComputedStyle(title).fontSize);
|
|
573
|
+
const expect = window.innerWidth >= 1280 ? 40.11 : 35.23;
|
|
574
|
+
if (Math.abs(fs - expect) > 4) {
|
|
575
|
+
errors.push('Hero name font-size ' + fs.toFixed(2) + 'px not within 4px of B3 ' + expect + 'px (PLT-AC-86)');
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
// PLT-AC-87: hero panel aspect near B3
|
|
580
|
+
if (hb.height > 40) {
|
|
581
|
+
const ratio = hb.width / hb.height;
|
|
582
|
+
const expectR = window.innerWidth >= 1280 ? (637 / 693) : (454 / 736);
|
|
583
|
+
if (Math.abs(ratio - expectR) / expectR > 0.08) {
|
|
584
|
+
errors.push('Hero panel ratio ' + ratio.toFixed(3) + ' not within 8% of B3 ' + expectR.toFixed(3) + ' (PLT-AC-87)');
|
|
585
|
+
}
|
|
586
|
+
}
|
|
555
587
|
}
|
|
556
588
|
|
|
557
589
|
if (hero && window.innerWidth < 1024) {
|
|
@@ -573,13 +605,24 @@ const ASSERT_EXPRESSION = `
|
|
|
573
605
|
}
|
|
574
606
|
}
|
|
575
607
|
|
|
608
|
+
// Summary must be light on the photo (PLT-AC-86)
|
|
609
|
+
if (hero && summary) {
|
|
610
|
+
const col = getComputedStyle(summary).color;
|
|
611
|
+
const rgb = parseRgb(col);
|
|
612
|
+
if (rgb) {
|
|
613
|
+
const L = relLum(rgb);
|
|
614
|
+
if (L < 0.45) {
|
|
615
|
+
errors.push('Hero summary color luminance ' + L.toFixed(3) + ' < 0.45 (got ' + col + '); need light text on photo (PLT-AC-86)');
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
576
620
|
// Centered object-position on home crops (PLT-AC-85)
|
|
577
621
|
const cropImgs = document.querySelectorAll(
|
|
578
622
|
'.home-hero-plate img, .home-specimen-figure .ledger-poster img, .home-featured .ledger-poster img, .home-card-grid .ledger-poster img'
|
|
579
623
|
);
|
|
580
624
|
cropImgs.forEach((img, idx) => {
|
|
581
625
|
const op = getComputedStyle(img).objectPosition || '';
|
|
582
|
-
// Computed is typically "50% 50%" for center
|
|
583
626
|
const norm = op.trim().toLowerCase();
|
|
584
627
|
const ok = norm === 'center' || norm === '50% 50%' || /^50%\s+50%$/.test(norm);
|
|
585
628
|
if (!ok && img.getBoundingClientRect().width > 4) {
|
|
@@ -587,21 +630,29 @@ const ASSERT_EXPRESSION = `
|
|
|
587
630
|
}
|
|
588
631
|
});
|
|
589
632
|
|
|
633
|
+
// Home plates (not hero bg) must be 16:9 (PLT-AC-85 / plate rule)
|
|
634
|
+
const plates = document.querySelectorAll(
|
|
635
|
+
'.home-specimen-figure > .ledger-poster, .home-specimen-figure > .projects-plate, .home-featured .ledger-poster, .home-card-grid .ledger-poster'
|
|
636
|
+
);
|
|
637
|
+
plates.forEach((el, idx) => {
|
|
638
|
+
const r = el.getBoundingClientRect();
|
|
639
|
+
if (r.width < 8 || r.height < 8) return;
|
|
640
|
+
const ratio = r.width / r.height;
|
|
641
|
+
if (Math.abs(ratio - 16 / 9) / (16 / 9) > 0.03) {
|
|
642
|
+
errors.push('Home plate #' + idx + ' ratio ' + ratio.toFixed(3) + ' not 16:9 ±3% (PLT-AC-85)');
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
|
|
590
646
|
// Spotlight overlay present on portrait
|
|
591
647
|
if (hero) {
|
|
592
648
|
const portrait = document.querySelector('.home-hero-portrait');
|
|
593
649
|
if (portrait) {
|
|
594
650
|
const after = getComputedStyle(portrait, '::after');
|
|
595
|
-
if (!after || after.content === 'none' || after.content === '') {
|
|
596
|
-
// some engines report content as '""' for empty string content
|
|
597
|
-
}
|
|
598
651
|
const bg = after && after.backgroundImage;
|
|
599
652
|
if (bg && bg !== 'none') {
|
|
600
653
|
if (!/radial-gradient/i.test(bg)) {
|
|
601
654
|
errors.push('Hero spotlight ::after missing radial-gradient (PLT-AC-84)');
|
|
602
655
|
} else {
|
|
603
|
-
// Chromium often omits the default center ("at 50% 50%") when serializing.
|
|
604
|
-
// Fail only on an explicit non-center position keyword.
|
|
605
656
|
const atMatch = bg.match(/radial-gradient\([^)]*?\bat\s+([^,\)]+)/i);
|
|
606
657
|
if (atMatch) {
|
|
607
658
|
const pos = atMatch[1].trim().toLowerCase().replace(/\s+/g, ' ');
|
|
@@ -610,13 +661,13 @@ const ASSERT_EXPRESSION = `
|
|
|
610
661
|
errors.push('Hero spotlight radial at "' + atMatch[1].trim() + '", expected 50% 50% (PLT-AC-84)');
|
|
611
662
|
}
|
|
612
663
|
}
|
|
613
|
-
// No "at …" ⇒ engine default center — OK (source CSS has at 50% 50%).
|
|
614
664
|
}
|
|
615
665
|
}
|
|
616
666
|
}
|
|
617
667
|
}
|
|
618
668
|
}
|
|
619
669
|
|
|
670
|
+
|
|
620
671
|
return { errors };
|
|
621
672
|
})()
|
|
622
673
|
`;
|