pandorga 2.2.6 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef6153a25ab7b1fa90afeb9854f638af617c7a7e2469e642c44e997444a285e2
4
- data.tar.gz: 0c58e4df254adb1aa931699004999afce2a09d282ef902d6ebf6f2c355d461a1
3
+ metadata.gz: 63926eb2837e040aea7edb5ca12d99953ea35ae8d512ecdf5eeda900688b3b76
4
+ data.tar.gz: a531ec06e3ac101644cd09516298e818513dd55736f3dc4c1eec31579d8d7f55
5
5
  SHA512:
6
- metadata.gz: ea9144c3180afbb419a78e50295897b902365f867a00a2413b97be5eef8051126fbfed085a2f9a3409e01cedb2fd7ba707dceb8cd861c4a175ae5d7d777f6cdf
7
- data.tar.gz: 8318504a597f7baace4fe7591e5d617507040c79c08cd45854c1c627c336d57cd24a27799c95eb0700c420ffa3298c9716528cc4b474414e968d170f6b971531
6
+ metadata.gz: cfdc81cdb0a2148901dd8095f8a9573a5f9a0d9f15fc25bde83d3d53a0659d4cb6e96ec182708a7e6ba0d8199dd7f11e0f4d87b998a45bc7ebb70fad3605fb6e
7
+ data.tar.gz: 0bb7c95a46cf5f4f01b881a3a111a3f268c31d499efa828b2946974f8e05d17d6a8aca0a758cd358a4e4d87d075cca55ca919271c3c2a603a84f46e833a9ae56
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
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
+
11
+ ## [2.2.7] — 2026-10-29
12
+
13
+ ### Changed
14
+
15
+ - CR-21e: Desktop Explore specimen (≥900px) plate +25% to ~383.3×215.6 (exact 16:9); card width follows plate + padding; specimen meta/title/copy/chips/footer type −2pt. Inventory glyphs and CR-21d column/label rules unchanged. Mobile unchanged (PLT-AC-78).
16
+
5
17
  ## [2.2.6] — 2026-10-29
6
18
 
7
19
  ### 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
