pandorga 1.2.2 → 1.2.4

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: 4788fb732dc3564b624c97cbba44c8a3377f89b636efcdec54a48f6873c95fb8
4
- data.tar.gz: edd571d9c4cb6a9e1933130dda3e122175fed1f374349b80f8c8c419340c5125
3
+ metadata.gz: 98b663b167e42b55b5f034061a064fcb22cc0612e5583644ee44f1c61557415d
4
+ data.tar.gz: 07cbe585377ae6dac96af92aafc61982405cfa9f7f91ed22ead923a010749f02
5
5
  SHA512:
6
- metadata.gz: b22151e16f5933b3312fcb097716c607f0eea6b711c4cc441dbb4090645d905ac526438802fe7c1f3721f53604e915deeea99087e49a043e2b7fddd39d702885
7
- data.tar.gz: 97fba0fdb7c83daf494d42b46f11b536fda6c7d84c8b99aa256e1d056b88326bdb970bafa174c4562ad31faeb8237192054758ffd401d08b205df71787cd08a0
6
+ metadata.gz: f03e0020239a68af75151157c549d9b6c24a4ad88dd385817be87ca7ffedae4830c29d7ee0f5f0dfec3462971645d25174629ef825dde027b60ed0a45847f499
7
+ data.tar.gz: 3ebd0d3083bc31b0791e212f153ae796919cba639ad8b7ffcc805fdbab974274e53744b8f0bb0f2de7b75e35ecba222fb5e253fa3b9a78bc1e2a39b9409b17ce
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.4] — 2026-10-05
4
+
5
+ ### Fixed
6
+
7
+ - An omitted `pandorga.content.backend` keeps a configured `base_url` or legacy `content_api_base_url` as an object-store origin. `static` remains the default only when no public URL is set, and an explicit `backend: static` still wins.
8
+
9
+ ## [1.2.3] — 2026-10-05
10
+
11
+ ### Changed
12
+
13
+ - Home portfolio cards use a denser equal grid (projects listing layout untouched)
14
+ - Corrects the 1.2.2 mis-target that compacted the projects index instead of the home band
15
+
3
16
  ## [1.2.2] — 2026-10-05
4
17
 
5
18
  ### Added
@@ -8,7 +21,6 @@
8
21
 
9
22
  ### Changed
10
23
 
11
- - Projects index cards are denser (shorter posters, tighter type) on the uniform Nx3 grid
12
24
  - Home draft cards are taller (~40%) so excerpts stay readable
13
25
  - Full example blog page is `Rascunhos` with `language: pt-BR`
14
26
 
@@ -943,44 +943,38 @@ html[data-theme="light"] .home-hero-plate {
943
943
  }
944
944
  }
945
945
 
946
- /* ── Engineering artifacts ── */
946
+ /* ── Engineering artifacts ──
947
+ Uniform dense cells (not the old 7/5 tension scale): four portfolio cards
948
+ on the home band were reading as oversized panels. Equal columns + a short
949
+ poster keep them catalogue-sized; the projects listing page is unchanged. */
947
950
  .home-system-grid {
948
951
  display: grid;
949
952
  grid-template-columns: minmax(0, 1fr);
950
- gap: var(--space-lg);
951
- /* Used to be align-items: start, to stop a short-summary card from being
952
- stretched into its neighbor's poster height with empty card under its
953
- links. Left at the grid's default (stretch) now instead: `.ledger-card`
954
- and `.ledger-system-card` are already flex columns whose body grows
955
- (`.ledger-card-copy { flex: 1 }`) and whose footer is pinned to the
956
- bottom (`.ledger-card-foot { margin-top: auto }` in base.css), so the
957
- extra height a short card gets from stretch reads as intentional air
958
- above a bottom-anchored footer rather than as a dead gap under it. */
953
+ gap: var(--space-md);
954
+ align-items: stretch;
959
955
  }
960
956
 
