update commit message

This commit is contained in:
2026-05-29 00:27:03 -07:00
parent ed1107a0c0
commit 254f488eca
21 changed files with 565 additions and 210 deletions
+91 -82
View File
@@ -42,6 +42,10 @@
earth: "Disks"
};
function hasTarotAccess() {
return window.TarotAppConfig?.hasTarotAccess?.() === true;
}
const SMALL_CARD_GROUPS = [
{ label: "24", modality: "Cardinal", numbers: [2, 3, 4] },
{ label: "57", modality: "Fixed", numbers: [5, 6, 7] },
@@ -324,106 +328,111 @@
detailsCard.append(detailsTitle, detailsList);
const tarotCard = document.createElement("div");
tarotCard.className = "planet-meta-card";
const detailCards = [detailsCard];
const tarotTitle = document.createElement("strong");
tarotTitle.textContent = "Tarot Correspondence";
if (hasTarotAccess()) {
const tarotCard = document.createElement("div");
tarotCard.className = "planet-meta-card";
const tarotParts = [];
if (entry.aceCardName) {
tarotParts.push(
"Ace: ",
createInlineButton(entry.aceCardName, () => {
document.dispatchEvent(new CustomEvent("nav:tarot-trump", {
detail: { cardName: entry.aceCardName }
}));
})
);
}
if (entry.courtRank) {
if (tarotParts.length) {
tarotParts.push(" · ");
}
tarotParts.push(`Court Rank: ${entry.courtRank} (all suits)`);
}
const tarotTitle = document.createElement("strong");
tarotTitle.textContent = "Tarot Correspondence";
const tarotText = tarotParts.length
? createInlineParagraph(tarotParts)
: document.createTextNode("--");
tarotCard.append(tarotTitle, tarotText);
if (entry.courtCardNames.length) {
const courtParts = ["Court cards: "];
entry.courtCardNames.forEach((cardName, index) => {
if (index > 0) {
courtParts.push(", ");
}
courtParts.push(createInlineButton(cardName, () => {
document.dispatchEvent(new CustomEvent("nav:tarot-trump", {
detail: { cardName }
}));
}));
});
tarotCard.appendChild(createInlineParagraph(courtParts));
}
const smallCardCard = document.createElement("div");
smallCardCard.className = "planet-meta-card";
const smallCardTitle = document.createElement("strong");
smallCardTitle.textContent = "Small Card Sign Types";
smallCardCard.appendChild(smallCardTitle);
const smallCardStack = document.createElement("div");
smallCardStack.className = "cal-item-stack";
(entry.smallCardGroups || []).forEach((group) => {
const row = document.createElement("div");
row.className = "cal-item-row";
const head = document.createElement("div");
head.className = "cal-item-head";
head.innerHTML = `
<span class="cal-item-name">${group.rangeLabel} · ${group.modality}</span>
<span class="planet-list-meta">${group.signName || "--"}</span>
`;
row.appendChild(head);
if (group.signId) {
row.appendChild(createInlineParagraph([
"Sign: ",
createInlineButton(group.signName, () => {
document.dispatchEvent(new CustomEvent("nav:zodiac", {
detail: { signId: group.signId }
const tarotParts = [];
if (entry.aceCardName) {
tarotParts.push(
"Ace: ",
createInlineButton(entry.aceCardName, () => {
document.dispatchEvent(new CustomEvent("nav:tarot-trump", {
detail: { cardName: entry.aceCardName }
}));
})
]));
);
}
if (entry.courtRank) {
if (tarotParts.length) {
tarotParts.push(" · ");
}
tarotParts.push(`Court Rank: ${entry.courtRank} (all suits)`);
}
if ((group.cardNames || []).length) {
const cardParts = ["Cards: "];
group.cardNames.forEach((cardName, index) => {
const tarotText = tarotParts.length
? createInlineParagraph(tarotParts)
: document.createTextNode("--");
tarotCard.append(tarotTitle, tarotText);
if (entry.courtCardNames.length) {
const courtParts = ["Court cards: "];
entry.courtCardNames.forEach((cardName, index) => {
if (index > 0) {
cardParts.push(", ");
courtParts.push(", ");
}
cardParts.push(createInlineButton(cardName, () => {
courtParts.push(createInlineButton(cardName, () => {
document.dispatchEvent(new CustomEvent("nav:tarot-trump", {
detail: { cardName }
}));
}));
});
row.appendChild(createInlineParagraph(cardParts));
tarotCard.appendChild(createInlineParagraph(courtParts));
}
smallCardStack.appendChild(row);
});
const smallCardCard = document.createElement("div");
smallCardCard.className = "planet-meta-card";
smallCardCard.appendChild(smallCardStack);
const smallCardTitle = document.createElement("strong");
smallCardTitle.textContent = "Small Card Sign Types";
smallCardCard.appendChild(smallCardTitle);
grid.append(detailsCard, tarotCard, smallCardCard);
const smallCardStack = document.createElement("div");
smallCardStack.className = "cal-item-stack";
(entry.smallCardGroups || []).forEach((group) => {
const row = document.createElement("div");
row.className = "cal-item-row";
const head = document.createElement("div");
head.className = "cal-item-head";
head.innerHTML = `
<span class="cal-item-name">${group.rangeLabel} · ${group.modality}</span>
<span class="planet-list-meta">${group.signName || "--"}</span>
`;
row.appendChild(head);
if (group.signId) {
row.appendChild(createInlineParagraph([
"Sign: ",
createInlineButton(group.signName, () => {
document.dispatchEvent(new CustomEvent("nav:zodiac", {
detail: { signId: group.signId }
}));
})
]));
}
if ((group.cardNames || []).length) {
const cardParts = ["Cards: "];
group.cardNames.forEach((cardName, index) => {
if (index > 0) {
cardParts.push(", ");
}
cardParts.push(createInlineButton(cardName, () => {
document.dispatchEvent(new CustomEvent("nav:tarot-trump", {
detail: { cardName }
}));
}));
});
row.appendChild(createInlineParagraph(cardParts));
}
smallCardStack.appendChild(row);
});
smallCardCard.appendChild(smallCardStack);
detailCards.push(tarotCard, smallCardCard);
}
grid.append(...detailCards);
elements.detailBodyEl.appendChild(grid);
}