pandorga 2.2.7 → 2.3.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/CHANGELOG.md +22 -0
- data/_includes/home/band-listing.html +4 -0
- data/_layouts/home.html +76 -6
- data/assets/css/base.css +1 -0
- data/assets/css/ledger/home.css +424 -90
- data/examples/full/_config.yml +4 -0
- data/examples/minimal/_config.yml +3 -0
- data/lib/pandorga/commands/new.rb +1 -1
- data/lib/pandorga/registry/schema.yml +5 -1
- data/lib/pandorga/version.rb +1 -1
- data/scripts/test/test-hero-16x9.rb +16 -19
- data/scripts/test/test-regression-gate.mjs +189 -13
- data/scripts/test/test-v3-layout.rb +4 -1
- 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: 6c4ff8a5d27f9600fe8e61f001ee1ff36e17c02219ad75d6978041e8729e7e5c
|
|
4
|
+
data.tar.gz: 46638d6b965bd4656c61c87c024b06b12858631704bfd6388f88fb66cd379d35
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f0da5b876d34e6f19210f253320cfbf76e83a9cf61fb27ebfe4ca9bee19f55575d49d9d49c67b439d679b8ed6cabdcd750a452931cd0a68804ef211a090b207
|
|
7
|
+
data.tar.gz: 3ba35e6316ba6be8a0c9a6e564a97d3dcb376d3bafdda91ea1b3b2e3f2aa02f142fae74e0257d5d681f435ff0263b4f6f90adadc9f4b856eee5e6c2b29e5d639
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [2.3.0] — 2026-10-29
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- CR-22: Home hero B3 — portrait as centered spotlight background; desktop masthead places hero and Projects in two 50% content columns; stacked full-bleed hero below 1024px; config `pandorga.home.hero_overlay` (`vignette`, `pool`); gates PLT-AC-81…85. See [features/home-hero-b3.md](docs/features/home-hero-b3.md).
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- CR-21g (2.2.9): specimen card meta/copy/chips/CTAs restored to pre-2.2.7 sizes; inventory glyphs `calc(1.375rem + 6pt)`; title keeps −2pt (PLT-AC-80).
|
|
14
|
+
|
|
15
|
+
## [2.2.9] — 2026-10-29
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- CR-21g: Revert desktop home specimen card font-size -2pt reduction on meta line, description copy, chips/tags, and footer CTA buttons back to exact pre-2.2.7 token computed sizes (meta ~17.13px, copy ~18.93px, chips ~16.03px, foot CTAs ~16.03px) while keeping -2pt on the title (~24.64px). Reduce desktop (≥900px) inventory column icon glyph font-size by 2pt to `calc(1.375rem + 6pt)` (~32.2px). Mobile unchanged (PLT-AC-80).
|
|
20
|
+
|
|
21
|
+
## [2.2.8] — 2026-10-29
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- CR-21f: Home Projects band gains `home.limit_mobile` (default 6, mobile strip) and `home.limit_desktop` (default `all`, desktop column ≥900px). Home Projects section subtitle (`.home-section-note`) is constrained to the projects block width (column + card) on desktop so it no longer extends past the block; specimen card unchanged. Gate PLT-AC-79.
|
|
26
|
+
|
|
5
27
|
## [2.2.7] — 2026-10-29
|
|
6
28
|
|
|
7
29
|
### Changed
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
{%- endcomment -%}
|
|
8
8
|
{%- assign _accent = band.accent -%}
|
|
9
9
|
{%- assign _limit = band.home.limit | default: 3 -%}
|
|
10
|
+
{%- assign _limit_mobile = band.home.limit_mobile | default: 6 -%}
|
|
11
|
+
{%- assign _limit_desktop = band.home.limit_desktop | default: "all" -%}
|
|
10
12
|
{%- assign _featured = band.home.featured -%}
|
|
11
13
|
{%- assign _lang = band.language | default: site.pandorga.identity.locale | default: "en" -%}
|
|
12
14
|
{%- assign _path = band.path -%}
|
|
@@ -24,6 +26,8 @@
|
|
|
24
26
|
data-home-collection="{{ band.collection }}"
|
|
25
27
|
data-home-path="{{ _path }}"
|
|
26
28
|
data-home-limit="{{ _limit }}"
|
|
29
|
+
data-home-limit-mobile="{{ _limit_mobile }}"
|
|
30
|
+
data-home-limit-desktop="{{ _limit_desktop }}"
|
|
27
31
|
data-home-featured="{{ _featured }}"
|
|
28
32
|
data-home-language="{{ _lang }}"
|
|
29
33
|
>
|
data/_layouts/home.html
CHANGED
|
@@ -20,6 +20,19 @@ layout: shell
|
|
|
20
20
|
{%- assign _home_bands = site.data.pandorga_home_bands -%}
|
|
21
21
|
|
|
22
22
|
<main class="home-ledger">
|
|
23
|
+
{%- assign _hero_overlay = site.pandorga.home.hero_overlay -%}
|
|
24
|
+
{%- if _hero_overlay -%}
|
|
25
|
+
<style>
|
|
26
|
+
:root {
|
|
27
|
+
{%- if _hero_overlay.vignette -%}
|
|
28
|
+
--home-hero-vignette: {{ _hero_overlay.vignette }};
|
|
29
|
+
{%- endif -%}
|
|
30
|
+
{%- if _hero_overlay.pool -%}
|
|
31
|
+
--home-hero-pool: {{ _hero_overlay.pool }};
|
|
32
|
+
{%- endif -%}
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
35
|
+
{%- endif -%}
|
|
23
36
|
|
|
24
37
|
<section class="home-band home-band--hero">
|
|
25
38
|
<div class="home-hero-art home-hero-pandorga" aria-hidden="true">
|
|
@@ -257,15 +270,40 @@ layout: shell
|
|
|
257
270
|
var specimenSlot = section.querySelector('[data-home-specimen]');
|
|
258
271
|
var inventorySlot = section.querySelector('[data-home-inventory]');
|
|
259
272
|
var systemTagHref = tagHrefFrom(list);
|
|
260
|
-
/*
|
|
261
|
-
|
|
262
|
-
|
|
273
|
+
/* CR-21f: limit_mobile (default 6) for the <900 strip; limit_desktop
|
|
274
|
+
(default all) for the ≥900 column. Legacy home.limit ignored for
|
|
275
|
+
portfolio when the dual attrs are present (always emitted). */
|
|
276
|
+
function parsePortfolioLimit(raw, fallback) {
|
|
277
|
+
if (raw == null || raw === '') return fallback;
|
|
278
|
+
var s = String(raw).trim().toLowerCase();
|
|
279
|
+
if (s === 'all' || s === 'unlimited' || s === 'inf' || s === 'infinity') {
|
|
280
|
+
return Infinity;
|
|
281
|
+
}
|
|
282
|
+
var n = parseInt(s, 10);
|
|
283
|
+
return (n > 0) ? n : fallback;
|
|
284
|
+
}
|
|
285
|
+
var limitMobile = parsePortfolioLimit(
|
|
286
|
+
section.getAttribute('data-home-limit-mobile'), 6
|
|
287
|
+
);
|
|
288
|
+
var limitDesktop = parsePortfolioLimit(
|
|
289
|
+
section.getAttribute('data-home-limit-desktop'), Infinity
|
|
290
|
+
);
|
|
291
|
+
var desktopMq = window.matchMedia('(min-width: 900px)');
|
|
292
|
+
function activePortfolioLimit() {
|
|
293
|
+
return desktopMq.matches ? limitDesktop : limitMobile;
|
|
294
|
+
}
|
|
295
|
+
function slicePortfolio(source) {
|
|
296
|
+
var take = activePortfolioLimit();
|
|
297
|
+
if (!isFinite(take)) return source.slice();
|
|
298
|
+
return source.slice(0, take);
|
|
299
|
+
}
|
|
300
|
+
var portfolio = slicePortfolio(entries);
|
|
263
301
|
if (!portfolio.length) {
|
|
264
302
|
runtime.Listing.showErrorState(list, 'Projects could not be loaded right now.');
|
|
265
303
|
return;
|
|
266
304
|
}
|
|
267
305
|
if (!specimenSlot || !inventorySlot) {
|
|
268
|
-
fill(list, portfolio
|
|
306
|
+
fill(list, portfolio, function (entry) {
|
|
269
307
|
return runtime.renderSystemCard(asItem(entry), {
|
|
270
308
|
href: entry.url || runtime.projectUrl(entry.slug),
|
|
271
309
|
tagHref: systemTagHref,
|
|
@@ -275,12 +313,13 @@ layout: shell
|
|
|
275
313
|
return;
|
|
276
314
|
}
|
|
277
315
|
|
|
278
|
-
var featuredPick = runtime.pickFeatured(
|
|
316
|
+
var featuredPick = runtime.pickFeatured(entries.map(asItem), {
|
|
279
317
|
storageKey: 'home-specimen-slug',
|
|
280
318
|
eligible: function () { return true; }
|
|
281
319
|
});
|
|
282
320
|
var selectedSlug = (featuredPick && featuredPick.slug) || portfolio[0].slug;
|
|
283
|
-
|
|
321
|
+
/* Mobile strip columns follow the visible count (≤ limit_mobile). */
|
|
322
|
+
var iconSlots = Math.min(portfolio.length, isFinite(limitMobile) ? limitMobile : portfolio.length);
|
|
284
323
|
|
|
285
324
|
function entryBySlug(slug) {
|
|
286
325
|
return portfolio.filter(function (entry) { return entry.slug === slug; })[0] || portfolio[0];
|
|
@@ -456,6 +495,37 @@ layout: shell
|
|
|
456
495
|
await afterPaint();
|
|
457
496
|
paintInventory();
|
|
458
497
|
|
|
498
|
+
function refreshPortfolioForViewport() {
|
|
499
|
+
portfolio = slicePortfolio(entries);
|
|
500
|
+
iconSlots = Math.min(
|
|
501
|
+
portfolio.length,
|
|
502
|
+
isFinite(limitMobile) ? limitMobile : portfolio.length
|
|
503
|
+
);
|
|
504
|
+
var stillVisible = false;
|
|
505
|
+
for (var i = 0; i < portfolio.length; i += 1) {
|
|
506
|
+
if (portfolio[i].slug === selectedSlug) {
|
|
507
|
+
stillVisible = true;
|
|
508
|
+
break;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
if (!stillVisible) selectedSlug = portfolio[0].slug;
|
|
512
|
+
return lockSpecimenHeight().then(function () {
|
|
513
|
+
return paintSpecimen(entryBySlug(selectedSlug));
|
|
514
|
+
}).then(function () {
|
|
515
|
+
paintInventory();
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
if (typeof desktopMq.addEventListener === 'function') {
|
|
520
|
+
desktopMq.addEventListener('change', function () {
|
|
521
|
+
refreshPortfolioForViewport();
|
|
522
|
+
});
|
|
523
|
+
} else if (typeof desktopMq.addListener === 'function') {
|
|
524
|
+
desktopMq.addListener(function () {
|
|
525
|
+
refreshPortfolioForViewport();
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
|
|
459
529
|
var resizeTimer = null;
|
|
460
530
|
var lastMeasureWidth = Math.round(specimenSlot.getBoundingClientRect().width);
|
|
461
531
|
window.addEventListener('resize', function () {
|
data/assets/css/base.css
CHANGED
|
@@ -1478,6 +1478,7 @@ a.ledger-chip:hover {
|
|
|
1478
1478
|
width: 100%;
|
|
1479
1479
|
height: 100%;
|
|
1480
1480
|
object-fit: cover;
|
|
1481
|
+
object-position: center; /* CR-22 / PLT-AC-85: centered crops on home (and shared cards) */
|
|
1481
1482
|
display: block;
|
|
1482
1483
|
filter: saturate(0.92) contrast(1.02);
|
|
1483
1484
|
transition: filter var(--motion-duration-base) var(--motion-ease-default), transform var(--motion-duration-slow) var(--motion-ease-default);
|
data/assets/css/ledger/home.css
CHANGED
|
@@ -359,74 +359,9 @@ html[data-theme="light"] .home-hero-plate {
|
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
/* ── Hero from 1024px ──
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
covers that box, at least 15rem tall, like the featured article poster.
|
|
366
|
-
This block follows the base hero rules on purpose: before them, their
|
|
367
|
-
max-width, position and aspect-ratio won on source order (PLT-AC-51). */
|
|
368
|
-
@media (min-width: 1024px) {
|
|
369
|
-
.home-hero {
|
|
370
|
-
display: flex;
|
|
371
|
-
flex-direction: row;
|
|
372
|
-
align-items: stretch;
|
|
373
|
-
gap: var(--space-2xl);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.home-hero-copy {
|
|
377
|
-
flex: 0 0 46%;
|
|
378
|
-
min-width: 0;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.home-hero-portrait {
|
|
382
|
-
flex: 1 1 0;
|
|
383
|
-
align-self: stretch;
|
|
384
|
-
width: auto;
|
|
385
|
-
min-width: 0;
|
|
386
|
-
min-height: 15rem;
|
|
387
|
-
max-width: none;
|
|
388
|
-
aspect-ratio: auto;
|
|
389
|
-
overflow: hidden;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.home-hero-plate-wrap {
|
|
393
|
-
position: absolute;
|
|
394
|
-
inset: 0;
|
|
395
|
-
aspect-ratio: auto;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
.home-hero-plate {
|
|
399
|
-
position: absolute;
|
|
400
|
-
inset: 0;
|
|
401
|
-
width: 100%;
|
|
402
|
-
height: 100%;
|
|
403
|
-
aspect-ratio: auto;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
.home-hero-plate img {
|
|
407
|
-
position: absolute;
|
|
408
|
-
inset: 0;
|
|
409
|
-
width: 100%;
|
|
410
|
-
height: 100%;
|
|
411
|
-
max-width: none;
|
|
412
|
-
object-fit: cover;
|
|
413
|
-
object-position: center;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/* --hero-name-fit is the longer name part in em at the title's tracking
|
|
417
|
-
(Ancizar stacked-line default ~6.9em); a site with a longer word raises it.
|
|
418
|
-
The selector outranks a site's one-line size written as .home-ledger .home-hero-title. */
|
|
419
|
-
.home-ledger .home-hero-title {
|
|
420
|
-
white-space: normal;
|
|
421
|
-
font-size: min(calc(100cqi / var(--hero-name-fit, 6.9)), var(--hero-name-max, 4.5rem));
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
.home-hero-given,
|
|
425
|
-
.home-hero-family {
|
|
426
|
-
display: inline-block;
|
|
427
|
-
white-space: nowrap;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
362
|
+
CR-22 supersedes the prior 46% copy | plate flex. Desktop photo-bg,
|
|
363
|
+
masthead 50/50, name +2pt, and CTA nowrap live in the CR-22 block
|
|
364
|
+
at the end of this file (PLT-AC-81…85 / docs/features/home-hero-b3.md). */
|
|
430
365
|
|
|
431
366
|
/* ── Section banners ──
|
|
432
367
|
Atelier plate edge: a denser hairline, a longer accent rule, and a short
|
|
@@ -1348,6 +1283,25 @@ button.home-project-inventory-row {
|
|
|
1348
1283
|
|
|
1349
1284
|
@media (min-width: 900px) {
|
|
1350
1285
|
|
|
1286
|
+
/* CR-21f: home Projects section note (subtitle under the title) must not
|
|
1287
|
+
extend past the projects block (inventory column + gap + specimen card).
|
|
1288
|
+
Tokens mirror the bench plate/card sizing; specimen card children unchanged. */
|
|
1289
|
+
.home-band[data-home-kind="portfolio"] {
|
|
1290
|
+
--home-icon-btn-size: 2.75rem;
|
|
1291
|
+
--home-specimen-plate-height: 12.25rem;
|
|
1292
|
+
--home-specimen-plate-width: calc(var(--home-specimen-plate-height) * 16 / 9);
|
|
1293
|
+
--home-specimen-max-width: calc(var(--home-specimen-plate-width) + 2 * var(--space-md));
|
|
1294
|
+
--home-projects-block-width: calc(
|
|
1295
|
+
var(--home-icon-btn-size)
|
|
1296
|
+
+ calc(var(--space-xs) * 2)
|
|
1297
|
+
+ var(--home-specimen-max-width)
|
|
1298
|
+
);
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
.home-band[data-home-kind="portfolio"] .home-section-note {
|
|
1302
|
+
max-width: var(--home-projects-block-width);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1351
1305
|
/* Inventory left of specimen, flush to card (gap ≤ 2× button gap);
|
|
1352
1306
|
column width = button width; plate 16:9 at ~215.6×383.3 (+25% CR-21e);
|
|
1353
1307
|
card hugs plate + padding; visible Explore label removed (CR-21d). */
|
|
@@ -1399,11 +1353,11 @@ button.home-project-inventory-row {
|
|
|
1399
1353
|
flex: 0 0 auto;
|
|
1400
1354
|
}
|
|
1401
1355
|
|
|
1402
|
-
/*
|
|
1356
|
+
/* CR-21g: +6pt over the shared CR-16 size (PLT-AC-80).
|
|
1403
1357
|
Leave --initial on --type-card (fixture + letter marks). */
|
|
1404
1358
|
.home-project-inventory-row .home-project-inventory-glyph:not(.home-project-inventory-glyph--initial),
|
|
1405
1359
|
.home-project-inventory-row .home-project-inventory-glyph.material-symbols-outlined {
|
|
1406
|
-
font-size: calc(1.375rem +
|
|
1360
|
+
font-size: calc(1.375rem + 6pt);
|
|
1407
1361
|
}
|
|
1408
1362
|
|
|
1409
1363
|
.home-project-specimen {
|
|
@@ -1447,30 +1401,11 @@ button.home-project-inventory-row {
|
|
|
1447
1401
|
flex: 0 1 auto;
|
|
1448
1402
|
}
|
|
1449
1403
|
|
|
1450
|
-
/* CR-
|
|
1451
|
-
.home-specimen-strip .ledger-meta,
|
|
1452
|
-
.home-specimen-strip > .ledger-status {
|
|
1453
|
-
font-size: calc(var(--type-label-lg) - 2pt);
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1404
|
+
/* CR-21g: specimen title keeps -2pt (desktop only). Meta, description, chips, and foot CTAs revert to base token sizes (PLT-AC-80). */
|
|
1456
1405
|
.home-project-specimen .home-specimen-title,
|
|
1457
1406
|
.home-project-specimen .ledger-card-title {
|
|
1458
1407
|
font-size: calc(var(--type-card-lg) - 2pt);
|
|
1459
1408
|
}
|
|
1460
|
-
|
|
1461
|
-
.home-project-specimen .ledger-card-copy {
|
|
1462
|
-
font-size: calc(var(--type-body) - 2pt);
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
.home-project-specimen .ledger-chip {
|
|
1466
|
-
font-size: calc(var(--type-cta) - 2pt);
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
.home-specimen-foot .ledger-cta,
|
|
1470
|
-
.home-specimen-foot .home-specimen-open,
|
|
1471
|
-
.home-project-specimen .home-specimen-open {
|
|
1472
|
-
font-size: calc(var(--type-cta) - 2pt);
|
|
1473
|
-
}
|
|
1474
1409
|
}
|
|
1475
1410
|
|
|
1476
1411
|
/* ── Reference band: Sources + Network of Ideas ──────────────────────────
|
|
@@ -1898,3 +1833,402 @@ html[data-theme="light"] .home-featured .ledger-poster {
|
|
|
1898
1833
|
font-variant-numeric: tabular-nums;
|
|
1899
1834
|
color: var(--color-on-surface);
|
|
1900
1835
|
}
|
|
1836
|
+
|
|
1837
|
+
/* ═══════════════════════════════════════════════════════════════════════════
|
|
1838
|
+
CR-22 — Home hero B3 (PLT-AC-81…85)
|
|
1839
|
+
Photo as hero background + 50/50 masthead with Projects from 1024px.
|
|
1840
|
+
Spotlight pool and crops are centered (object-position: center).
|
|
1841
|
+
Config: --home-hero-vignette, --home-hero-pool (see pandorga.home.hero_overlay).
|
|
1842
|
+
═══════════════════════════════════════════════════════════════════════════ */
|
|
1843
|
+
|
|
1844
|
+
:root {
|
|
1845
|
+
--home-hero-vignette: 0.60;
|
|
1846
|
+
--home-hero-pool: 0.94;
|
|
1847
|
+
--home-masthead-gutter: clamp(1.25rem, 2.2vw, 2rem);
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
/* Shared: centered crop on home specimen/card plates (hero already centers in base + CR-22 media). */
|
|
1851
|
+
.home-specimen-figure > .ledger-poster img,
|
|
1852
|
+
.home-specimen-figure > .ledger-poster video,
|
|
1853
|
+
.home-card-grid .ledger-poster img,
|
|
1854
|
+
.home-card-grid .ledger-poster video,
|
|
1855
|
+
.home-featured .ledger-poster img,
|
|
1856
|
+
.home-featured .ledger-poster video {
|
|
1857
|
+
object-position: center;
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
/* Spotlight overlay — centered radial pool + vignette (config-driven) */
|
|
1861
|
+
.home-hero-portrait::after {
|
|
1862
|
+
content: "";
|
|
1863
|
+
position: absolute;
|
|
1864
|
+
inset: 0;
|
|
1865
|
+
z-index: 2;
|
|
1866
|
+
pointer-events: none;
|
|
1867
|
+
background:
|
|
1868
|
+
radial-gradient(
|
|
1869
|
+
ellipse 62% 70% at 50% 50%,
|
|
1870
|
+
rgba(0, 0, 0, calc(1 - var(--home-hero-pool))) 0%,
|
|
1871
|
+
rgba(0, 0, 0, calc(0.18 * var(--home-hero-vignette) / 0.6)) 34%,
|
|
1872
|
+
rgba(0, 0, 0, calc(0.55 * var(--home-hero-vignette) / 0.6)) 66%,
|
|
1873
|
+
rgba(0, 0, 0, calc(1 * var(--home-hero-vignette) / 0.6 * 0.92)) 100%
|
|
1874
|
+
),
|
|
1875
|
+
linear-gradient(
|
|
1876
|
+
90deg,
|
|
1877
|
+
rgba(0, 0, 0, calc(0.55 * var(--home-hero-vignette) / 0.6)) 0%,
|
|
1878
|
+
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)) 52%,
|
|
1880
|
+
transparent 76%
|
|
1881
|
+
),
|
|
1882
|
+
linear-gradient(
|
|
1883
|
+
180deg,
|
|
1884
|
+
rgba(0, 0, 0, calc(0.18 * var(--home-hero-vignette) / 0.6)) 0%,
|
|
1885
|
+
transparent 22%,
|
|
1886
|
+
transparent 55%,
|
|
1887
|
+
rgba(0, 0, 0, calc(0.48 * var(--home-hero-vignette) / 0.6)) 100%
|
|
1888
|
+
);
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
/* ── Stacked / full-bleed (< 1024): photo edge-to-edge, height hugs copy ── */
|
|
1892
|
+
@media (max-width: 1023px) {
|
|
1893
|
+
.home-band--hero {
|
|
1894
|
+
padding: 0;
|
|
1895
|
+
width: 100vw;
|
|
1896
|
+
max-width: 100vw;
|
|
1897
|
+
margin-left: calc(50% - 50vw);
|
|
1898
|
+
margin-right: calc(50% - 50vw);
|
|
1899
|
+
border-bottom: 0;
|
|
1900
|
+
background: #050505;
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
.home-band--hero .home-hero-art,
|
|
1904
|
+
.home-band--hero .home-hero-pandorga {
|
|
1905
|
+
display: none;
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
.home-band--hero .home-band-inner {
|
|
1909
|
+
max-width: none;
|
|
1910
|
+
width: 100%;
|
|
1911
|
+
margin: 0;
|
|
1912
|
+
padding: 0;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
.home-hero {
|
|
1916
|
+
display: block;
|
|
1917
|
+
position: relative;
|
|
1918
|
+
isolation: isolate;
|
|
1919
|
+
min-height: 0;
|
|
1920
|
+
height: auto;
|
|
1921
|
+
gap: 0;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
.home-hero-portrait {
|
|
1925
|
+
position: absolute;
|
|
1926
|
+
inset: 0;
|
|
1927
|
+
width: 100%;
|
|
1928
|
+
height: 100%;
|
|
1929
|
+
min-height: 0;
|
|
1930
|
+
z-index: 0;
|
|
1931
|
+
margin: 0;
|
|
1932
|
+
pointer-events: none;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
.home-hero-plate-wrap,
|
|
1936
|
+
.home-hero-plate {
|
|
1937
|
+
position: absolute;
|
|
1938
|
+
inset: 0;
|
|
1939
|
+
width: 100%;
|
|
1940
|
+
height: 100%;
|
|
1941
|
+
max-width: none;
|
|
1942
|
+
aspect-ratio: auto;
|
|
1943
|
+
border: 0;
|
|
1944
|
+
border-radius: 0;
|
|
1945
|
+
margin: 0;
|
|
1946
|
+
box-shadow: none;
|
|
1947
|
+
background: #050505;
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
.home-hero-plate img {
|
|
1951
|
+
position: absolute;
|
|
1952
|
+
inset: 0;
|
|
1953
|
+
width: 100%;
|
|
1954
|
+
height: 100%;
|
|
1955
|
+
object-fit: cover;
|
|
1956
|
+
object-position: center;
|
|
1957
|
+
filter: saturate(0.90) contrast(1.08) brightness(0.94);
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
.home-hero-plate .ledger-frame-corners,
|
|
1961
|
+
.home-hero-plate-wrap .ledger-frame-crosshairs {
|
|
1962
|
+
display: none;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
.home-hero-copy {
|
|
1966
|
+
position: relative;
|
|
1967
|
+
z-index: 3;
|
|
1968
|
+
display: flex;
|
|
1969
|
+
flex-direction: column;
|
|
1970
|
+
justify-content: flex-end;
|
|
1971
|
+
gap: 0.85rem;
|
|
1972
|
+
padding: clamp(1.35rem, 4.5vw, 2.1rem) clamp(1.15rem, 5vw, 2rem) clamp(1.5rem, 4.5vw, 2.1rem);
|
|
1973
|
+
max-width: 36rem;
|
|
1974
|
+
width: 100%;
|
|
1975
|
+
box-sizing: border-box;
|
|
1976
|
+
background: transparent;
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
.home-hero-title {
|
|
1980
|
+
color: #f4f4f4;
|
|
1981
|
+
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
|
|
1982
|
+
margin-bottom: 0;
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
.home-hero-given {
|
|
1986
|
+
color: #f4f4f4;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
.home-hero-family {
|
|
1990
|
+
color: #c8e4f5;
|
|
1991
|
+
--mark-ink: #7eb8d8;
|
|
1992
|
+
--mark-a: 42%;
|
|
1993
|
+
--mark-b: 32%;
|
|
1994
|
+
--mark-c: 14%;
|
|
1995
|
+
--mark-1: 42%;
|
|
1996
|
+
--mark-2: 32%;
|
|
1997
|
+
--mark-3: 14%;
|
|
1998
|
+
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
.home-hero-summary,
|
|
2002
|
+
.home-hero-tagline {
|
|
2003
|
+
color: #f0f0f0;
|
|
2004
|
+
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
|
|
2005
|
+
max-width: 100%;
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
.home-hero-tagline {
|
|
2009
|
+
margin-bottom: 0.55rem;
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
.home-hero-tagline::after {
|
|
2013
|
+
border-top-color: color-mix(in srgb, #fff 35%, transparent);
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
.home-hero-actions {
|
|
2017
|
+
margin-top: 0.35rem;
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
.home-hero-actions .ledger-cta,
|
|
2021
|
+
.home-hero-actions .home-hero-cta {
|
|
2022
|
+
background: rgba(245, 245, 245, 0.94);
|
|
2023
|
+
color: #111;
|
|
2024
|
+
border-color: rgba(255, 255, 255, 0.55);
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
.home-hero-actions .ledger-cta span,
|
|
2028
|
+
.home-hero-actions .home-hero-cta span,
|
|
2029
|
+
.home-hero-actions .material-symbols-outlined {
|
|
2030
|
+
color: #111;
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
/* ── Desktop masthead (>= 1024): 50/50 hero | projects ── */
|
|
2035
|
+
@media (min-width: 1024px) {
|
|
2036
|
+
.home-ledger {
|
|
2037
|
+
display: grid;
|
|
2038
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
2039
|
+
column-gap: 0;
|
|
2040
|
+
align-items: stretch;
|
|
2041
|
+
width: min(80rem, calc(100% - 2 * var(--gutter, 2rem)));
|
|
2042
|
+
max-width: 80rem;
|
|
2043
|
+
margin-inline: auto;
|
|
2044
|
+
box-sizing: border-box;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
.home-band--hero {
|
|
2048
|
+
grid-column: 1;
|
|
2049
|
+
grid-row: 1;
|
|
2050
|
+
justify-self: start;
|
|
2051
|
+
width: calc(100% - var(--home-masthead-gutter));
|
|
2052
|
+
max-width: 100%;
|
|
2053
|
+
margin: 0;
|
|
2054
|
+
padding: 0;
|
|
2055
|
+
border-bottom: 0;
|
|
2056
|
+
background: #050505;
|
|
2057
|
+
border-radius: 3px;
|
|
2058
|
+
overflow: hidden;
|
|
2059
|
+
align-self: stretch;
|
|
2060
|
+
min-height: 32rem;
|
|
2061
|
+
height: auto;
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
.home-band--hero .home-hero-art,
|
|
2065
|
+
.home-band--hero .home-hero-pandorga {
|
|
2066
|
+
display: none;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
.home-band--hero .home-band-inner {
|
|
2070
|
+
max-width: none;
|
|
2071
|
+
width: 100%;
|
|
2072
|
+
margin: 0;
|
|
2073
|
+
padding: 0;
|
|
2074
|
+
height: 100%;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
.home-band[data-home-kind="portfolio"] {
|
|
2078
|
+
grid-column: 2;
|
|
2079
|
+
grid-row: 1;
|
|
2080
|
+
justify-self: stretch;
|
|
2081
|
+
width: 100%;
|
|
2082
|
+
margin: 0;
|
|
2083
|
+
padding-block: 1.25rem 1.75rem;
|
|
2084
|
+
padding-inline: 0;
|
|
2085
|
+
border-bottom: 0;
|
|
2086
|
+
align-self: stretch;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
.home-band[data-home-kind="portfolio"] .home-band-inner {
|
|
2090
|
+
max-width: none;
|
|
2091
|
+
width: 100%;
|
|
2092
|
+
margin: 0;
|
|
2093
|
+
padding-inline: 0;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
/* Remaining bands span the full masthead width */
|
|
2097
|
+
.home-band:not(.home-band--hero):not([data-home-kind="portfolio"]) {
|
|
2098
|
+
grid-column: 1 / -1;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
/* Override prior 1024 copy|portrait flex — photo is the panel background */
|
|
2102
|
+
.home-hero {
|
|
2103
|
+
display: flex;
|
|
2104
|
+
flex-direction: column;
|
|
2105
|
+
position: relative;
|
|
2106
|
+
isolation: isolate;
|
|
2107
|
+
min-height: inherit;
|
|
2108
|
+
height: 100%;
|
|
2109
|
+
gap: 0;
|
|
2110
|
+
align-items: stretch;
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
.home-hero-portrait {
|
|
2114
|
+
position: absolute;
|
|
2115
|
+
inset: 0;
|
|
2116
|
+
flex: none;
|
|
2117
|
+
width: 100%;
|
|
2118
|
+
height: 100%;
|
|
2119
|
+
min-height: 0;
|
|
2120
|
+
max-width: none;
|
|
2121
|
+
aspect-ratio: auto;
|
|
2122
|
+
z-index: 0;
|
|
2123
|
+
overflow: hidden;
|
|
2124
|
+
pointer-events: none;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
.home-hero-plate-wrap,
|
|
2128
|
+
.home-hero-plate {
|
|
2129
|
+
position: absolute;
|
|
2130
|
+
inset: 0;
|
|
2131
|
+
width: 100%;
|
|
2132
|
+
height: 100%;
|
|
2133
|
+
aspect-ratio: auto;
|
|
2134
|
+
border: 0;
|
|
2135
|
+
border-radius: 0;
|
|
2136
|
+
margin: 0;
|
|
2137
|
+
box-shadow: none;
|
|
2138
|
+
background: #050505;
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
.home-hero-plate img {
|
|
2142
|
+
position: absolute;
|
|
2143
|
+
inset: 0;
|
|
2144
|
+
width: 100%;
|
|
2145
|
+
height: 100%;
|
|
2146
|
+
max-width: none;
|
|
2147
|
+
object-fit: cover;
|
|
2148
|
+
object-position: center;
|
|
2149
|
+
filter: saturate(0.90) contrast(1.08) brightness(0.94);
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
.home-hero-plate .ledger-frame-corners,
|
|
2153
|
+
.home-hero-plate-wrap .ledger-frame-crosshairs {
|
|
2154
|
+
display: none;
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
.home-hero-copy {
|
|
2158
|
+
position: relative;
|
|
2159
|
+
z-index: 3;
|
|
2160
|
+
flex: 1 1 auto;
|
|
2161
|
+
display: flex;
|
|
2162
|
+
flex-direction: column;
|
|
2163
|
+
justify-content: flex-end;
|
|
2164
|
+
gap: 0.85rem;
|
|
2165
|
+
width: 100%;
|
|
2166
|
+
max-width: 100%;
|
|
2167
|
+
min-width: 0;
|
|
2168
|
+
flex-basis: auto;
|
|
2169
|
+
padding: 1.75rem 1.35rem 1.85rem 1.45rem;
|
|
2170
|
+
box-sizing: border-box;
|
|
2171
|
+
background: transparent;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
/* Name: previous desktop size + 2pt (CR-22 / PLT-AC-82) */
|
|
2175
|
+
.home-ledger .home-hero-title {
|
|
2176
|
+
white-space: nowrap;
|
|
2177
|
+
font-size: calc(min(calc(100cqi / var(--hero-name-fit, 6.9)), var(--hero-name-max, 4.5rem)) + 2pt);
|
|
2178
|
+
color: #f4f4f4;
|
|
2179
|
+
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
|
|
2180
|
+
margin-bottom: 0;
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
.home-hero-given {
|
|
2184
|
+
color: #f4f4f4;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
.home-hero-family {
|
|
2188
|
+
color: #c8e4f5;
|
|
2189
|
+
--mark-ink: #7eb8d8;
|
|
2190
|
+
--mark-a: 42%;
|
|
2191
|
+
--mark-b: 32%;
|
|
2192
|
+
--mark-c: 14%;
|
|
2193
|
+
--mark-1: 42%;
|
|
2194
|
+
--mark-2: 32%;
|
|
2195
|
+
--mark-3: 14%;
|
|
2196
|
+
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
.home-hero-summary,
|
|
2200
|
+
.home-hero-tagline {
|
|
2201
|
+
color: #f0f0f0;
|
|
2202
|
+
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
|
|
2203
|
+
max-width: 100%;
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
.home-hero-tagline::after {
|
|
2207
|
+
border-top-color: color-mix(in srgb, #fff 35%, transparent);
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
.home-hero-actions {
|
|
2211
|
+
display: flex;
|
|
2212
|
+
flex-wrap: nowrap;
|
|
2213
|
+
gap: 0.4rem 0.5rem;
|
|
2214
|
+
margin-top: 0.35rem;
|
|
2215
|
+
width: 100%;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
.home-hero-actions .ledger-cta,
|
|
2219
|
+
.home-hero-actions .home-hero-cta {
|
|
2220
|
+
flex: 0 1 auto;
|
|
2221
|
+
white-space: nowrap;
|
|
2222
|
+
min-width: 0;
|
|
2223
|
+
background: rgba(245, 245, 245, 0.94);
|
|
2224
|
+
color: #111;
|
|
2225
|
+
border-color: rgba(255, 255, 255, 0.55);
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
.home-hero-actions .ledger-cta span,
|
|
2229
|
+
.home-hero-actions .home-hero-cta span,
|
|
2230
|
+
.home-hero-actions .material-symbols-outlined {
|
|
2231
|
+
color: #111;
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
}
|
data/examples/full/_config.yml
CHANGED
|
@@ -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.
|
|
27
|
+
# GitHub tag: gem "pandorga", github: "alexandrelheinen/pandorga", tag: "v2.3.0"
|
|
28
28
|
gem "csv"
|
|
29
29
|
gem "base64"
|
|
30
30
|
RUBY
|
|
@@ -144,7 +144,11 @@ pages:
|
|
|
144
144
|
- key: "`featured`"
|
|
145
145
|
notes: Lead card for writing bands
|
|
146
146
|
- key: "`limit`"
|
|
147
|
-
notes: Max items in the band
|
|
147
|
+
notes: Max items in the band (non-portfolio)
|
|
148
|
+
- key: "`limit_mobile`"
|
|
149
|
+
notes: "Portfolio only: max icon buttons in the mobile strip (<900px). Default 6"
|
|
150
|
+
- key: "`limit_desktop`"
|
|
151
|
+
notes: "Portfolio only: max icon buttons in the desktop column (≥900px). Default `all` (unlimited)"
|
|
148
152
|
- key: "`cta`"
|
|
149
153
|
notes: Listing CTA label (default `View all`)
|
|
150
154
|
- key: "`false`"
|
data/lib/pandorga/version.rb
CHANGED
|
@@ -29,6 +29,7 @@ require_relative "../../lib/pandorga/thumbnail_variants"
|
|
|
29
29
|
ONLY_ITEMS = ARGV.map { |a| a.sub(/\A(PLT-AC-)?51\./, "") }.to_set
|
|
30
30
|
DESKTOP = "(min-width:1024px)"
|
|
31
31
|
PHONE = "(max-width:767px)"
|
|
32
|
+
STACK = "(max-width:1023px)" # CR-22 full-bleed photo-bg
|
|
32
33
|
|
|
33
34
|
$failures = []
|
|
34
35
|
|
|
@@ -134,7 +135,9 @@ end
|
|
|
134
135
|
|
|
135
136
|
def expect_decl(sel, prop, want, media: nil)
|
|
136
137
|
got = decl(sel, prop, media: media)
|
|
137
|
-
|
|
138
|
+
# CR-22 overrides use !important; compare the declared value without the flag.
|
|
139
|
+
bare = got.to_s.sub(/\s*!important\z/, "").strip
|
|
140
|
+
ok = want.is_a?(Regexp) ? bare.match?(want) : bare == want
|
|
138
141
|
where = media ? " under #{media}" : ""
|
|
139
142
|
fail!("#{sel} #{prop} should be #{want.inspect}#{where}, got #{got.inspect}") unless ok
|
|
140
143
|
end
|
|
@@ -160,15 +163,16 @@ item(1) do
|
|
|
160
163
|
fail!("no .home-hero-plate--landscape rule may remain") unless landscape.empty?
|
|
161
164
|
end
|
|
162
165
|
|
|
163
|
-
# ── 51.2
|
|
166
|
+
# ── 51.2 Stacked full-bleed (CR-22, <1024) ─────────────────────────────────
|
|
164
167
|
|
|
165
168
|
item(2) do
|
|
166
|
-
expect_decl(".home-hero
|
|
167
|
-
expect_decl(".home-hero-portrait", "
|
|
168
|
-
expect_decl(".home-hero-plate", "
|
|
169
|
+
expect_decl(".home-band--hero", "width", "100vw", media: STACK)
|
|
170
|
+
expect_decl(".home-hero-portrait", "position", "absolute", media: STACK)
|
|
171
|
+
expect_decl(".home-hero-plate", "aspect-ratio", "auto", media: STACK)
|
|
172
|
+
expect_decl(".home-hero-plate img", "object-position", /\Acenter( center)?\z/, media: STACK)
|
|
169
173
|
end
|
|
170
174
|
|
|
171
|
-
# ── 51.3
|
|
175
|
+
# ── 51.3 Portrait must not be width-capped ─────────────────────────────────
|
|
172
176
|
|
|
173
177
|
item(3) do
|
|
174
178
|
rules_for(".home-hero-portrait").each do |r|
|
|
@@ -178,18 +182,13 @@ item(3) do
|
|
|
178
182
|
fail!(".home-hero-portrait max-width #{val} under #{r[:media].inspect} caps the plate")
|
|
179
183
|
end
|
|
180
184
|
end
|
|
181
|
-
expect_decl(".home-hero-portrait", "width", "100%")
|
|
182
185
|
end
|
|
183
186
|
|
|
184
|
-
# ── 51.4 From 1024px
|
|
187
|
+
# ── 51.4 From 1024px — photo as background (CR-22 / PLT-AC-82) ─────────────
|
|
185
188
|
|
|
186
189
|
item(4) do
|
|
187
190
|
expect_decl(".home-hero", "display", "flex", media: DESKTOP)
|
|
188
|
-
expect_decl(".home-hero-
|
|
189
|
-
expect_decl(".home-hero-copy", "min-width", "0", media: DESKTOP)
|
|
190
|
-
expect_decl(".home-hero-portrait", "flex", "1 1 0", media: DESKTOP)
|
|
191
|
-
expect_decl(".home-hero-portrait", "min-height", "15rem", media: DESKTOP)
|
|
192
|
-
expect_decl(".home-hero-portrait", "max-width", "none", media: DESKTOP)
|
|
191
|
+
expect_decl(".home-hero-portrait", "position", "absolute", media: DESKTOP)
|
|
193
192
|
expect_decl(".home-hero-portrait", "aspect-ratio", "auto", media: DESKTOP)
|
|
194
193
|
[".home-hero-plate-wrap", ".home-hero-plate"].each do |sel|
|
|
195
194
|
expect_decl(sel, "position", "absolute", media: DESKTOP)
|
|
@@ -198,6 +197,7 @@ item(4) do
|
|
|
198
197
|
end
|
|
199
198
|
expect_decl(".home-hero-plate img", "object-fit", "cover", media: DESKTOP)
|
|
200
199
|
expect_decl(".home-hero-plate img", "object-position", /\Acenter( center)?\z/, media: DESKTOP)
|
|
200
|
+
expect_decl(".home-hero-actions", "flex-wrap", "nowrap", media: DESKTOP)
|
|
201
201
|
|
|
202
202
|
layout = LAYOUT.read
|
|
203
203
|
fail!("the crosshairs must stay on the plate wrapper") unless layout.include?('class="ledger-frame-crosshairs"')
|
|
@@ -222,14 +222,11 @@ end
|
|
|
222
222
|
|
|
223
223
|
item(6) do
|
|
224
224
|
title = ".home-ledger .home-hero-title"
|
|
225
|
-
|
|
225
|
+
# CR-22: single-line name on photo, +2pt over the prior desktop size
|
|
226
|
+
expect_decl(title, "white-space", "nowrap", media: DESKTOP)
|
|
226
227
|
expect_decl(title, "font-size",
|
|
227
|
-
"min(calc(100cqi / var(--hero-name-fit, 6.9)), var(--hero-name-max, 4.5rem))",
|
|
228
|
+
"calc(min(calc(100cqi / var(--hero-name-fit, 6.9)), var(--hero-name-max, 4.5rem)) + 2pt)",
|
|
228
229
|
media: DESKTOP)
|
|
229
|
-
%w[.home-hero-given .home-hero-family].each do |sel|
|
|
230
|
-
expect_decl(sel, "display", "inline-block", media: DESKTOP)
|
|
231
|
-
expect_decl(sel, "white-space", "nowrap", media: DESKTOP)
|
|
232
|
-
end
|
|
233
230
|
end
|
|
234
231
|
|
|
235
232
|
# ── 51.7 Markup ─────────────────────────────────────────────────────────────
|
|
@@ -247,14 +247,14 @@ const ASSERT_EXPRESSION = `
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
// 5. Desktop home projects inventory logo-button stack (PLT-AC-74)
|
|
250
|
-
// 6. CR-21b/c/d
|
|
250
|
+
// 6. CR-21b/c/d/e/f/g + CR-22 masthead/photo-bg/centered crops (PLT-AC-75…85)
|
|
251
251
|
{
|
|
252
252
|
const bench = document.querySelector('.home-projects-bench');
|
|
253
253
|
const rows = document.querySelectorAll('.home-project-inventory-row');
|
|
254
254
|
const rootFs = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
255
|
-
// Mobile / shared: calc(1.375rem + 2pt). Desktop (>=900): +
|
|
255
|
+
// Mobile / shared: calc(1.375rem + 2pt). Desktop (>=900): +6pt (CR-21g / PLT-AC-80).
|
|
256
256
|
const expectedGlyphMobile = 1.375 * rootFs + 2 * (96 / 72);
|
|
257
|
-
const expectedGlyphDesktop = 1.375 * rootFs +
|
|
257
|
+
const expectedGlyphDesktop = 1.375 * rootFs + 6 * (96 / 72);
|
|
258
258
|
|
|
259
259
|
if (rows.length > 0) {
|
|
260
260
|
const first = rows[0];
|
|
@@ -270,8 +270,9 @@ const ASSERT_EXPRESSION = `
|
|
|
270
270
|
expectFs = parseFloat(rawCard) || expectedGlyphMobile;
|
|
271
271
|
if (rawCard.endsWith('rem')) expectFs = expectFs * rootFs;
|
|
272
272
|
}
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
const tol = window.innerWidth >= 900 && !isInitial ? 1.0 : 1.5;
|
|
274
|
+
if (Math.abs(gfs - expectFs) > tol) {
|
|
275
|
+
errors.push('Inventory glyph font-size (' + gfs.toFixed(2) + 'px) not within ' + tol.toFixed(1) + 'px of expected ' + expectFs.toFixed(2) + 'px (PLT-AC-75/76/80)');
|
|
275
276
|
}
|
|
276
277
|
if (!isInitial && window.innerWidth >= 900 && gfs < 22) {
|
|
277
278
|
errors.push('Desktop inventory icon glyph too small (' + gfs.toFixed(2) + 'px); Material Symbols inherit must not win (PLT-AC-75)');
|
|
@@ -341,7 +342,7 @@ const ASSERT_EXPRESSION = `
|
|
|
341
342
|
}
|
|
342
343
|
}
|
|
343
344
|
|
|
344
|
-
// CR-
|
|
345
|
+
// CR-21g / PLT-AC-80: specimen card meta, copy, chips, CTAs revert to base token size; title keeps -2pt
|
|
345
346
|
{
|
|
346
347
|
const pt = 2 * (96 / 72);
|
|
347
348
|
const parseToken = (raw) => {
|
|
@@ -352,11 +353,11 @@ const ASSERT_EXPRESSION = `
|
|
|
352
353
|
return v;
|
|
353
354
|
};
|
|
354
355
|
const checks = [
|
|
355
|
-
{ sel: '.home-specimen-strip .ledger-meta', token: '--type-label-lg', name: 'meta' },
|
|
356
|
-
{ sel: '.home-project-specimen .home-specimen-title, .home-project-specimen .ledger-card-title', token: '--type-card-lg', name: 'title' },
|
|
357
|
-
{ sel: '.home-project-specimen .ledger-card-copy', token: '--type-body', name: 'copy' },
|
|
358
|
-
{ sel: '.home-project-specimen .ledger-chip', token: '--type-cta', name: 'chip' },
|
|
359
|
-
{ sel: '.home-specimen-foot .ledger-cta, .home-project-specimen .home-specimen-open', token: '--type-cta', name: 'foot' }
|
|
356
|
+
{ sel: '.home-specimen-strip .ledger-meta', token: '--type-label-lg', name: 'meta', minusPt: false },
|
|
357
|
+
{ sel: '.home-project-specimen .home-specimen-title, .home-project-specimen .ledger-card-title', token: '--type-card-lg', name: 'title', minusPt: true },
|
|
358
|
+
{ sel: '.home-project-specimen .ledger-card-copy', token: '--type-body', name: 'copy', minusPt: false },
|
|
359
|
+
{ sel: '.home-project-specimen .ledger-chip', token: '--type-cta', name: 'chip', minusPt: false },
|
|
360
|
+
{ sel: '.home-specimen-foot .ledger-cta, .home-project-specimen .home-specimen-open', token: '--type-cta', name: 'foot', minusPt: false }
|
|
360
361
|
];
|
|
361
362
|
const root = document.documentElement;
|
|
362
363
|
checks.forEach((c) => {
|
|
@@ -364,10 +365,10 @@ const ASSERT_EXPRESSION = `
|
|
|
364
365
|
if (!el) return;
|
|
365
366
|
const base = parseToken(getComputedStyle(root).getPropertyValue(c.token));
|
|
366
367
|
if (base == null) return;
|
|
367
|
-
const expect = base - pt;
|
|
368
|
+
const expect = c.minusPt ? base - pt : base;
|
|
368
369
|
const got = parseFloat(getComputedStyle(el).fontSize);
|
|
369
370
|
if (Math.abs(got - expect) > 1.5) {
|
|
370
|
-
errors.push('Specimen ' + c.name + ' font-size (' + got.toFixed(2) + 'px) not within 1.5px of token−2pt (' + expect.toFixed(2) + 'px) (PLT-AC-
|
|
371
|
+
errors.push('Specimen ' + c.name + ' font-size (' + got.toFixed(2) + 'px) not within 1.5px of ' + (c.minusPt ? 'token−2pt' : 'token base') + ' (' + expect.toFixed(2) + 'px) (PLT-AC-80)');
|
|
371
372
|
}
|
|
372
373
|
});
|
|
373
374
|
}
|
|
@@ -441,6 +442,181 @@ const ASSERT_EXPRESSION = `
|
|
|
441
442
|
});
|
|
442
443
|
}
|
|
443
444
|
|
|
445
|
+
// CR-21f / PLT-AC-79: dual portfolio limits + home projects subtitle ≤ block
|
|
446
|
+
{
|
|
447
|
+
const section = document.querySelector('.home-band[data-home-kind="portfolio"]');
|
|
448
|
+
if (section) {
|
|
449
|
+
const limM = (section.getAttribute('data-home-limit-mobile') || '').trim();
|
|
450
|
+
const limD = (section.getAttribute('data-home-limit-desktop') || '').trim().toLowerCase();
|
|
451
|
+
const mobileN = parseInt(limM, 10);
|
|
452
|
+
if (!(mobileN > 0)) {
|
|
453
|
+
errors.push('data-home-limit-mobile is "' + limM + '", expected positive int (default 6) (PLT-AC-79)');
|
|
454
|
+
}
|
|
455
|
+
if (!(limD === 'all' || limD === 'unlimited' || parseInt(limD, 10) > 0)) {
|
|
456
|
+
errors.push('data-home-limit-desktop is "' + limD + '", expected all|unlimited|positive int (PLT-AC-79)');
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
const rows = section.querySelectorAll('.home-project-inventory-row');
|
|
460
|
+
let totalProjects = 0;
|
|
461
|
+
try {
|
|
462
|
+
const xhr = new XMLHttpRequest();
|
|
463
|
+
xhr.open('GET', '/data/writing_index.json', false);
|
|
464
|
+
xhr.send(null);
|
|
465
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
466
|
+
const index = JSON.parse(xhr.responseText);
|
|
467
|
+
const col = section.getAttribute('data-home-collection') || 'projects';
|
|
468
|
+
totalProjects = (Array.isArray(index) ? index : []).filter(function (e) {
|
|
469
|
+
return e && e.collection === col;
|
|
470
|
+
}).length;
|
|
471
|
+
}
|
|
472
|
+
} catch (e) { /* ignore — count asserts skipped if index missing */ }
|
|
473
|
+
|
|
474
|
+
if (totalProjects > 0 && rows.length > 0) {
|
|
475
|
+
if (window.innerWidth >= 900) {
|
|
476
|
+
const expectDesktop = (limD === 'all' || limD === 'unlimited')
|
|
477
|
+
? totalProjects
|
|
478
|
+
: Math.min(totalProjects, parseInt(limD, 10));
|
|
479
|
+
if (rows.length !== expectDesktop) {
|
|
480
|
+
errors.push('Desktop inventory rows (' + rows.length + ') !== expected ' + expectDesktop + ' (PLT-AC-79)');
|
|
481
|
+
}
|
|
482
|
+
} else {
|
|
483
|
+
const cap = mobileN > 0 ? mobileN : 6;
|
|
484
|
+
if (rows.length > cap) {
|
|
485
|
+
errors.push('Mobile inventory rows (' + rows.length + ') > limit_mobile ' + cap + ' (PLT-AC-79)');
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
if (window.innerWidth >= 900) {
|
|
491
|
+
const note = section.querySelector('.home-section-note');
|
|
492
|
+
const wrap = section.querySelector('.home-projects-inventory-wrap');
|
|
493
|
+
const specimen = section.querySelector('.home-project-specimen')
|
|
494
|
+
|| section.querySelector('[data-home-specimen] > *')
|
|
495
|
+
|| section.querySelector('[data-home-specimen]');
|
|
496
|
+
if (note && wrap && specimen) {
|
|
497
|
+
const nR = note.getBoundingClientRect();
|
|
498
|
+
const wR = wrap.getBoundingClientRect();
|
|
499
|
+
const sR = specimen.getBoundingClientRect();
|
|
500
|
+
if (nR.width > 8 && sR.width > 8) {
|
|
501
|
+
const blockRight = Math.max(wR.right, sR.right);
|
|
502
|
+
if (nR.right > blockRight + 1) {
|
|
503
|
+
errors.push(
|
|
504
|
+
'Home projects subtitle right (' + nR.right.toFixed(1) +
|
|
505
|
+
') past projects block right (' + blockRight.toFixed(1) + ') (PLT-AC-79)'
|
|
506
|
+
);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
// CR-22 / PLT-AC-81…85: B3 masthead, photo-bg hero, centered crops
|
|
516
|
+
{
|
|
517
|
+
const hero = document.querySelector('.home-band--hero');
|
|
518
|
+
const proj = document.querySelector('.home-band[data-home-kind="portfolio"]');
|
|
519
|
+
const title = document.querySelector('.home-hero-title');
|
|
520
|
+
const actions = document.querySelector('.home-hero-actions');
|
|
521
|
+
const plateImg = document.querySelector('.home-hero-plate img');
|
|
522
|
+
|
|
523
|
+
if (hero && proj && window.innerWidth >= 1024) {
|
|
524
|
+
const ledger = document.querySelector('.home-ledger');
|
|
525
|
+
const lb = ledger.getBoundingClientRect();
|
|
526
|
+
const mid = lb.left + lb.width / 2;
|
|
527
|
+
const pb = proj.getBoundingClientRect();
|
|
528
|
+
const hb = hero.getBoundingClientRect();
|
|
529
|
+
const delta = Math.abs(pb.left - mid);
|
|
530
|
+
if (delta > 1) {
|
|
531
|
+
errors.push('Projects left (' + pb.left.toFixed(1) + ') not within 1px of content mid (' + mid.toFixed(1) + ') Δ=' + delta.toFixed(1) + ' (PLT-AC-81)');
|
|
532
|
+
}
|
|
533
|
+
// Hero should occupy left half minus gutter (not wider than mid)
|
|
534
|
+
if (hb.right > mid + 1) {
|
|
535
|
+
errors.push('Hero right (' + hb.right.toFixed(1) + ') crosses content mid (' + mid.toFixed(1) + ') (PLT-AC-81)');
|
|
536
|
+
}
|
|
537
|
+
// Buttons on one line
|
|
538
|
+
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
|
+
const ctas = [...actions.querySelectorAll(':scope > .ledger-cta, :scope > .home-hero-cta, :scope > span > .ledger-cta, :scope > span > a')];
|
|
542
|
+
const ctaTops = new Set(ctas.filter(el => el.getBoundingClientRect().width > 4).map(el => Math.round(el.getBoundingClientRect().top)));
|
|
543
|
+
if (ctaTops.size > 1) {
|
|
544
|
+
errors.push('Hero CTAs wrap to ' + ctaTops.size + ' rows at desktop; expected one line (PLT-AC-82)');
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
// Portrait is background (absolute covering hero)
|
|
548
|
+
const portrait = document.querySelector('.home-hero-portrait');
|
|
549
|
+
if (portrait) {
|
|
550
|
+
const pcs = getComputedStyle(portrait);
|
|
551
|
+
if (pcs.position !== 'absolute') {
|
|
552
|
+
errors.push('Hero portrait position is ' + pcs.position + ', expected absolute background (PLT-AC-82)');
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
if (hero && window.innerWidth < 1024) {
|
|
558
|
+
const hb = hero.getBoundingClientRect();
|
|
559
|
+
if (Math.abs(hb.width - window.innerWidth) > 3) {
|
|
560
|
+
errors.push('Stacked hero width (' + hb.width.toFixed(1) + ') != viewport (' + window.innerWidth + ') (PLT-AC-83)');
|
|
561
|
+
}
|
|
562
|
+
if (title) {
|
|
563
|
+
const topSpace = title.getBoundingClientRect().top - hb.top;
|
|
564
|
+
if (topSpace > 120) {
|
|
565
|
+
errors.push('Stacked hero top spacing before name (' + topSpace.toFixed(1) + 'px) > 120px (PLT-AC-83)');
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
if (proj) {
|
|
569
|
+
const pb = proj.getBoundingClientRect();
|
|
570
|
+
if (pb.top + 2 < hb.bottom) {
|
|
571
|
+
errors.push('Projects not below stacked hero (PLT-AC-83)');
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
// Centered object-position on home crops (PLT-AC-85)
|
|
577
|
+
const cropImgs = document.querySelectorAll(
|
|
578
|
+
'.home-hero-plate img, .home-specimen-figure .ledger-poster img, .home-featured .ledger-poster img, .home-card-grid .ledger-poster img'
|
|
579
|
+
);
|
|
580
|
+
cropImgs.forEach((img, idx) => {
|
|
581
|
+
const op = getComputedStyle(img).objectPosition || '';
|
|
582
|
+
// Computed is typically "50% 50%" for center
|
|
583
|
+
const norm = op.trim().toLowerCase();
|
|
584
|
+
const ok = norm === 'center' || norm === '50% 50%' || /^50%\s+50%$/.test(norm);
|
|
585
|
+
if (!ok && img.getBoundingClientRect().width > 4) {
|
|
586
|
+
errors.push('Home crop #' + idx + ' object-position is "' + op + '", expected 50% 50% (PLT-AC-85)');
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
|
|
590
|
+
// Spotlight overlay present on portrait
|
|
591
|
+
if (hero) {
|
|
592
|
+
const portrait = document.querySelector('.home-hero-portrait');
|
|
593
|
+
if (portrait) {
|
|
594
|
+
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
|
+
const bg = after && after.backgroundImage;
|
|
599
|
+
if (bg && bg !== 'none') {
|
|
600
|
+
if (!/radial-gradient/i.test(bg)) {
|
|
601
|
+
errors.push('Hero spotlight ::after missing radial-gradient (PLT-AC-84)');
|
|
602
|
+
} else {
|
|
603
|
+
// Chromium often omits the default center ("at 50% 50%") when serializing.
|
|
604
|
+
// Fail only on an explicit non-center position keyword.
|
|
605
|
+
const atMatch = bg.match(/radial-gradient\([^)]*?\bat\s+([^,\)]+)/i);
|
|
606
|
+
if (atMatch) {
|
|
607
|
+
const pos = atMatch[1].trim().toLowerCase().replace(/\s+/g, ' ');
|
|
608
|
+
const centered = pos === '50% 50%' || pos === 'center' || pos === 'center center';
|
|
609
|
+
if (!centered) {
|
|
610
|
+
errors.push('Hero spotlight radial at "' + atMatch[1].trim() + '", expected 50% 50% (PLT-AC-84)');
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
// No "at …" ⇒ engine default center — OK (source CSS has at 50% 50%).
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
444
620
|
return { errors };
|
|
445
621
|
})()
|
|
446
622
|
`;
|
|
@@ -241,7 +241,10 @@ RETIRED_SHARDS = %w[
|
|
|
241
241
|
|
|
242
242
|
item(3) do
|
|
243
243
|
home = SHEETS["ledger/home.css"][:text]
|
|
244
|
-
|
|
244
|
+
# CR-22 reintroduces a functional spotlight radial on .home-hero-portrait::after
|
|
245
|
+
# (text contrast). Ban any other radial-gradient / blur pool in home.css.
|
|
246
|
+
home_wo_spotlight = home.gsub(/\.home-hero-portrait::after\s*\{.*?\}/m, "")
|
|
247
|
+
fail!("home.css still draws a radial-gradient pool") if home_wo_spotlight.include?("radial-gradient(")
|
|
245
248
|
fail!("home.css still blurs a pool (filter: blur)") if home.match?(/(?<![-\w])filter:\s*blur\(/)
|
|
246
249
|
keep = %w[_includes/page/site-footer.html _includes/home/band-index.html]
|
|
247
250
|
Dir[ROOT.join("{_layouts,_includes}/**/*.html").to_s].sort.each do |path|
|