updated card images

This commit is contained in:
2026-04-24 00:38:44 -07:00
parent a129f0db6a
commit 5744edadb9
6 changed files with 225 additions and 18 deletions
+22
View File
@@ -814,6 +814,27 @@
return window.TarotCardImages.resolveTarotCardImage(name) || null;
}
function openTarotCardInfo(cardName, trumpNumber = null) {
const detail = {};
const normalizedCardName = toDisplayText(cardName);
const normalizedTrumpNumber = toFiniteNumber(trumpNumber);
if (normalizedCardName) {
detail.cardName = normalizedCardName;
}
if (normalizedTrumpNumber != null) {
detail.trumpNumber = normalizedTrumpNumber;
}
if (!detail.cardName && detail.trumpNumber == null) {
return false;
}
document.dispatchEvent(new CustomEvent("nav:tarot-trump", { detail }));
return true;
}
function openTarotCardLightbox(cardName, fallbackSrc = "", fallbackLabel = "") {
const openLightbox = window.TarotUiLightbox?.open;
if (typeof openLightbox !== "function") {
@@ -867,6 +888,7 @@
getWallFaceLetter,
getWallTarotCard,
resolveCardImageUrl,
openTarotCardInfo,
openTarotCardLightbox,
MOTHER_CONNECTORS,
formatDirectionName,