← back to Blockprintedwallpaper
hero: activate self-contained 2x2 hero-4grid (fleet sweep, local)
e8c4325d20693ccccff6d23a178d93872a103372 · 2026-06-01 13:36:37 -0700 · Steve
Files touched
M public/hero-4grid.jsM public/index.html
Diff
commit e8c4325d20693ccccff6d23a178d93872a103372
Author: Steve <steve@designerwallcoverings.com>
Date: Mon Jun 1 13:36:37 2026 -0700
hero: activate self-contained 2x2 hero-4grid (fleet sweep, local)
---
public/hero-4grid.js | 12 ++++++++++--
public/index.html | 2 ++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/public/hero-4grid.js b/public/hero-4grid.js
index c495e6f..54a9cbb 100644
--- a/public/hero-4grid.js
+++ b/public/hero-4grid.js
@@ -43,9 +43,17 @@
// Anti-header crop CSS — applied via inline so it ALWAYS wins
var style = document.createElement('style');
style.id = 'hero4-crop';
+ // Self-contained: inject the 2×2 LAYOUT too (not just the crop), so the grid
+ // works on any site that has the <script> tag even if its index.html never
+ // shipped .cinema-grid CSS. Hides the single .cinema-bg only once four-square
+ // mode is actually active (set in inject()), so a fetch failure keeps the
+ // static hero. Appended last → wins over any per-site .cinema-grid at equal
+ // specificity; identical values so sites that DO define it are unaffected.
style.textContent =
- '.hero4-cell{background-size:cover !important;background-position:center 12% !important;transition:opacity 600ms ease;}' +
- '.hero4-cell.swap-out{opacity:0;}';
+ '.cinema-grid{position:absolute;inset:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:0;z-index:0;}' +
+ '.hero4-cell{width:100%;height:100%;background-size:cover !important;background-position:center 12% !important;background-repeat:no-repeat;transition:opacity 600ms ease;}' +
+ '.hero4-cell.swap-out{opacity:0;}' +
+ '[data-hero-mode="four-square"] .cinema-bg{display:none !important;}';
document.head.appendChild(style);
paint(grid);
diff --git a/public/index.html b/public/index.html
index dbebb16..e43e1ea 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1144,5 +1144,7 @@ loadGridPage();
</script>
<script src="/corner-nav.js" defer></script>
+<!-- hero4-fix: activate 2x2 hero (self-contained; was commented placeholder) -->
+<script src="/hero-4grid.js" defer></script>
</body>
</html>
← b40816a Remove Big Red widget — never UX-worked, collided with Help
·
back to Blockprintedwallpaper
·
fleet rebuild (header-only): dw-header (hamburgers UL + cent 733f1cd →