made tarot section more mobile friendly

This commit is contained in:
2026-03-28 17:31:45 -07:00
parent 60887b68a6
commit d47e63df6d
5 changed files with 918 additions and 65 deletions

View File

@@ -293,8 +293,6 @@
tarotHouseBottomInfoMonthEl: document.getElementById("tarot-house-bottom-info-month"),
tarotHouseBottomInfoRulerEl: document.getElementById("tarot-house-bottom-info-ruler"),
tarotHouseBottomInfoDateEl: document.getElementById("tarot-house-bottom-info-date"),
tarotHouseFocusToggleEl: document.getElementById("tarot-house-focus-toggle"),
tarotHouseExportEl: document.getElementById("tarot-house-export"),
tarotHouseExportWebpEl: document.getElementById("tarot-house-export-webp")
};
}
@@ -568,16 +566,6 @@
setHouseBottomInfoCheckboxState(elements?.tarotHouseBottomInfoRulerEl, state.houseBottomInfoModes.ruler);
setHouseBottomInfoCheckboxState(elements?.tarotHouseBottomInfoDateEl, state.houseBottomInfoModes.date);
if (elements?.tarotHouseFocusToggleEl) {
elements.tarotHouseFocusToggleEl.setAttribute("aria-pressed", state.houseFocusMode ? "true" : "false");
elements.tarotHouseFocusToggleEl.textContent = state.houseFocusMode ? "Show Full Tarot" : "Focus House";
}
if (elements?.tarotHouseExportEl) {
elements.tarotHouseExportEl.disabled = Boolean(state.houseExportInProgress);
elements.tarotHouseExportEl.textContent = state.houseExportInProgress ? "Exporting..." : "Export PNG";
}
if (elements?.tarotHouseExportWebpEl) {
const supportsWebp = tarotHouseUi.isExportFormatSupported?.("webp") === true;
elements.tarotHouseExportWebpEl.disabled = Boolean(state.houseExportInProgress) || !supportsWebp;
@@ -808,6 +796,7 @@
tarotHouseUi.init?.({
resolveTarotCardImage,
resolveTarotCardThumbnail,
getActiveDeck,
getDisplayCardName,
clearChildren,
normalizeTarotCardLookupName,
@@ -932,13 +921,6 @@
});
}
if (elements.tarotHouseFocusToggleEl) {
elements.tarotHouseFocusToggleEl.addEventListener("click", () => {
state.houseFocusMode = !state.houseFocusMode;
syncHouseControls(elements);
});
}
if (elements.tarotHouseTopCardsVisibleEl) {
elements.tarotHouseTopCardsVisibleEl.addEventListener("change", () => {
state.houseTopCardsVisible = Boolean(elements.tarotHouseTopCardsVisibleEl.checked);
@@ -989,12 +971,6 @@
});
});
if (elements.tarotHouseExportEl) {
elements.tarotHouseExportEl.addEventListener("click", () => {
exportHouseOfCards(elements, "png");
});
}
if (elements.tarotHouseExportWebpEl) {
elements.tarotHouseExportWebpEl.addEventListener("click", () => {
exportHouseOfCards(elements, "webp");