From 080b080483f55feab5d2fd5b593e8e6cef9a9abd Mon Sep 17 00:00:00 2001 From: "Beau Beauchamp, WebTigers" Date: Sat, 8 Aug 2026 07:02:06 -0400 Subject: [PATCH] =?UTF-8?q?Vendor=20TigerLightbox=201.1.0=20=E2=80=94=20it?= =?UTF-8?q?em=20`stamp`=20watermark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the vendored TigerLightbox to 1.1.0, which adds an optional per-item `stamp` (+ `stampVariant`) that overlays a rotated watermark on the media — e.g. a big green "PAID" on an invoice PDF viewed in the lightbox. Presentational only (pointer-events:none). Source: WebTigers/TigerLightbox#feat/item-stamp. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../vendor/tiger-lightbox/tiger-lightbox.css | 12 +++++++++ .../vendor/tiger-lightbox/tiger-lightbox.js | 26 +++++++++++++++---- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/themes/puma/assets/vendor/tiger-lightbox/tiger-lightbox.css b/themes/puma/assets/vendor/tiger-lightbox/tiger-lightbox.css index 0c2044a..3c69c01 100644 --- a/themes/puma/assets/vendor/tiger-lightbox/tiger-lightbox.css +++ b/themes/puma/assets/vendor/tiger-lightbox/tiger-lightbox.css @@ -50,6 +50,18 @@ html.tlb-open { overflow: hidden; } } .tlb-caption[hidden] { display: none; } +/* Watermark stamp overlaid on the media (e.g. "PAID" on an invoice PDF). Presentational only. */ +.tlb-stamp { + position: absolute; top: 9%; right: 8%; z-index: 3; pointer-events: none; + font: 800 clamp(1.5rem, 3.6vw, 3rem)/1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; + letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; + color: #198754; border: .16em solid #198754; border-radius: .18em; + padding: .12em .42em; transform: rotate(-14deg); opacity: .88; + background: rgba(255, 255, 255, .35); +} +.tlb-stamp--danger { color: #dc3545; border-color: #dc3545; } +.tlb-stamp--warning { color: #b8860b; border-color: #b8860b; } + .tlb-counter { position: absolute; top: 1rem; left: 1.1rem; z-index: 2; color: var(--tlb-fg); opacity: .78; font: 13px system-ui, sans-serif; diff --git a/themes/puma/assets/vendor/tiger-lightbox/tiger-lightbox.js b/themes/puma/assets/vendor/tiger-lightbox/tiger-lightbox.js index 06b18c6..f30d6c5 100644 --- a/themes/puma/assets/vendor/tiger-lightbox/tiger-lightbox.js +++ b/themes/puma/assets/vendor/tiger-lightbox/tiger-lightbox.js @@ -1,5 +1,5 @@ /*! - * TigerLightbox v1.0.0 — a tiny, dependency-free lightbox & media viewer. + * TigerLightbox v1.1.0 — a tiny, dependency-free lightbox & media viewer. * https://github.com/WebTigers/TigerLightbox · MIT License * * Zero dependencies, ~5KB. Handles images, video, PDFs/iframes, and embeds, with gallery @@ -8,11 +8,16 @@ * Attribute API (auto-wired, works with dynamically-added elements): * * items sharing the same group value form one gallery. - * optional: data-src (overrides href), data-type (image|video|pdf|iframe), data-title. + * optional: data-src (overrides href), data-type (image|video|pdf|iframe), data-title, + * data-stamp (a watermark, e.g. "PAID"), data-stamp-variant (success|danger|warning). * * JS API: - * TigerLightbox.open([{type,src,caption,title}], startIndex) + * TigerLightbox.open([{type,src,caption,title,stamp,stampVariant}], startIndex) * TigerLightbox.close() + * + * `stamp` overlays a rotated watermark on the media (e.g. "PAID" on an invoice PDF); `stampVariant` + * tints it (default green/success). Purely presentational + pointer-events:none, so it never blocks + * interacting with the media beneath. */ (function (global, document) { 'use strict'; @@ -85,6 +90,15 @@ } media.appendChild(node); + // Optional watermark stamp overlaid on the media (e.g. "PAID" on an invoice PDF). Presentational + // only (pointer-events:none) so it never blocks scrolling/interacting with the media beneath. + if (item.stamp) { + var variant = (item.stampVariant || '').replace(/[^a-z]/g, ''); + var stamp = elem('div', 'tlb-stamp' + (variant ? ' tlb-stamp--' + variant : '')); + stamp.textContent = item.stamp; + media.appendChild(stamp); + } + cap.textContent = item.caption || item.title || ''; cap.hidden = !cap.textContent; @@ -168,7 +182,9 @@ type: el.getAttribute('data-type') || guessType(src), src: src, caption: el.getAttribute('data-caption') || '', - title: el.getAttribute('data-title') || '' + title: el.getAttribute('data-title') || '', + stamp: el.getAttribute('data-stamp') || '', + stampVariant: el.getAttribute('data-stamp-variant') || '' }; } @@ -184,5 +200,5 @@ open(nodes.map(nodeToItem), nodes.indexOf(t)); }); - global.TigerLightbox = { open: open, close: close, version: '1.0.0' }; + global.TigerLightbox = { open: open, close: close, version: '1.1.0' }; })(window, document);