pandorga 1.10.2 → 1.11.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 +26 -0
- data/DESIGN.md +7 -5
- data/_includes/home/band-listing.html +3 -5
- data/_layouts/home.html +4 -15
- data/assets/css/ledger/home.css +47 -42
- data/lib/pandorga/commands/new.rb +1 -1
- data/lib/pandorga/version.rb +1 -1
- data/scripts/test/test-css-structure.rb +38 -3
- data/scripts/test/test-home-band-intro.rb +97 -0
- data/scripts/validate.sh +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d3adc84d250c4ff140df5b9cc9db266896fdfce92fd899789fd943ce8ac4659
|
|
4
|
+
data.tar.gz: 474d788dea7851796fb189732c9bb75d118666177f4cf81df70d8361f4310872
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9e76b0be8485c3870366cce0bc816fc55f3dee7ea2b17ec40602f2c70dccbf985e2d7be6da7911e54a7f830c6fd3c4030dbb985689d50c84cb9226c04cd0f2e
|
|
7
|
+
data.tar.gz: 6853fe1a1d0edd4066d45187a4cddd67258a753afd849284615383fb9cae4844a24aabff188681a73066e2808170bfc1e28730832e68d976c34400899d2cea88
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
## [1.11.0] — 2026-10-19
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Home listing bands keep their kicker and note on sites built with
|
|
10
|
+
`shell_content_agnostic: true`; the slots are always in the HTML and the
|
|
11
|
+
runtime fills them from `pages/headers.json` (regression from 1.10.0)
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- On the home projects bench at or above 900px, the specimen column takes 35%
|
|
16
|
+
of the band (at least 20rem) and the filing rack 45% (at least 21rem) across
|
|
17
|
+
one `--space-xl` column gap from the band's left edge, keeping the 16:9
|
|
18
|
+
plate at 60% of its previous height. The specimen sets the bench height (the
|
|
19
|
+
tallest project), and the rack rows share that height, each capped at 1.6
|
|
20
|
+
times its minimum
|
|
21
|
+
- Below 900px the project icon-strip glyphs and the plate badge glyph grow to
|
|
22
|
+
1.375rem
|
|
23
|
+
- The home project specimen title uses `--type-section` from 900px and
|
|
24
|
+
`--type-card-lg` below it; inventory rack titles use `--type-card`
|
|
25
|
+
- The home specimen meta strip wraps instead of clipping on narrow viewports
|
|
26
|
+
- The home hero summary uses `--color-legend`, the same ink as the other
|
|
27
|
+
description texts
|
|
28
|
+
|
|
3
29
|
## [1.10.2] — 2026-10-16
|
|
4
30
|
|
|
5
31
|
### Changed
|
data/DESIGN.md
CHANGED
|
@@ -941,13 +941,15 @@ Letter-spacing in use, by frequency: `0.1em` (12), `0.08em` (10), `0.12em` (7),
|
|
|
941
941
|
icon plate, the name's initial standing in for a missing icon; the title
|
|
942
942
|
always below the plate; a tagline clamped to the
|
|
943
943
|
height the plate leaves; tags, outbound links and an emphasis "Open
|
|
944
|
-
project" cue). From 900px
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
944
|
+
project" cue). From 900px the specimen and a `panelContrast` filing rack
|
|
945
|
+
take 35% and 45% of the band across a `--space-xl` gap, from its left edge;
|
|
946
|
+
rack rows are equal-flex
|
|
947
|
+
cards (square icon mark, code line, title; the selected one steps to
|
|
948
|
+
`surfaceHigh` with a 3px `primary` inset rule) that share the specimen's
|
|
949
|
+
height. Rack click swaps the specimen
|
|
948
950
|
in place; specimen click opens the project. Below 900px the rack is an
|
|
949
951
|
icon strip above the specimen, one equal column per project (up to six)
|
|
950
|
-
so it spans the band. Contract: `PLT-AC-13`–`17` in
|
|
952
|
+
so it spans the band, with 1.375rem glyphs. Contract: `PLT-AC-13`–`17` in
|
|
951
953
|
`templates/portfolio/README.md`. Below 768px the hero portrait runs to the screen edge, pulled
|
|
952
954
|
out of the band's gutter by exactly `--gutter-mobile` on each side and losing
|
|
953
955
|
its side hairlines, which at the edge would read as a frame cut off.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{%- comment -%}
|
|
2
2
|
One homepage listing band. Expects `band` from site.data.pandorga_home_bands.
|
|
3
|
-
|
|
3
|
+
Kicker and note slots are always emitted, prefilled from headers.yml when it
|
|
4
|
+
was read at build time and filled by the runtime otherwise (PLT-AC-42).
|
|
5
|
+
Listing slots are filled by the home layout script from writing_index.json.
|
|
4
6
|
{%- endcomment -%}
|
|
5
7
|
{%- assign _accent = band.accent -%}
|
|
6
8
|
{%- assign _limit = band.home.limit | default: 3 -%}
|
|
@@ -28,13 +30,9 @@
|
|
|
28
30
|
{%- if _section.title != blank -%}{%- assign _title = _section.title -%}{%- endif -%}
|
|
29
31
|
<div class="ledger-section-banner" data-content-home-section="{{ band.section_key }}">
|
|
30
32
|
<div class="ledger-section-lead">
|
|
31
|
-
{%- if _section.kicker != blank -%}
|
|
32
33
|
<span class="ledger-kicker" data-content-section-kicker>{{ _section.kicker }}</span>
|
|
33
|
-
{%- endif -%}
|
|
34
34
|
<h2 class="section-title" data-content-section-title>{{ _title }}</h2>
|
|
35
|
-
{%- if _section.note != blank -%}
|
|
36
35
|
<p class="home-section-note font-body" data-content-section-note>{{ _section.note }}</p>
|
|
37
|
-
{%- endif -%}
|
|
38
36
|
</div>
|
|
39
37
|
<div class="home-section-aside">
|
|
40
38
|
<a class="ledger-cta" href="{{ _path }}">
|
data/_layouts/home.html
CHANGED
|
@@ -401,21 +401,10 @@ layout: shell
|
|
|
401
401
|
if (!bench) return;
|
|
402
402
|
bench.style.setProperty('--home-project-icon-count', String(iconSlots));
|
|
403
403
|
var tallest = await measureTallestSpecimen();
|
|
404
|
-
/*
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
.getPropertyValue('--home-inventory-min-height').trim();
|
|
409
|
-
if (raw) {
|
|
410
|
-
var probe = document.createElement('div');
|
|
411
|
-
probe.style.cssText = 'position:absolute;visibility:hidden;height:' + raw;
|
|
412
|
-
bench.appendChild(probe);
|
|
413
|
-
inventoryMin = Math.ceil(probe.getBoundingClientRect().height);
|
|
414
|
-
probe.remove();
|
|
415
|
-
}
|
|
416
|
-
var locked = inventoryMin > 0 ? inventoryMin : tallest;
|
|
417
|
-
if (locked > 0) {
|
|
418
|
-
bench.style.setProperty('--home-specimen-height', locked + 'px');
|
|
404
|
+
/* Every breakpoint locks the specimen to the tallest project; from
|
|
405
|
+
900px the rack rows share that height. */
|
|
406
|
+
if (tallest > 0) {
|
|
407
|
+
bench.style.setProperty('--home-specimen-height', tallest + 'px');
|
|
419
408
|
}
|
|
420
409
|
}
|
|
421
410
|
|
data/assets/css/ledger/home.css
CHANGED
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
|
|
309
309
|
.home-hero-summary {
|
|
310
310
|
max-width: var(--reading-measure, 45rem);
|
|
311
|
-
color: var(--color-
|
|
311
|
+
color: var(--color-legend);
|
|
312
312
|
line-height: var(--leading-body);
|
|
313
313
|
}
|
|
314
314
|
|
|
@@ -1035,10 +1035,11 @@ html[data-theme="light"] .home-hero-plate {
|
|
|
1035
1035
|
the inventory. Taglines clamp to two lines with an ellipsis; chips wrap
|
|
1036
1036
|
whole pills like the projects index; spare height parks chips and the foot
|
|
1037
1037
|
on the floor. Every plate is 16:9, the ratio the thumbnails are drawn at,
|
|
1038
|
-
with the title below it. From 900px the specimen
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1038
|
+
with the title below it. From 900px the specimen column takes 35% of the
|
|
1039
|
+
band (at least 20rem) and the rack 45% (at least 21rem) across one
|
|
1040
|
+
`--space-xl` column gap, starting at the band's left edge, and the rack
|
|
1041
|
+
rows share the specimen height. Below 900px the rack is an icon strip
|
|
1042
|
+
above the specimen, one column per project. */
|
|
1042
1043
|
.home-projects-bench {
|
|
1043
1044
|
--home-specimen-height: 32rem;
|
|
1044
1045
|
--home-icon-btn-size: 2.75rem;
|
|
@@ -1101,10 +1102,18 @@ html[data-theme="light"] .home-hero-plate {
|
|
|
1101
1102
|
letter-spacing: 0.03em;
|
|
1102
1103
|
}
|
|
1103
1104
|
|
|
1105
|
+
/* The specimen strip flows as text, so a long label wraps between words
|
|
1106
|
+
instead of clipping the start year on a phone. */
|
|
1104
1107
|
.home-specimen-strip .ledger-meta {
|
|
1108
|
+
display: block;
|
|
1109
|
+
white-space: normal;
|
|
1105
1110
|
font-size: var(--type-label-lg);
|
|
1106
1111
|
}
|
|
1107
1112
|
|
|
1113
|
+
.home-specimen-strip .ledger-meta-sep {
|
|
1114
|
+
margin-inline: var(--space-sm);
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1108
1117
|
.home-specimen-folio,
|
|
1109
1118
|
.home-project-inventory-index {
|
|
1110
1119
|
color: var(--color-primary);
|
|
@@ -1205,6 +1214,22 @@ html[data-theme="light"] .home-hero-plate {
|
|
|
1205
1214
|
color: var(--color-primary);
|
|
1206
1215
|
}
|
|
1207
1216
|
|
|
1217
|
+
@media (max-width: 899px) {
|
|
1218
|
+
.home-specimen-figure:has(> .ledger-poster)>.home-specimen-badge {
|
|
1219
|
+
font-size: 1.375rem;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
/* Two classes: the Material Symbols sheet loads after this one and resets
|
|
1223
|
+
the glyph size on a single class. */
|
|
1224
|
+
.home-project-inventory-row .home-project-inventory-glyph {
|
|
1225
|
+
font-size: 1.375rem;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
.home-project-inventory-row .home-project-inventory-glyph--initial {
|
|
1229
|
+
font-size: var(--type-card);
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1208
1233
|
.home-project-specimen .home-specimen-title {
|
|
1209
1234
|
margin: 0;
|
|
1210
1235
|
font-size: var(--type-card-lg);
|
|
@@ -1363,23 +1388,22 @@ button.home-project-inventory-row {
|
|
|
1363
1388
|
|
|
1364
1389
|
@media (min-width: 900px) {
|
|
1365
1390
|
|
|
1366
|
-
/*
|
|
1367
|
-
|
|
1368
|
-
|
|
1391
|
+
/* The specimen column is 35% of the band (at least 20rem), which keeps the
|
|
1392
|
+
16:9 plate at 60% of the 7:5 split's height; the rack is 45% (at least
|
|
1393
|
+
21rem); the pair starts at the band's left edge and leaves the rest of
|
|
1394
|
+
the row blank. The specimen sets the bench height; rack rows share it. */
|
|
1369
1395
|
.home-projects-bench {
|
|
1370
|
-
--home-inventory-mark-size:
|
|
1396
|
+
--home-inventory-mark-size: 3rem;
|
|
1371
1397
|
--home-inventory-row-min: calc(
|
|
1372
1398
|
var(--home-inventory-mark-size) + 2 * var(--space-sm) + 2px
|
|
1373
1399
|
);
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
2 * var(--space-md)
|
|
1378
|
-
);
|
|
1379
|
-
--home-specimen-height: var(--home-inventory-min-height);
|
|
1400
|
+
/* Rows share the specimen height, but a short rack must not stretch a
|
|
1401
|
+
single row to the full plate. */
|
|
1402
|
+
--home-inventory-row-max: calc(1.6 * var(--home-inventory-row-min));
|
|
1380
1403
|
display: grid;
|
|
1381
|
-
grid-template-columns:
|
|
1404
|
+
grid-template-columns: max(35%, 20rem) max(45%, 21rem);
|
|
1382
1405
|
column-gap: var(--space-xl);
|
|
1406
|
+
justify-content: start;
|
|
1383
1407
|
align-items: stretch;
|
|
1384
1408
|
}
|
|
1385
1409
|
|
|
@@ -1390,6 +1414,7 @@ button.home-project-inventory-row {
|
|
|
1390
1414
|
gap: var(--space-sm);
|
|
1391
1415
|
box-sizing: border-box;
|
|
1392
1416
|
width: 100%;
|
|
1417
|
+
min-height: var(--home-specimen-height);
|
|
1393
1418
|
min-width: 0;
|
|
1394
1419
|
min-height: 0;
|
|
1395
1420
|
overflow: hidden;
|
|
@@ -1397,38 +1422,18 @@ button.home-project-inventory-row {
|
|
|
1397
1422
|
background: var(--color-panel-contrast);
|
|
1398
1423
|
}
|
|
1399
1424
|
|
|
1400
|
-
.home-specimen-figure:has(> .ledger-poster, > .projects-plate) {
|
|
1401
|
-
flex: 1 1 0;
|
|
1402
|
-
min-height: 0;
|
|
1403
|
-
grid-template-rows: minmax(0, 1fr) auto;
|
|
1404
|
-
gap: var(--space-sm);
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
.home-specimen-figure > .ledger-poster,
|
|
1408
|
-
.home-specimen-figure > .projects-plate {
|
|
1409
|
-
height: 100%;
|
|
1410
|
-
min-height: 0;
|
|
1411
|
-
aspect-ratio: auto;
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
1425
|
.home-project-specimen .home-specimen-title {
|
|
1415
|
-
font-size: var(--type-
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
.home-project-specimen .ledger-card-copy {
|
|
1419
|
-
flex: 0 0 auto;
|
|
1420
|
-
height: auto;
|
|
1421
|
-
min-height: 0;
|
|
1422
|
-
max-height: calc(var(--type-body) * var(--leading-body) * 2);
|
|
1426
|
+
font-size: var(--type-section);
|
|
1423
1427
|
}
|
|
1424
1428
|
|
|
1425
1429
|
.home-project-inventory-row {
|
|
1426
|
-
flex:
|
|
1430
|
+
flex: 1 1 0;
|
|
1427
1431
|
align-items: center;
|
|
1428
1432
|
justify-content: flex-start;
|
|
1429
1433
|
gap: var(--space-md);
|
|
1430
|
-
height:
|
|
1434
|
+
height: auto;
|
|
1431
1435
|
min-height: var(--home-inventory-row-min);
|
|
1436
|
+
max-height: var(--home-inventory-row-max);
|
|
1432
1437
|
box-sizing: border-box;
|
|
1433
1438
|
padding: var(--space-sm) var(--space-md);
|
|
1434
1439
|
border: 1px solid var(--border-gentle-divider);
|
|
@@ -1506,7 +1511,7 @@ button.home-project-inventory-row {
|
|
|
1506
1511
|
.home-project-inventory-title {
|
|
1507
1512
|
margin: 0;
|
|
1508
1513
|
font-family: var(--font-content-title);
|
|
1509
|
-
font-size:
|
|
1514
|
+
font-size: var(--type-card);
|
|
1510
1515
|
font-weight: var(--weight-title);
|
|
1511
1516
|
line-height: 1.2;
|
|
1512
1517
|
color: var(--color-on-surface);
|
|
@@ -1862,7 +1867,7 @@ button.home-project-inventory-row {
|
|
|
1862
1867
|
margin-top: 0;
|
|
1863
1868
|
font-size: var(--type-body);
|
|
1864
1869
|
line-height: var(--leading-body);
|
|
1865
|
-
color: var(--color-
|
|
1870
|
+
color: var(--color-legend);
|
|
1866
1871
|
}
|
|
1867
1872
|
|
|
1868
1873
|
.home-hero-summary p {
|
|
@@ -24,7 +24,7 @@ module Pandorga
|
|
|
24
24
|
|
|
25
25
|
gem "pandorga", "~> 1.3"
|
|
26
26
|
# Local checkout: gem "pandorga", path: "../pandorga"
|
|
27
|
-
# GitHub tag: gem "pandorga", github: "alexandrelheinen/pandorga", tag: "v1.
|
|
27
|
+
# GitHub tag: gem "pandorga", github: "alexandrelheinen/pandorga", tag: "v1.11.0"
|
|
28
28
|
gem "csv"
|
|
29
29
|
gem "base64"
|
|
30
30
|
RUBY
|
data/lib/pandorga/version.rb
CHANGED
|
@@ -227,8 +227,11 @@ sheets.each do |path|
|
|
|
227
227
|
end
|
|
228
228
|
|
|
229
229
|
# PLT-AC-41. Home project inventory rows use the square icon mark, two-line
|
|
230
|
-
# code + title body, and no tagline preview or attached-resource icons;
|
|
231
|
-
# desktop specimen
|
|
230
|
+
# code + title body, and no tagline preview or attached-resource icons; on
|
|
231
|
+
# desktop the specimen (35%, min 20rem) and rack (45%, min 21rem) start at the
|
|
232
|
+
# band's left edge across one --space-xl gap, the specimen sets the bench
|
|
233
|
+
# height, rack titles use --type-card, the specimen strip wraps instead of
|
|
234
|
+
# clipping, and below 900px the rack tile glyphs are 1.375rem.
|
|
232
235
|
home_sheet = strip_comments(File.read(CSS_ROOT.join("ledger/home.css")))
|
|
233
236
|
%w[
|
|
234
237
|
home-project-inventory-copy
|
|
@@ -245,8 +248,40 @@ require_declarations(
|
|
|
245
248
|
)
|
|
246
249
|
require_declarations(
|
|
247
250
|
errors, "assets/css/ledger/home.css", home_sheet,
|
|
248
|
-
".home-projects-bench", ["--home-
|
|
251
|
+
".home-projects-bench", ["grid-template-columns: max(35%, 20rem) max(45%, 21rem)", "column-gap: var(--space-xl)", "justify-content: start", "--home-inventory-row-max: calc(1.6 * var(--home-inventory-row-min))"]
|
|
249
252
|
)
|
|
253
|
+
require_declarations(
|
|
254
|
+
errors, "assets/css/ledger/home.css", home_sheet,
|
|
255
|
+
".home-specimen-strip .ledger-meta", ["display: block", "white-space: normal"]
|
|
256
|
+
)
|
|
257
|
+
require_declarations(
|
|
258
|
+
errors, "assets/css/ledger/home.css", home_sheet,
|
|
259
|
+
".home-project-inventory-title", ["font-size: var(--type-card)"]
|
|
260
|
+
)
|
|
261
|
+
require_declarations(
|
|
262
|
+
errors, "assets/css/ledger/home.css", home_sheet,
|
|
263
|
+
".home-project-inventory-row .home-project-inventory-glyph", ["font-size: 1.375rem"]
|
|
264
|
+
)
|
|
265
|
+
[
|
|
266
|
+
"45.6%",
|
|
267
|
+
"minmax(0, 7fr)",
|
|
268
|
+
"--home-inventory-min-height",
|
|
269
|
+
"calc(var(--type-card) - 2pt)"
|
|
270
|
+
].each do |forbidden_home|
|
|
271
|
+
if home_sheet.include?(forbidden_home)
|
|
272
|
+
errors << "assets/css/ledger/home.css: #{forbidden_home} must be removed (PLT-AC-41)"
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# PLT-AC-23. The home hero summary uses --color-legend, the ink of the other
|
|
277
|
+
# description texts.
|
|
278
|
+
require_declarations(
|
|
279
|
+
errors, "assets/css/ledger/home.css", home_sheet,
|
|
280
|
+
".home-hero-summary", ["color: var(--color-legend)"]
|
|
281
|
+
)
|
|
282
|
+
if declaration_bodies(home_sheet, ".home-hero-summary").any? { |body| declarations(body).include?("color:var(--color-on-surface)") }
|
|
283
|
+
errors << "assets/css/ledger/home.css: .home-hero-summary must use --color-legend (PLT-AC-23)"
|
|
284
|
+
end
|
|
250
285
|
|
|
251
286
|
fail!("CSS structure problems:\n - #{errors.join("\n - ")}") unless errors.empty?
|
|
252
287
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Refs: PLT-AC-42 — home listing bands emit kicker, title, and note slots in both normal and agnostic builds.
|
|
4
|
+
require "pathname"
|
|
5
|
+
require "open3"
|
|
6
|
+
require "fileutils"
|
|
7
|
+
require "tmpdir"
|
|
8
|
+
|
|
9
|
+
ROOT = Pathname.new(__dir__).join("../..").expand_path
|
|
10
|
+
EXE = ROOT.join("exe/pandorga")
|
|
11
|
+
EXAMPLE = ROOT.join("examples/full")
|
|
12
|
+
|
|
13
|
+
def fail!(message)
|
|
14
|
+
warn "FAIL test-home-band-intro: #{message}"
|
|
15
|
+
exit 1
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def run!(*cmd, chdir:)
|
|
19
|
+
env = {
|
|
20
|
+
"RUBYOPT" => "-I#{ROOT.join('lib')}",
|
|
21
|
+
"PANDORGA_SITE_ROOT" => chdir.to_s,
|
|
22
|
+
"CONTENT_API_BASE_URL" => "",
|
|
23
|
+
"CONTENT_EXPORT_SKIP_VALIDATE" => "1",
|
|
24
|
+
"JEKYLL_ENV" => "production"
|
|
25
|
+
}
|
|
26
|
+
stdout, stderr, status = Open3.capture3(env, *cmd, chdir: chdir.to_s)
|
|
27
|
+
return [stdout, stderr] if status.success?
|
|
28
|
+
|
|
29
|
+
fail!("#{cmd.join(' ')} (cwd=#{chdir})\n#{stdout}\n#{stderr}")
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def listing_sections(html)
|
|
33
|
+
sections = []
|
|
34
|
+
html.scan(/<section\b[^>]*\bdata-home-kind="([^"]+)"[^>]*>.*?<\/section>/m) do
|
|
35
|
+
section = Regexp.last_match(0)
|
|
36
|
+
kind = Regexp.last_match(1)
|
|
37
|
+
next if kind == "index"
|
|
38
|
+
|
|
39
|
+
key = section[/\bdata-home-key="([^"]+)"/, 1] || kind
|
|
40
|
+
banner_idx = section.index('data-content-home-section="')
|
|
41
|
+
fail!("section #{key} missing data-content-home-section") unless banner_idx
|
|
42
|
+
|
|
43
|
+
sections << [key, section[banner_idx..]]
|
|
44
|
+
end
|
|
45
|
+
sections
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
run!("bundle", "install", "--quiet", chdir: EXAMPLE) if EXAMPLE.join("Gemfile").file?
|
|
49
|
+
run!("ruby", EXE.to_s, "export", "content", "_content_json", chdir: EXAMPLE)
|
|
50
|
+
|
|
51
|
+
Dir.mktmpdir("pandorga-home-band-normal-") do |normal_dir|
|
|
52
|
+
run!("bundle", "exec", "jekyll", "build", "--quiet", "-d", normal_dir, chdir: EXAMPLE)
|
|
53
|
+
html = File.read(File.join(normal_dir, "index.html"))
|
|
54
|
+
sections = listing_sections(html)
|
|
55
|
+
fail!("normal build produced no listing sections") if sections.empty?
|
|
56
|
+
|
|
57
|
+
sections.each do |key, slice|
|
|
58
|
+
%w[data-content-section-kicker data-content-section-title data-content-section-note].each do |attr|
|
|
59
|
+
fail!("normal build band #{key} missing #{attr}") unless slice.include?(attr)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
projects = sections.assoc("projects")&.last
|
|
64
|
+
fail!("normal build missing projects band") unless projects
|
|
65
|
+
unless projects.include?("Portfolio systems in the full example.")
|
|
66
|
+
fail!("normal build projects band missing note text from headers.yml")
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
Dir.mktmpdir("pandorga-home-band-agnostic-") do |agnostic_dir|
|
|
71
|
+
agnostic_cfg = File.join(agnostic_dir, "agnostic.yml")
|
|
72
|
+
File.write(agnostic_cfg, "shell_content_agnostic: true\n")
|
|
73
|
+
out_dir = File.join(agnostic_dir, "site")
|
|
74
|
+
run!(
|
|
75
|
+
"bundle", "exec", "jekyll", "build", "--quiet",
|
|
76
|
+
"--config", "_config.yml,#{agnostic_cfg}",
|
|
77
|
+
"-d", out_dir,
|
|
78
|
+
chdir: EXAMPLE
|
|
79
|
+
)
|
|
80
|
+
html = File.read(File.join(out_dir, "index.html"))
|
|
81
|
+
sections = listing_sections(html)
|
|
82
|
+
fail!("agnostic build produced no listing sections") if sections.empty?
|
|
83
|
+
|
|
84
|
+
sections.each do |key, slice|
|
|
85
|
+
%w[data-content-section-kicker data-content-section-title data-content-section-note].each do |attr|
|
|
86
|
+
fail!("agnostic build band #{key} missing #{attr}") unless slice.include?(attr)
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
projects = sections.assoc("projects")&.last
|
|
91
|
+
fail!("agnostic build missing projects band") unless projects
|
|
92
|
+
unless projects.include?("data-content-section-note></p>")
|
|
93
|
+
fail!("agnostic build projects band note slot is not empty")
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
puts "PASS test-home-band-intro"
|
data/scripts/validate.sh
CHANGED
|
@@ -55,6 +55,7 @@ TESTS=(
|
|
|
55
55
|
scripts/test/test-r2-json-sync.rb
|
|
56
56
|
scripts/test/test-writing-slug-limits.rb
|
|
57
57
|
scripts/test/test-examples-build.rb
|
|
58
|
+
scripts/test/test-home-band-intro.rb
|
|
58
59
|
scripts/test/test-validate-allowlist.rb
|
|
59
60
|
scripts/test/test-shell-a11y.rb
|
|
60
61
|
scripts/test/test-theme-contrast.rb
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pandorga
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- The Pandorga contributors
|
|
@@ -435,6 +435,7 @@ files:
|
|
|
435
435
|
- scripts/test/test-hero-summary.rb
|
|
436
436
|
- scripts/test/test-home-articles.rb
|
|
437
437
|
- scripts/test/test-home-band-art.rb
|
|
438
|
+
- scripts/test/test-home-band-intro.rb
|
|
438
439
|
- scripts/test/test-home-lists.rb
|
|
439
440
|
- scripts/test/test-hydrate-reserve.rb
|
|
440
441
|
- scripts/test/test-install-functions.rb
|