update commit message

This commit is contained in:
2026-04-24 01:20:21 -07:00
parent fe323552b2
commit e18ec31cf9
10 changed files with 141 additions and 122 deletions
+6
View File
@@ -4386,6 +4386,12 @@
color: #e0d0ff;
text-decoration-color: currentColor;
}
.detail-inline-link.is-selected,
.detail-inline-link[aria-pressed="true"] {
color: #e0d0ff;
text-decoration-color: currentColor;
font-weight: 600;
}
/* ── Alphabet section ────────────────────────────────────────────────── */
#alphabet-section,
+19 -27
View File
@@ -49,14 +49,13 @@
const countText = entries.length ? ` of ${entries.length}` : "";
const orderText = orderLabel ? ` (${orderLabel})` : "";
const reductionText = describeDigitalRootReduction(position, digitalRoot);
const openNumberBtn = context.navBtn(`View Number ${digitalRoot}`, "nav:number", { value: digitalRoot });
const openNumberBtn = context.inlineNavBtn(`${digitalRoot}`, "nav:number", { value: digitalRoot });
return context.card("Position Digital Root", `
<dl class="alpha-dl">
<dt>Position</dt><dd>#${position}${countText}${orderText}</dd>
<dt>Digital Root</dt><dd>${digitalRoot}${reductionText ? ` (${reductionText})` : ""}</dd>
<dt>Digital Root</dt><dd>${openNumberBtn}${reductionText ? ` (${reductionText})` : ""}</dd>
</dl>
<div class="alpha-nav-btns">${openNumberBtn}</div>
`);
}
@@ -74,12 +73,11 @@
}
const monthButtons = monthRefs
.map((month) => context.navBtn(month.label || month.name, "nav:calendar-month", { "month-id": month.id }))
.join("");
.map((month) => context.inlineNavBtn(month.label || month.name, "nav:calendar-month", { "month-id": month.id }))
.join(", ");
return context.card("Calendar Months", `
<div>${titleLabel}</div>
<div class="alpha-nav-btns">${monthButtons}</div>
<div class="planet-text">${titleLabel} ${monthButtons}</div>
`);
}
@@ -91,31 +89,25 @@
if (type === "planet") {
const sym = context.PLANET_SYMBOLS[id] || "";
const cubePlacement = context.getCubePlacementForPlanet(id);
const cubeBtn = context.cubePlacementBtn(cubePlacement, { "planet-id": id });
const cubeBtn = context.cubePlacementInlineBtn(cubePlacement, { "planet-id": id });
return context.card("Astrology", `
<dl class="alpha-dl">
<dt>Type</dt><dd>Planet</dd>
<dt>Ruler</dt><dd>${sym} ${context.cap(id)}</dd>
<dt>Ruler</dt><dd>${sym} ${context.inlineNavBtn(context.cap(id), "nav:planet", { "planet-id": id })}</dd>
</dl>
<div class="alpha-nav-btns">
<button class="alpha-nav-btn" data-event="nav:planet" data-planet-id="${id}">View ${context.cap(id)} </button>
${cubeBtn}
</div>
${cubeBtn ? `<div class="planet-text">Cube placement ${cubeBtn}</div>` : ""}
`);
}
if (type === "zodiac") {
const sym = context.ZODIAC_SYMBOLS[id] || "";
const cubePlacement = context.getCubePlacementForSign(id);
const cubeBtn = context.cubePlacementBtn(cubePlacement, { "sign-id": id });
const cubeBtn = context.cubePlacementInlineBtn(cubePlacement, { "sign-id": id });
return context.card("Astrology", `
<dl class="alpha-dl">
<dt>Type</dt><dd>Zodiac Sign</dd>
<dt>Sign</dt><dd>${sym} ${context.cap(id)}</dd>
<dt>Sign</dt><dd>${sym} ${context.inlineNavBtn(context.cap(id), "nav:zodiac", { "sign-id": id })}</dd>
</dl>
<div class="alpha-nav-btns">
<button class="alpha-nav-btn" data-event="nav:zodiac" data-sign-id="${id}">View ${context.cap(id)} </button>
${cubeBtn}
</div>
${cubeBtn ? `<div class="planet-text">Cube placement ${cubeBtn}</div>` : ""}
`);
}
if (type === "element") {
@@ -163,7 +155,7 @@
const body = rows.map((entry) => {
const pathBtn = Number.isFinite(Number(entry?.pathNumber))
? context.navBtn(`View Path ${entry.pathNumber}`, "nav:kabbalah-path", { "path-no": Number(entry.pathNumber) })
? context.inlineNavBtn(`Path ${entry.pathNumber}`, "nav:kabbalah-path", { "path-no": Number(entry.pathNumber) })
: "";
return `
@@ -174,7 +166,7 @@
</div>
<div class="planet-text">${entry.worldLayer}${entry.worldDescription ? ` · ${entry.worldDescription}` : ""}</div>
<div class="planet-text">${entry.soulLayer}${entry.soulTitle ? `${entry.soulTitle}` : ""}${entry.soulDescription ? `: ${entry.soulDescription}` : ""}</div>
<div class="alpha-nav-btns">${pathBtn}</div>
${pathBtn ? `<div class="planet-text">Linked path ${pathBtn}</div>` : ""}
</div>
`;
}).join("");
@@ -393,21 +385,21 @@
const tarotPart = letter.tarot
? `<dt>Tarot Card</dt><dd>${letter.tarot.card} (Trump ${letter.tarot.trumpNumber})</dd>`
: "";
const kabBtn = context.navBtn("View Kabbalah Path", "tarot:view-kab-path", { "path-number": letter.kabbalahPathNumber });
const kabBtn = context.inlineNavBtn(`Path ${letter.kabbalahPathNumber}`, "tarot:view-kab-path", { "path-number": letter.kabbalahPathNumber });
const tarotBtn = letter.tarot
? context.navBtn("View Tarot Card", "kab:view-trump", { "trump-number": letter.tarot.trumpNumber })
? context.inlineNavBtn(letter.tarot.card, "kab:view-trump", { "trump-number": letter.tarot.trumpNumber })
: "";
const cubePlacement = context.getCubePlacementForHebrewLetter(letter.hebrewLetterId, letter.kabbalahPathNumber);
const cubeBtn = context.cubePlacementBtn(cubePlacement, {
const cubeBtn = context.cubePlacementInlineBtn(cubePlacement, {
"hebrew-letter-id": letter.hebrewLetterId,
"path-no": letter.kabbalahPathNumber
});
sections.push(context.card("Kabbalah & Tarot", `
<dl class="alpha-dl">
<dt>Path Number</dt><dd>${letter.kabbalahPathNumber}</dd>
${tarotPart}
<dt>Path Number</dt><dd>${kabBtn}</dd>
${letter.tarot ? `<dt>Tarot Card</dt><dd>${tarotBtn} (Trump ${letter.tarot.trumpNumber})</dd>` : ""}
</dl>
<div class="alpha-nav-btns">${kabBtn}${tarotBtn}${cubeBtn}</div>
${cubeBtn ? `<div class="planet-text">Cube placement ${cubeBtn}</div>` : ""}
`));
}
+17 -3
View File
@@ -296,11 +296,23 @@
return alphabetKabbalahUi.buildCubePlacementButton(placement, navBtn, fallbackDetail);
}
function cubePlacementInlineBtn(placement, fallbackDetail = null) {
return alphabetKabbalahUi.buildCubePlacementButton(placement, inlineNavBtn, fallbackDetail);
}
function cap(s) { return s ? s.charAt(0).toUpperCase() + s.slice(1) : ""; }
function navBtn(label, event, detail) {
function buildNavButton(label, event, detail, className, suffix = "") {
const attrs = Object.entries(detail).map(([k, v]) => `data-${k}="${v}"`).join(" ");
return `<button class="alpha-nav-btn" data-event="${event}" ${attrs}>${label}</button>`;
return `<button class="${className}" data-event="${event}" ${attrs}>${label}${suffix}</button>`;
}
function navBtn(label, event, detail) {
return buildNavButton(label, event, detail, "alpha-nav-btn", " ↗");
}
function inlineNavBtn(label, event, detail) {
return buildNavButton(label, event, detail, "detail-inline-link");
}
function getDetailRenderContext(letter, alphabet) {
@@ -317,6 +329,7 @@
HEBREW_DOUBLE_DUALITY,
card,
navBtn,
inlineNavBtn,
cap,
normalizeId,
normalizeLetterId,
@@ -324,6 +337,7 @@
getCubePlacementForSign,
getCubePlacementForHebrewLetter,
cubePlacementBtn,
cubePlacementInlineBtn,
arabicDisplayName,
enochianGlyphImageHtml,
attachDetailListeners
@@ -357,7 +371,7 @@
if (!detailBodyEl) return;
// Nav buttons — generic: forward all data-* (except data-event) as the event detail
detailBodyEl.querySelectorAll(".alpha-nav-btn[data-event]").forEach((btn) => {
detailBodyEl.querySelectorAll(".alpha-nav-btn[data-event], .detail-inline-link[data-event]").forEach((btn) => {
btn.addEventListener("click", () => {
const evtName = btn.dataset.event;
const detail = {};
+23 -13
View File
@@ -19,6 +19,14 @@
return null;
}
function inlineNavButton(label, nav, attrs = {}, extraClass = "") {
const dataAttrs = Object.entries(attrs)
.map(([key, value]) => `data-${key}="${value}"`)
.join(" ");
const className = ["detail-inline-link", extraClass].filter(Boolean).join(" ");
return `<button class="${className}" data-nav="${nav}" ${dataAttrs}>${label}</button>`;
}
function buildMajorArcanaRowsForMonth(context) {
const { month, api, getState } = context;
const currentState = getState();
@@ -142,10 +150,10 @@
<span class="planet-list-meta">${row.rangeLabel}</span>
</div>
<div class="planet-list-meta">${row.signSymbol} ${row.signName} · Hebrew: ${label}</div>
<div class="alpha-nav-btns">
<button class="alpha-nav-btn" data-nav="calendar-day-range" data-range-start="${row.dayStart}" data-range-end="${row.dayEnd}">${row.rangeLabel} </button>
<button class="alpha-nav-btn" data-nav="tarot-card" data-card-name="${row.cardName}" data-trump-number="${row.trumpNumber ?? ""}">${displayCardName} </button>
${row.hebrewLetterId ? `<button class="alpha-nav-btn" data-nav="alphabet" data-alphabet="hebrew" data-hebrew-letter-id="${row.hebrewLetterId}">${label} ↗</button>` : ""}
<div class="planet-text detail-inline-value">
Days ${inlineNavButton(row.rangeLabel, "calendar-day-range", { "range-start": row.dayStart, "range-end": row.dayEnd })}
· Tarot ${inlineNavButton(displayCardName, "tarot-card", { "card-name": row.cardName, "trump-number": row.trumpNumber ?? "" })}
${row.hebrewLetterId ? ` · Hebrew ${inlineNavButton(label, "alphabet", { alphabet: "hebrew", "hebrew-letter-id": row.hebrewLetterId })}` : ""}
</div>
</div>
`;
@@ -200,9 +208,7 @@
<span class="cal-item-name">${row.signSymbol} ${row.signName} · Decan ${row.decanIndex}</span>
<span class="planet-list-meta">${row.startDegree}°${row.endDegree}° · ${row.dateRange}</span>
</div>
<div class="alpha-nav-btns">
<button class="alpha-nav-btn" data-nav="tarot-card" data-card-name="${row.cardName}">${displayCardName} </button>
</div>
<div class="planet-text detail-inline-value">Tarot ${inlineNavButton(displayCardName, "tarot-card", { "card-name": row.cardName })}</div>
</div>
`;
}).join("");
@@ -233,11 +239,15 @@
}
const isSelected = selectedDaySet.has(Number(row.day));
return `<button class="alpha-nav-btn${isSelected ? " is-selected" : ""}" data-nav="calendar-day" data-day-number="${row.day}" data-gregorian-date="${row.gregorianDate}" aria-pressed="${isSelected ? "true" : "false"}" title="Filter this month by day ${row.day}">${row.day}</button>`;
return inlineNavButton(String(row.day), "calendar-day", {
"day-number": row.day,
"gregorian-date": row.gregorianDate,
"aria-pressed": isSelected ? "true" : "false"
}, isSelected ? "is-selected" : "").replace("data-aria-pressed", "aria-pressed");
}).join("");
const clearButton = selectedContext
? '<button class="alpha-nav-btn" data-nav="calendar-day-clear" type="button">Show All Days</button>'
? inlineNavButton("Show All Days", "calendar-day-clear")
: "";
const helperText = selectedContext
@@ -249,8 +259,8 @@
<strong>Day Links</strong>
<div class="planet-text">Filter this month to events, holidays, and data connected to a specific day.</div>
${helperText}
<div class="alpha-nav-btns">${links}</div>
${clearButton ? `<div class="alpha-nav-btns">${clearButton}</div>` : ""}
<div class="planet-text detail-inline-value">Days ${links}</div>
${clearButton ? `<div class="planet-text detail-inline-value">${clearButton}</div>` : ""}
</div>
`;
}
@@ -376,7 +386,7 @@
const god = getState().godsById?.get(godId);
const label = god?.name || cleanName;
buttons.push(`<button class="alpha-nav-btn" data-nav="god" data-god-id="${godId}" data-god-name="${label}">${label} ↗</button>`);
buttons.push(inlineNavButton(label, "god", { "god-id": godId, "god-name": label }));
});
return buttons;
}
@@ -410,7 +420,7 @@
const deityButtons = buildWheelDeityButtons(assoc?.deities, context);
const deityLinksCard = deityButtons.length
? `<div class="planet-meta-card"><strong>Linked Deities</strong><div class="alpha-nav-btns">${deityButtons.join("")}</div></div>`
? `<div class="planet-meta-card"><strong>Linked Deities</strong><div class="planet-text detail-inline-value">${deityButtons.join(", ")}</div></div>`
: "";
const monthOrder = Number(month?.order);
+18 -27
View File
@@ -123,23 +123,26 @@
return current;
}
function buildInlineNavButton(label, nav, attrs = {}) {
const dataAttrs = Object.entries(attrs)
.map(([key, value]) => `data-${key}="${value}"`)
.join(" ");
return `<button class="detail-inline-link" data-nav="${nav}" ${dataAttrs}>${label}</button>`;
}
function buildAssociationButtons(associations) {
if (!associations || typeof associations !== "object") {
return '<div class="planet-text">--</div>';
}
const buttons = [];
const rows = [];
if (associations.planetId) {
buttons.push(
`<button class="alpha-nav-btn" data-nav="planet" data-planet-id="${associations.planetId}">${planetLabel(associations.planetId)} ↗</button>`
);
rows.push(`<div class="planet-text detail-inline-value">Planet ${buildInlineNavButton(planetLabel(associations.planetId), "planet", { "planet-id": associations.planetId })}</div>`);
}
if (associations.zodiacSignId) {
buttons.push(
`<button class="alpha-nav-btn" data-nav="zodiac" data-sign-id="${associations.zodiacSignId}">${zodiacLabel(associations.zodiacSignId)} ↗</button>`
);
rows.push(`<div class="planet-text detail-inline-value">Zodiac ${buildInlineNavButton(zodiacLabel(associations.zodiacSignId), "zodiac", { "sign-id": associations.zodiacSignId })}</div>`);
}
if (Number.isFinite(Number(associations.numberValue))) {
@@ -150,9 +153,7 @@
const label = rawNumber === numberValue
? `Number ${numberValue}`
: `Number ${numberValue} (from ${rawNumber})`;
buttons.push(
`<button class="alpha-nav-btn" data-nav="number" data-number-value="${numberValue}">${label} ↗</button>`
);
rows.push(`<div class="planet-text detail-inline-value">Number ${buildInlineNavButton(label, "number", { "number-value": numberValue })}</div>`);
}
}
}
@@ -161,41 +162,31 @@
const explicitTrumpNumber = Number(associations.tarotTrumpNumber);
const tarotTrumpNumber = Number.isFinite(explicitTrumpNumber) ? explicitTrumpNumber : null;
const tarotLabel = api.getDisplayTarotName(associations.tarotCard, tarotTrumpNumber);
buttons.push(
`<button class="alpha-nav-btn" data-nav="tarot-card" data-card-name="${associations.tarotCard}" data-trump-number="${tarotTrumpNumber ?? ""}">${tarotLabel} ↗</button>`
);
rows.push(`<div class="planet-text detail-inline-value">Tarot ${buildInlineNavButton(tarotLabel, "tarot-card", { "card-name": associations.tarotCard, "trump-number": tarotTrumpNumber ?? "" })}</div>`);
}
if (associations.godId || associations.godName) {
const label = godLabel(associations.godId, associations.godName);
buttons.push(
`<button class="alpha-nav-btn" data-nav="god" data-god-id="${associations.godId || ""}" data-god-name="${associations.godName || label}">${label} ↗</button>`
);
rows.push(`<div class="planet-text detail-inline-value">Deity ${buildInlineNavButton(label, "god", { "god-id": associations.godId || "", "god-name": associations.godName || label })}</div>`);
}
if (associations.hebrewLetterId) {
buttons.push(
`<button class="alpha-nav-btn" data-nav="alphabet" data-alphabet="hebrew" data-hebrew-letter-id="${associations.hebrewLetterId}">${hebrewLabel(associations.hebrewLetterId)} ↗</button>`
);
rows.push(`<div class="planet-text detail-inline-value">Hebrew ${buildInlineNavButton(hebrewLabel(associations.hebrewLetterId), "alphabet", { alphabet: "hebrew", "hebrew-letter-id": associations.hebrewLetterId })}</div>`);
}
if (associations.kabbalahPathNumber != null) {
buttons.push(
`<button class="alpha-nav-btn" data-nav="kabbalah" data-path-no="${associations.kabbalahPathNumber}">Path ${associations.kabbalahPathNumber} ↗</button>`
);
rows.push(`<div class="planet-text detail-inline-value">Kabbalah ${buildInlineNavButton(`Path ${associations.kabbalahPathNumber}`, "kabbalah", { "path-no": associations.kabbalahPathNumber })}</div>`);
}
if (associations.iChingPlanetaryInfluence) {
buttons.push(
`<button class="alpha-nav-btn" data-nav="iching" data-planetary-influence="${associations.iChingPlanetaryInfluence}">I Ching · ${associations.iChingPlanetaryInfluence} ↗</button>`
);
rows.push(`<div class="planet-text detail-inline-value">I Ching ${buildInlineNavButton(associations.iChingPlanetaryInfluence, "iching", { "planetary-influence": associations.iChingPlanetaryInfluence })}</div>`);
}
if (!buttons.length) {
if (!rows.length) {
return '<div class="planet-text">--</div>';
}
return `<div class="alpha-nav-btns">${buttons.join("")}</div>`;
return rows.join("");
}
function renderFactsCard(month) {
+3 -4
View File
@@ -253,14 +253,13 @@
if (!relatedEntry) {
return `<span class="planet-list-meta">${escapeHtml(label)}</span>`;
}
return `<button class="alpha-nav-btn" type="button" data-related-cycle-id="${escapeAttr(relatedEntry.id)}">${escapeHtml(relatedEntry.name)}</button>`;
return `<button class="detail-inline-link" type="button" data-related-cycle-id="${escapeAttr(relatedEntry.id)}">${escapeHtml(relatedEntry.name)}</button>`;
})
.join("");
.join(", ");
body.push([
"<div>",
" <strong>Related:</strong>",
` <div class="alpha-nav-btns">${relatedButtons}</div>`,
` <p class="planet-text detail-inline-value"><strong>Related:</strong> ${relatedButtons}</p>`,
"</div>"
].join("\n"));
}
+19 -28
View File
@@ -73,24 +73,27 @@
return current;
}
function buildInlineNavButton(label, nav, attrs = {}) {
const dataAttrs = Object.entries(attrs)
.map(([key, value]) => `data-${key}="${value}"`)
.join(" ");
return `<button class="detail-inline-link" data-nav="${nav}" ${dataAttrs}>${label}</button>`;
}
function buildAssociationButtons(associations, context) {
const { getDisplayTarotName, resolveTarotTrumpNumber } = context;
if (!associations || typeof associations !== "object") {
return '<div class="planet-text">--</div>';
}
const buttons = [];
const rows = [];
if (associations.planetId) {
buttons.push(
`<button class="alpha-nav-btn" data-nav="planet" data-planet-id="${associations.planetId}">${planetLabel(associations.planetId, context)} -></button>`
);
rows.push(`<div class="planet-text detail-inline-value">Planet ${buildInlineNavButton(planetLabel(associations.planetId, context), "planet", { "planet-id": associations.planetId })}</div>`);
}
if (associations.zodiacSignId) {
buttons.push(
`<button class="alpha-nav-btn" data-nav="zodiac" data-sign-id="${associations.zodiacSignId}">${zodiacLabel(associations.zodiacSignId, context)} -></button>`
);
rows.push(`<div class="planet-text detail-inline-value">Zodiac ${buildInlineNavButton(zodiacLabel(associations.zodiacSignId, context), "zodiac", { "sign-id": associations.zodiacSignId })}</div>`);
}
if (Number.isFinite(Number(associations.numberValue))) {
@@ -101,9 +104,7 @@
const label = rawNumber === numberValue
? `Number ${numberValue}`
: `Number ${numberValue} (from ${rawNumber})`;
buttons.push(
`<button class="alpha-nav-btn" data-nav="number" data-number-value="${numberValue}">${label} -></button>`
);
rows.push(`<div class="planet-text detail-inline-value">Number ${buildInlineNavButton(label, "number", { "number-value": numberValue })}</div>`);
}
}
}
@@ -113,41 +114,31 @@
const explicitTrumpNumber = Number(associations.tarotTrumpNumber);
const tarotTrumpNumber = Number.isFinite(explicitTrumpNumber) ? explicitTrumpNumber : trumpNumber;
const tarotLabel = getDisplayTarotName(associations.tarotCard, tarotTrumpNumber);
buttons.push(
`<button class="alpha-nav-btn" data-nav="tarot-card" data-card-name="${associations.tarotCard}" data-trump-number="${tarotTrumpNumber ?? ""}">${tarotLabel} -></button>`
);
rows.push(`<div class="planet-text detail-inline-value">Tarot ${buildInlineNavButton(tarotLabel, "tarot-card", { "card-name": associations.tarotCard, "trump-number": tarotTrumpNumber ?? "" })}</div>`);
}
if (associations.godId || associations.godName) {
const label = godLabel(associations.godId, associations.godName, context);
buttons.push(
`<button class="alpha-nav-btn" data-nav="god" data-god-id="${associations.godId || ""}" data-god-name="${associations.godName || label}">${label} -></button>`
);
rows.push(`<div class="planet-text detail-inline-value">Deity ${buildInlineNavButton(label, "god", { "god-id": associations.godId || "", "god-name": associations.godName || label })}</div>`);
}
if (associations.hebrewLetterId) {
buttons.push(
`<button class="alpha-nav-btn" data-nav="alphabet" data-alphabet="hebrew" data-hebrew-letter-id="${associations.hebrewLetterId}">${hebrewLabel(associations.hebrewLetterId, context)} -></button>`
);
rows.push(`<div class="planet-text detail-inline-value">Hebrew ${buildInlineNavButton(hebrewLabel(associations.hebrewLetterId, context), "alphabet", { alphabet: "hebrew", "hebrew-letter-id": associations.hebrewLetterId })}</div>`);
}
if (associations.kabbalahPathNumber != null) {
buttons.push(
`<button class="alpha-nav-btn" data-nav="kabbalah" data-path-no="${associations.kabbalahPathNumber}">Path ${associations.kabbalahPathNumber} -></button>`
);
rows.push(`<div class="planet-text detail-inline-value">Kabbalah ${buildInlineNavButton(`Path ${associations.kabbalahPathNumber}`, "kabbalah", { "path-no": associations.kabbalahPathNumber })}</div>`);
}
if (associations.iChingPlanetaryInfluence) {
buttons.push(
`<button class="alpha-nav-btn" data-nav="iching" data-planetary-influence="${associations.iChingPlanetaryInfluence}">I Ching - ${associations.iChingPlanetaryInfluence} -></button>`
);
rows.push(`<div class="planet-text detail-inline-value">I Ching ${buildInlineNavButton(associations.iChingPlanetaryInfluence, "iching", { "planetary-influence": associations.iChingPlanetaryInfluence })}</div>`);
}
if (!buttons.length) {
if (!rows.length) {
return '<div class="planet-text">--</div>';
}
return `<div class="alpha-nav-btns">${buttons.join("")}</div>`;
return rows.join("");
}
function associationSearchText(associations, context) {
@@ -263,7 +254,7 @@
const monthName = monthLabelForCalendar(holiday?.calendarId, holiday?.monthId);
const holidayDate = holiday?.dateText || holiday?.date || holiday?.dateRange || "--";
const sourceMonthLink = holiday?.monthId
? `<div class="alpha-nav-btns"><button class="alpha-nav-btn" data-nav="calendar-month" data-calendar-id="${holiday.calendarId || ""}" data-month-id="${holiday.monthId}">Open ${calendarLabel(holiday?.calendarId)} ${monthName} -></button></div>`
? `<div class="planet-text detail-inline-value">Source month ${buildInlineNavButton(`${calendarLabel(holiday?.calendarId)} ${monthName}`, "calendar-month", { "calendar-id": holiday.calendarId || "", "month-id": holiday.monthId })}</div>`
: "";
return `
+13 -5
View File
@@ -366,7 +366,7 @@
}
const buttonRow = document.createElement("div");
buttonRow.className = "alpha-nav-btns";
buttonRow.className = "planet-text detail-inline-value";
cards.forEach((cardName) => {
const target = buildTarotTarget(cardName);
@@ -374,10 +374,14 @@
return;
}
if (buttonRow.childNodes.length) {
buttonRow.appendChild(document.createTextNode(", "));
}
const button = document.createElement("button");
button.type = "button";
button.className = "alpha-nav-btn";
button.textContent = `${target.label}`;
button.className = "detail-inline-link";
button.textContent = target.label;
button.addEventListener("click", () => {
document.dispatchEvent(new CustomEvent("nav:tarot-trump", {
detail: target.detail
@@ -416,10 +420,14 @@
}
rows.forEach((month) => {
if (elements.ichingDetailCalendarEl.childNodes.length) {
elements.ichingDetailCalendarEl.appendChild(document.createTextNode(", "));
}
const button = document.createElement("button");
button.type = "button";
button.className = "alpha-nav-btn";
button.textContent = `${month.label || month.name}`;
button.className = "detail-inline-link";
button.textContent = month.label || month.name;
button.addEventListener("click", () => {
document.dispatchEvent(new CustomEvent("nav:calendar-month", {
detail: { monthId: month.id }
+14 -6
View File
@@ -461,14 +461,18 @@
const btn = document.createElement("button");
btn.type = "button";
btn.className = "kab-tarot-link";
btn.textContent = `View Path ${kabPath.pathNumber} in Kabbalah Tree`;
btn.className = "detail-inline-link";
btn.textContent = `Path ${kabPath.pathNumber}`;
btn.addEventListener("click", () => {
document.dispatchEvent(new CustomEvent("tarot:view-kab-path", {
detail: { pathNumber: kabPath.pathNumber }
}));
});
kabPathEl.appendChild(btn);
const inline = document.createElement("div");
inline.className = "planet-text detail-inline-value";
inline.appendChild(document.createTextNode("Kabbalah "));
inline.appendChild(btn);
kabPathEl.appendChild(inline);
kabPathEl.hidden = false;
} else if (kabSeph) {
const hebrewName = kabSeph.nameHebrew ? ` (${kabSeph.nameHebrew})` : "";
@@ -488,14 +492,18 @@
const btn = document.createElement("button");
btn.type = "button";
btn.className = "kab-tarot-link";
btn.textContent = `View Sephirah ${kabSeph.number} in Kabbalah Tree`;
btn.className = "detail-inline-link";
btn.textContent = `Sephirah ${kabSeph.number}`;
btn.addEventListener("click", () => {
document.dispatchEvent(new CustomEvent("tarot:view-kab-path", {
detail: { pathNumber: kabSeph.number }
}));
});
kabPathEl.appendChild(btn);
const inline = document.createElement("div");
inline.className = "planet-text detail-inline-value";
inline.appendChild(document.createTextNode("Kabbalah "));
inline.appendChild(btn);
kabPathEl.appendChild(inline);
kabPathEl.hidden = false;
} else {
kabPathEl.hidden = true;