- /* Selector strip is sized for six icon buttons on mobile; take up to
261
- six projects even when home.limit is lower. */
262
- var portfolio = entries.slice(0, Math.max(limit, 6));
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.slice(0, limit), function (entry) {
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(portfolio.map(asItem), {
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
- var iconSlots = Math.min(portfolio.length, 6);
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 () {
@@ -1348,11 +1348,30 @@ 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
- column width = button width; plate 16:9 at ~172.5×306.7; card hugs
1353
- plate + padding; visible Explore label removed (CR-21d). */
1371
+ column width = button width; plate 16:9 at ~215.6×383.3 (+25% CR-21e);
1372
+ card hugs plate + padding; visible Explore label removed (CR-21d). */
1354
1373
  .home-projects-bench {
1355
- --home-specimen-plate-height: 9.8rem; /* ~172.5px at 17.6 root */
1374
+ --home-specimen-plate-height: 12.25rem; /* ~215.6px at 17.6 root (+25% vs 2.2.6) */
1356
1375
  --home-specimen-plate-width: calc(var(--home-specimen-plate-height) * 16 / 9);
1357
1376
  --home-specimen-max-width: calc(var(--home-specimen-plate-width) + 2 * var(--space-md));
1358
1377
  display: grid;
@@ -1446,6 +1465,31 @@ button.home-project-inventory-row {
1446
1465
  margin-left: auto;
1447
1466
  flex: 0 1 auto;
1448
1467
  }
1468
+
1469
+ /* CR-21e: specimen card type −2pt (desktop only). Inventory glyphs untouched. */
1470
+ .home-specimen-strip .ledger-meta,
1471
+ .home-specimen-strip > .ledger-status {
1472
+ font-size: calc(var(--type-label-lg) - 2pt);
1473
+ }
1474
+
1475
+ .home-project-specimen .home-specimen-title,
1476
+ .home-project-specimen .ledger-card-title {
1477
+ font-size: calc(var(--type-card-lg) - 2pt);
1478
+ }
1479
+
1480
+ .home-project-specimen .ledger-card-copy {
1481
+ font-size: calc(var(--type-body) - 2pt);
1482
+ }
1483
+
1484
+ .home-project-specimen .ledger-chip {
1485
+ font-size: calc(var(--type-cta) - 2pt);
1486
+ }
1487
+
1488
+ .home-specimen-foot .ledger-cta,
1489
+ .home-specimen-foot .home-specimen-open,
1490
+ .home-project-specimen .home-specimen-open {
1491
+ font-size: calc(var(--type-cta) - 2pt);
1492
+ }
1449
1493
  }
1450
1494
 
1451
1495
  /* ── Reference band: Sources + Network of Ideas ──────────────────────────
@@ -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.6"
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`"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pandorga
4
- VERSION = "2.2.6"
4
+ VERSION = "2.2.8"
5
5
  end
@@ -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');
@@ -323,24 +323,55 @@ const ASSERT_EXPRESSION = `
323
323
  const specimen = document.querySelector('.home-project-specimen');
324
324
  if (specimen) {
325
325
  const sw = specimen.getBoundingClientRect().width;
326
- if (sw > 450) {
327
- errors.push('Specimen width (' + sw.toFixed(2) + 'px) exceeds ~plate+padding cap (~450) (PLT-AC-77)');
326
+ if (sw > 460) {
327
+ errors.push('Specimen width (' + sw.toFixed(2) + 'px) exceeds ~plate+padding cap (~460) (PLT-AC-78)');
328
328
  }
329
329
  const plate = specimen.querySelector('.home-specimen-figure > .ledger-poster, .home-specimen-figure > .projects-plate');
330
330
  if (plate) {
331
331
  const pr = plate.getBoundingClientRect();
332
332
  const ph = pr.height;
333
333
  const pw = pr.width;
334
- // CR-21d: ~172.5px height (9.8rem), 16:9 → ~306.7 wide (allow ±12px)
335
- if (ph < 160 || ph > 185) {
336
- errors.push('Specimen plate height (' + ph.toFixed(2) + 'px) not in 160–185px band (~172.5 target) (PLT-AC-77)');
334
+ // CR-21e: +25% vs 2.2.6 → ~215.6×383.3 (12.25rem), 16:9
335
+ if (ph < 200 || ph > 230) {
336
+ errors.push('Specimen plate height (' + ph.toFixed(2) + 'px) not in 200–230px band (~215.6 target) (PLT-AC-78)');
337
337
  }
338
338
  const expectW = ph * 16 / 9;
339
- if (Math.abs(pw - expectW) > 12 && Math.abs(pw - 306.7) > 12) {
340
- errors.push('Specimen plate width (' + pw.toFixed(2) + 'px) not ~16:9 of height (expect ~' + expectW.toFixed(1) + ') (PLT-AC-77)');
339
+ if (Math.abs(pw - expectW) > 12 && Math.abs(pw - 383.3) > 12) {
340
+ errors.push('Specimen plate width (' + pw.toFixed(2) + 'px) not ~16:9 of height (expect ~' + expectW.toFixed(1) + ') (PLT-AC-78)');
341
341
  }
342
342
  }
343
343
 
344
+ // CR-21e: specimen card type −2pt vs token baseline
345
+ {
346
+ const pt = 2 * (96 / 72);
347
+ const parseToken = (raw) => {
348
+ raw = (raw || '').trim();
349
+ let v = parseFloat(raw);
350
+ if (!isFinite(v)) return null;
351
+ if (raw.endsWith('rem')) v *= rootFs;
352
+ return v;
353
+ };
354
+ 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' }
360
+ ];
361
+ const root = document.documentElement;
362
+ checks.forEach((c) => {
363
+ const el = document.querySelector(c.sel);
364
+ if (!el) return;
365
+ const base = parseToken(getComputedStyle(root).getPropertyValue(c.token));
366
+ if (base == null) return;
367
+ const expect = base - pt;
368
+ const got = parseFloat(getComputedStyle(el).fontSize);
369
+ 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-78)');
371
+ }
372
+ });
373
+ }
374
+
344
375
  // CR-21d: column flush to card; wrap/inventory width == button width
345
376
  const wrap = document.querySelector('.home-projects-inventory-wrap');
346
377
  const inv = document.querySelector('.home-project-inventory');
@@ -410,6 +441,75 @@ const ASSERT_EXPRESSION = `
410
441
  });
411
442
  }
412
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
+
413
513
  return { errors };
414
514
  })()
415
515
  `;
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.2.6
4
+ version: 2.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Pandorga contributors