pandorga 2.2.7 → 2.2.8
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 +6 -0
- data/_includes/home/band-listing.html +4 -0
- data/_layouts/home.html +63 -6
- data/assets/css/ledger/home.css +19 -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-regression-gate.mjs +70 -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: 63926eb2837e040aea7edb5ca12d99953ea35ae8d512ecdf5eeda900688b3b76
|
|
4
|
+
data.tar.gz: a531ec06e3ac101644cd09516298e818513dd55736f3dc4c1eec31579d8d7f55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cfdc81cdb0a2148901dd8095f8a9573a5f9a0d9f15fc25bde83d3d53a0659d4cb6e96ec182708a7e6ba0d8199dd7f11e0f4d87b998a45bc7ebb70fad3605fb6e
|
|
7
|
+
data.tar.gz: 0bb7c95a46cf5f4f01b881a3a111a3f268c31d499efa828b2946974f8e05d17d6a8aca0a758cd358a4e4d87d075cca55ca919271c3c2a603a84f46e833a9ae56
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [2.2.8] — 2026-10-29
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- 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.
|
|
10
|
+
|
|
5
11
|
## [2.2.7] — 2026-10-29
|
|
6
12
|
|
|
7
13
|
### 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
|
@@ -257,15 +257,40 @@ layout: shell
|
|
|
257
257
|
var specimenSlot = section.querySelector('[data-home-specimen]');
|
|
258
258
|
var inventorySlot = section.querySelector('[data-home-inventory]');
|
|
259
259
|
var systemTagHref = tagHrefFrom(list);
|
|
260
|
-
/*
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
/* CR-21f: limit_mobile (default 6) for the <900 strip; limit_desktop
|
|
261
|
+
(default all) for the ≥900 column. Legacy home.limit ignored for
|
|
262
|
+
portfolio when the dual attrs are present (always emitted). */
|
|
263
|
+
function parsePortfolioLimit(raw, fallback) {
|
|
264
|
+
if (raw == null || raw === '') return fallback;
|
|
265
|
+
var s = String(raw).trim().toLowerCase();
|
|
266
|
+
if (s === 'all' || s === 'unlimited' || s === 'inf' || s === 'infinity') {
|
|
267
|
+
return Infinity;
|
|
268
|
+
}
|
|
269
|
+
var n = parseInt(s, 10);
|
|
270
|
+
return (n > 0) ? n : fallback;
|
|
271
|
+
}
|
|
272
|
+
var limitMobile = parsePortfolioLimit(
|
|
273
|
+
section.getAttribute('data-home-limit-mobile'), 6
|
|
274
|
+
);
|
|
275
|
+
var limitDesktop = parsePortfolioLimit(
|
|
276
|
+
section.getAttribute('data-home-limit-desktop'), Infinity
|
|
277
|
+
);
|
|
278
|
+
var desktopMq = window.matchMedia('(min-width: 900px)');
|
|
279
|
+
function activePortfolioLimit() {
|
|
280
|
+
return desktopMq.matches ? limitDesktop : limitMobile;
|
|
281
|
+
}
|
|
282
|
+
function slicePortfolio(source) {
|
|
283
|
+
var take = activePortfolioLimit();
|
|
284
|
+
if (!isFinite(take)) return source.slice();
|
|
285
|
+
return source.slice(0, take);
|
|
286
|
+
}
|
|
287
|
+
var portfolio = slicePortfolio(entries);
|
|
263
288
|
if (!portfolio.length) {
|
|
264
289
|
runtime.Listing.showErrorState(list, 'Projects could not be loaded right now.');
|
|
265
290
|
return;
|
|
266
291
|
}
|
|
267
292
|
if (!specimenSlot || !inventorySlot) {
|
|
268
|
-
fill(list, portfolio
|
|
293
|
+
fill(list, portfolio, function (entry) {
|
|
269
294
|
return runtime.renderSystemCard(asItem(entry), {
|
|
270
295
|
href: entry.url || runtime.projectUrl(entry.slug),
|
|
271
296
|
tagHref: systemTagHref,
|
|
@@ -275,12 +300,13 @@ layout: shell
|
|
|
275
300
|
return;
|
|
276
301
|
}
|
|
277
302
|
|
|
278
|
-
var featuredPick = runtime.pickFeatured(
|
|
303
|
+
var featuredPick = runtime.pickFeatured(entries.map(asItem), {
|
|
279
304
|
storageKey: 'home-specimen-slug',
|
|
280
305
|
eligible: function () { return true; }
|
|
281
306
|
});
|
|
282
307
|
var selectedSlug = (featuredPick && featuredPick.slug) || portfolio[0].slug;
|
|
283
|
-
|
|
308
|
+
/* Mobile strip columns follow the visible count (≤ limit_mobile). */
|
|
309
|
+
var iconSlots = Math.min(portfolio.length, isFinite(limitMobile) ? limitMobile : portfolio.length);
|
|
284
310
|
|
|
285
311
|
function entryBySlug(slug) {
|
|
286
312
|
return portfolio.filter(function (entry) { return entry.slug === slug; })[0] || portfolio[0];
|
|
@@ -456,6 +482,37 @@ layout: shell
|
|
|
456
482
|
await afterPaint();
|
|
457
483
|
paintInventory();
|
|
458
484
|
|
|
485
|
+
function refreshPortfolioForViewport() {
|
|
486
|
+
portfolio = slicePortfolio(entries);
|
|
487
|
+
iconSlots = Math.min(
|
|
488
|
+
portfolio.length,
|
|
489
|
+
isFinite(limitMobile) ? limitMobile : portfolio.length
|
|
490
|
+
);
|
|
491
|
+
var stillVisible = false;
|
|
492
|
+
for (var i = 0; i < portfolio.length; i += 1) {
|
|
493
|
+
if (portfolio[i].slug === selectedSlug) {
|
|
494
|
+
stillVisible = true;
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
if (!stillVisible) selectedSlug = portfolio[0].slug;
|
|
499
|
+
return lockSpecimenHeight().then(function () {
|
|
500
|
+
return paintSpecimen(entryBySlug(selectedSlug));
|
|
501
|
+
}).then(function () {
|
|
502
|
+
paintInventory();
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
if (typeof desktopMq.addEventListener === 'function') {
|
|
507
|
+
desktopMq.addEventListener('change', function () {
|
|
508
|
+
refreshPortfolioForViewport();
|
|
509
|
+
});
|
|
510
|
+
} else if (typeof desktopMq.addListener === 'function') {
|
|
511
|
+
desktopMq.addListener(function () {
|
|
512
|
+
refreshPortfolioForViewport();
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
|
|
459
516
|
var resizeTimer = null;
|
|
460
517
|
var lastMeasureWidth = Math.round(specimenSlot.getBoundingClientRect().width);
|
|
461
518
|
window.addEventListener('resize', function () {
|
data/assets/css/ledger/home.css
CHANGED
|
@@ -1348,6 +1348,25 @@ button.home-project-inventory-row {
|
|
|
1348
1348
|
|
|
1349
1349
|
@media (min-width: 900px) {
|
|
1350
1350
|
|
|
1351
|
+
/* CR-21f: home Projects section note (subtitle under the title) must not
|
|
1352
|
+
extend past the projects block (inventory column + gap + specimen card).
|
|
1353
|
+
Tokens mirror the bench plate/card sizing; specimen card children unchanged. */
|
|
1354
|
+
.home-band[data-home-kind="portfolio"] {
|
|
1355
|
+
--home-icon-btn-size: 2.75rem;
|
|
1356
|
+
--home-specimen-plate-height: 12.25rem;
|
|
1357
|
+
--home-specimen-plate-width: calc(var(--home-specimen-plate-height) * 16 / 9);
|
|
1358
|
+
--home-specimen-max-width: calc(var(--home-specimen-plate-width) + 2 * var(--space-md));
|
|
1359
|
+
--home-projects-block-width: calc(
|
|
1360
|
+
var(--home-icon-btn-size)
|
|
1361
|
+
+ calc(var(--space-xs) * 2)
|
|
1362
|
+
+ var(--home-specimen-max-width)
|
|
1363
|
+
);
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
.home-band[data-home-kind="portfolio"] .home-section-note {
|
|
1367
|
+
max-width: var(--home-projects-block-width);
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1351
1370
|
/* Inventory left of specimen, flush to card (gap ≤ 2× button gap);
|
|
1352
1371
|
column width = button width; plate 16:9 at ~215.6×383.3 (+25% CR-21e);
|
|
1353
1372
|
card hugs plate + padding; visible Explore label removed (CR-21d). */
|
|
@@ -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.2.
|
|
27
|
+
# GitHub tag: gem "pandorga", github: "alexandrelheinen/pandorga", tag: "v2.2.8"
|
|
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
|
@@ -247,7 +247,7 @@ 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 glyph/border/specimen + 16:9/label/gap (PLT-AC-75/76/77)
|
|
250
|
+
// 6. CR-21b/c/d/e/f glyph/border/specimen + 16:9/label/gap + dual limits/subtitle (PLT-AC-75/76/77/78/79)
|
|
251
251
|
{
|
|
252
252
|
const bench = document.querySelector('.home-projects-bench');
|
|
253
253
|
const rows = document.querySelectorAll('.home-project-inventory-row');
|
|
@@ -441,6 +441,75 @@ const ASSERT_EXPRESSION = `
|
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
+
// CR-21f / PLT-AC-79: dual portfolio limits + home projects subtitle ≤ block
|
|
445
|
+
{
|
|
446
|
+
const section = document.querySelector('.home-band[data-home-kind="portfolio"]');
|
|
447
|
+
if (section) {
|
|
448
|
+
const limM = (section.getAttribute('data-home-limit-mobile') || '').trim();
|
|
449
|
+
const limD = (section.getAttribute('data-home-limit-desktop') || '').trim().toLowerCase();
|
|
450
|
+
const mobileN = parseInt(limM, 10);
|
|
451
|
+
if (!(mobileN > 0)) {
|
|
452
|
+
errors.push('data-home-limit-mobile is "' + limM + '", expected positive int (default 6) (PLT-AC-79)');
|
|
453
|
+
}
|
|
454
|
+
if (!(limD === 'all' || limD === 'unlimited' || parseInt(limD, 10) > 0)) {
|
|
455
|
+
errors.push('data-home-limit-desktop is "' + limD + '", expected all|unlimited|positive int (PLT-AC-79)');
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
const rows = section.querySelectorAll('.home-project-inventory-row');
|
|
459
|
+
let totalProjects = 0;
|
|
460
|
+
try {
|
|
461
|
+
const xhr = new XMLHttpRequest();
|
|
462
|
+
xhr.open('GET', '/data/writing_index.json', false);
|
|
463
|
+
xhr.send(null);
|
|
464
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
465
|
+
const index = JSON.parse(xhr.responseText);
|
|
466
|
+
const col = section.getAttribute('data-home-collection') || 'projects';
|
|
467
|
+
totalProjects = (Array.isArray(index) ? index : []).filter(function (e) {
|
|
468
|
+
return e && e.collection === col;
|
|
469
|
+
}).length;
|
|
470
|
+
}
|
|
471
|
+
} catch (e) { /* ignore — count asserts skipped if index missing */ }
|
|
472
|
+
|
|
473
|
+
if (totalProjects > 0 && rows.length > 0) {
|
|
474
|
+
if (window.innerWidth >= 900) {
|
|
475
|
+
const expectDesktop = (limD === 'all' || limD === 'unlimited')
|
|
476
|
+
? totalProjects
|
|
477
|
+
: Math.min(totalProjects, parseInt(limD, 10));
|
|
478
|
+
if (rows.length !== expectDesktop) {
|
|
479
|
+
errors.push('Desktop inventory rows (' + rows.length + ') !== expected ' + expectDesktop + ' (PLT-AC-79)');
|
|
480
|
+
}
|
|
481
|
+
} else {
|
|
482
|
+
const cap = mobileN > 0 ? mobileN : 6;
|
|
483
|
+
if (rows.length > cap) {
|
|
484
|
+
errors.push('Mobile inventory rows (' + rows.length + ') > limit_mobile ' + cap + ' (PLT-AC-79)');
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
if (window.innerWidth >= 900) {
|
|
490
|
+
const note = section.querySelector('.home-section-note');
|
|
491
|
+
const wrap = section.querySelector('.home-projects-inventory-wrap');
|
|
492
|
+
const specimen = section.querySelector('.home-project-specimen')
|
|
493
|
+
|| section.querySelector('[data-home-specimen] > *')
|
|
494
|
+
|| section.querySelector('[data-home-specimen]');
|
|
495
|
+
if (note && wrap && specimen) {
|
|
496
|
+
const nR = note.getBoundingClientRect();
|
|
497
|
+
const wR = wrap.getBoundingClientRect();
|
|
498
|
+
const sR = specimen.getBoundingClientRect();
|
|
499
|
+
if (nR.width > 8 && sR.width > 8) {
|
|
500
|
+
const blockRight = Math.max(wR.right, sR.right);
|
|
501
|
+
if (nR.right > blockRight + 1) {
|
|
502
|
+
errors.push(
|
|
503
|
+
'Home projects subtitle right (' + nR.right.toFixed(1) +
|
|
504
|
+
') past projects block right (' + blockRight.toFixed(1) + ') (PLT-AC-79)'
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
444
513
|
return { errors };
|
|
445
514
|
})()
|
|
446
515
|
`;
|