961
- @media (min-width: 768px) {
957
+ @media (min-width: 700px) {
962
958
  .home-system-grid {
963
959
  grid-template-columns: repeat(2, minmax(0, 1fr));
964
960
  }
965
961
  }
966
962
 
967
- /* Asymmetric pairs — 7/5 then 5/7 — are the "tension scale" of the mockup,
968
- and they keep two video posters from sitting at identical widths. */
969
- @media (min-width: 1024px) {
970
- .home-system-grid {
971
- grid-template-columns: repeat(12, minmax(0, 1fr));
972
- gap: var(--space-xl);
973
- }
963
+ .home-system-grid .ledger-system-card {
964
+ gap: var(--space-xs);
965
+ padding: var(--space-md);
966
+ }
974
967
 
975
- .home-system-grid>*:nth-child(4n + 1),
976
- .home-system-grid>*:nth-child(4n) {
977
- grid-column: span 7;
978
- }
968
+ .home-system-grid .ledger-system-card>.ledger-poster,
969
+ .home-system-grid .ledger-system-card>.projects-plate {
970
+ width: auto;
971
+ margin: calc(var(--space-md) * -1) calc(var(--space-md) * -1) 0;
972
+ aspect-ratio: 2 / 1;
973
+ }
979
974
 
980
- .home-system-grid>*:nth-child(4n + 2),
981
- .home-system-grid>*:nth-child(4n + 3) {
982
- grid-column: span 5;
983
- }
975
+ .home-system-grid .ledger-system-card .ledger-card-title {
976
+ font-size: var(--type-card);
977
+ line-height: 1.2;
984
978
  }
985
979
 
986
980
  .home-system-grid .ledger-card-links {
@@ -991,7 +985,13 @@ html[data-theme="light"] .home-hero-plate {
991
985
  font-family: var(--font-body);
992
986
  font-size: var(--type-subtitle);
993
987
  font-weight: var(--weight-body);
988
+ line-height: var(--leading-body);
994
989
  color: var(--color-legend);
990
+ display: -webkit-box;
991
+ -webkit-box-orient: vertical;
992
+ -webkit-line-clamp: 2;
993
+ line-clamp: 2;
994
+ overflow: hidden;
995
995
  }
996
996
 
997
997
 
@@ -86,8 +86,7 @@
86
86
  }
87
87
 
88
88
  .projects-page .projects-plate--mark {
89
- /* Match the compact index poster — shorter than the shared 16/9 plate. */
90
- aspect-ratio: 2 / 1;
89
+ aspect-ratio: 16 / 9;
91
90
  display: flex;
92
91
  align-items: center;
93
92
  justify-content: center;
@@ -291,7 +290,7 @@
291
290
  .projects-page .projects-grid {
292
291
  display: grid;
293
292
  grid-template-columns: minmax(0, 1fr);
294
- gap: var(--space-md);
293
+ gap: var(--space-lg);
295
294
  /* Cards stretch to the row. This used to be `align-items: start`, because a
296
295
  project with no poster left a hole between its summary and its links; now
297
296
  every project shows either its thumbnail or its glyph plate, so the row
@@ -311,45 +310,31 @@
311
310
  }
312
311
  }
313
312
 
314
- /* Compact index cells: denser padding and a shorter poster than the shared
315
- 16/9 system-card default, so three columns read as a catalogue rather than
316
- a wall of panels. The lead plate above keeps its own scale. */
317
- .projects-page .projects-grid .ledger-system-card {
318
- gap: var(--space-xs);
319
- padding: var(--space-md);
320
- }
321
-
322
313
  /* The shared system card pads its own body, which insets the poster from the
323
314
  card edge and makes the picture look like an afterthought. Pulling it back
324
315
  out by the same padding is one rule and leaves every other spacing in the
325
316
  shared block alone. */
326
- .projects-page .projects-grid .ledger-system-card>.ledger-poster,
327
- .projects-page .projects-grid .ledger-system-card>.projects-plate {
317
+ .projects-page .ledger-system-card>.ledger-poster,
318
+ .projects-page .ledger-system-card>.projects-plate {
328
319
  width: auto;
329
- margin: calc(var(--space-md) * -1) calc(var(--space-md) * -1) 0;
330
- aspect-ratio: 2 / 1;
320
+ margin: calc(var(--space-lg) * -1) calc(var(--space-lg) * -1) 0;
331
321
  }
332
322
 
333
323
  /* The glyph plate is this page's own shape, so it takes the same breathing
334
324
  room the unscoped poster rule above gives every system card. */
335
325
  .projects-page .projects-plate+.ledger-meta {
336
- margin-top: var(--space-sm);
326
+ margin-top: var(--space-md);
337
327
  }
338
328
 
339
- .projects-page .projects-grid .ledger-system-card .ledger-card-title {
340
- font-size: var(--type-card);
341
- line-height: 1.2;
329
+ .projects-page .ledger-system-card .ledger-card-title {
330
+ font-size: var(--type-card-lg);
331
+ line-height: 1.15;
342
332
  }
343
333
 
344
- .projects-page .projects-grid .ledger-system-card .ledger-card-copy {
334
+ .projects-page .ledger-system-card .ledger-card-copy {
345
335
  font-size: var(--type-subtitle);
346
336
  line-height: var(--leading-body);
347
337
  color: var(--color-legend);
348
- display: -webkit-box;
349
- -webkit-box-orient: vertical;
350
- -webkit-line-clamp: 2;
351
- line-clamp: 2;
352
- overflow: hidden;
353
338
  }
354
339
 
355
340
  /* ══ Repositories ══
@@ -24,7 +24,7 @@ module Pandorga
24
24
 
25
25
  gem "pandorga", "~> 1.2"
26
26
  # Local checkout: gem "pandorga", path: "../pandorga"
27
- # GitHub tag: gem "pandorga", github: "alexandrelheinen/pandorga", tag: "v1.2.2"
27
+ # GitHub tag: gem "pandorga", github: "alexandrelheinen/pandorga", tag: "v1.2.3"
28
28
  gem "csv"
29
29
  gem "base64"
30
30
  RUBY
@@ -26,10 +26,11 @@ content:
26
26
  title: "`pandorga.content`"
27
27
  intro: |
28
28
  Legacy `content_api_base_url` still works as a fallback for `base_url`.
29
+ When `backend` is omitted, a non-empty `base_url` or `content_api_base_url` selects `object_store`. With no origin, the default is `static`. An explicit `backend: static` still serves JSON from `_site` and clears the public URL at build time.
29
30
  keys:
30
31
  backend:
31
32
  type: "`static` \\| `r2` \\| `object_store` \\| `s3`"
32
- notes: "`static` serves JSON from `_site`. The others use `base_url` as the public object-store origin"
33
+ notes: "`static` serves JSON from `_site`. The others use `base_url` as the public object-store origin. Omitted plus a public URL selects `object_store`"
33
34
  base_url:
34
35
  type: string
35
36
  notes: Public content origin when backend is not `static`
@@ -256,9 +256,14 @@ module PandorgaRegistry
256
256
 
257
257
  def content_backend(config)
258
258
  raw = config.dig("pandorga", "content", "backend").to_s.strip
259
- return "static" if raw.empty?
259
+ return raw unless raw.empty?
260
260
 
261
- raw
261
+ # A public origin is the pre-registry signal that JSON lives on an object
262
+ # store. Static is the default only when no origin is configured; an
263
+ # explicit `backend: static` still wins and the build clears the URL.
264
+ return "object_store" unless content_base_url(config).empty?
265
+
266
+ "static"
262
267
  end
263
268
 
264
269
  def content_base_url(config)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pandorga
4
- VERSION = "1.2.2"
4
+ VERSION = "1.2.4"
5
5
  end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ # An omitted backend must not discard a configured public origin.
4
+ # Explicit static still serves JSON from _site.
5
+ require "pathname"
6
+
7
+ ROOT = Pathname.new(__dir__).join("../..").expand_path
8
+ $LOAD_PATH.unshift(ROOT.join("lib").to_s)
9
+ require "pandorga/registry"
10
+
11
+ def check!(condition, message)
12
+ return if condition
13
+
14
+ warn "FAIL test-content-backend: #{message}"
15
+ exit 1
16
+ end
17
+
18
+ url = "https://pub-example.r2.dev"
19
+
20
+ check!(PandorgaRegistry.content_backend({}) == "static",
21
+ "no origin must stay static")
22
+ check!(PandorgaRegistry.static_backend?({}),
23
+ "static_backend? must be true when no origin is set")
24
+
25
+ legacy = { "content_api_base_url" => url }
26
+ check!(PandorgaRegistry.content_backend(legacy) == "object_store",
27
+ "legacy content_api_base_url must select object_store, got #{PandorgaRegistry.content_backend(legacy).inspect}")
28
+ check!(PandorgaRegistry.object_store_backend?(legacy),
29
+ "object_store_backend? must be true for a legacy URL")
30
+ check!(PandorgaRegistry.content_base_url(legacy) == url,
31
+ "legacy URL must remain the public origin")
32
+
33
+ base_only = { "pandorga" => { "content" => { "base_url" => "#{url}/" } } }
34
+ check!(PandorgaRegistry.content_backend(base_only) == "object_store",
35
+ "base_url without backend must select object_store")
36
+ check!(PandorgaRegistry.content_base_url(base_only) == url,
37
+ "base_url must be stripped of a trailing slash")
38
+
39
+ explicit_static = {
40
+ "content_api_base_url" => url,
41
+ "pandorga" => { "content" => { "backend" => "static" } }
42
+ }
43
+ check!(PandorgaRegistry.content_backend(explicit_static) == "static",
44
+ "explicit static must win over a leftover URL")
45
+
46
+ explicit_r2 = { "pandorga" => { "content" => { "backend" => "r2", "base_url" => url } } }
47
+ check!(PandorgaRegistry.content_backend(explicit_r2) == "r2",
48
+ "explicit r2 must be preserved")
49
+
50
+ puts "PASS test-content-backend"
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.2.2
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Pandorga contributors
@@ -365,6 +365,7 @@ files:
365
365
  - scripts/test/test-cdn-pins.rb
366
366
  - scripts/test/test-cloudflare-watch-paths-doc.rb
367
367
  - scripts/test/test-configuration-doc.rb
368
+ - scripts/test/test-content-backend.rb
368
369
  - scripts/test/test-content-detail-urls.rb
369
370
  - scripts/test/test-content-keys.rb
370
371
  - scripts/test/test-content-license.rb