updated relationship display in cycle details to use inline links instead of alpha nav buttons, and added related cycle links to planet details; added element display to astrology alphabet details; updated decan range display in calendar detail panels; updated tarot card detail script to latest version; added element script to index.html

This commit is contained in:
2026-04-24 04:25:27 -07:00
parent e18ec31cf9
commit 7cdcdb4456
12 changed files with 473 additions and 109 deletions
+35 -7
View File
@@ -27,6 +27,26 @@
return `<button class="${className}" data-nav="${nav}" ${dataAttrs}>${label}</button>`;
}
function buildSignInlineButton(signId, signName, signSymbol) {
if (!signId) {
return `${signSymbol ? `${signSymbol} ` : ""}${signName || "--"}`.trim();
}
const label = `${signSymbol ? `${signSymbol} ` : ""}${signName || signId}`.trim();
return inlineNavButton(label, "zodiac", { "sign-id": signId });
}
function buildHebrewInlineButton(hebrewLetterId, label) {
if (!hebrewLetterId) {
return label || "--";
}
return inlineNavButton(label || hebrewLetterId, "alphabet", {
alphabet: "hebrew",
"hebrew-letter-id": hebrewLetterId
});
}
function buildMajorArcanaRowsForMonth(context) {
const { month, api, getState } = context;
const currentState = getState();
@@ -142,6 +162,8 @@
? `${row.hebrewLetterChar ? `${row.hebrewLetterChar} ` : ""}${row.hebrewLetterName || row.hebrewLetterId}`
: "--";
const displayCardName = api.getDisplayTarotName(row.cardName, row.trumpNumber);
const signLabel = buildSignInlineButton(row.signId, row.signName, row.signSymbol);
const hebrewLabel = buildHebrewInlineButton(row.hebrewLetterId, label);
return `
<div class="cal-item-row">
@@ -149,11 +171,12 @@
<span class="cal-item-name">${displayCardName}${row.trumpNumber != null ? ` · Trump ${row.trumpNumber}` : ""}</span>
<span class="planet-list-meta">${row.rangeLabel}</span>
</div>
<div class="planet-list-meta">${row.signSymbol} ${row.signName} · Hebrew: ${label}</div>
<div class="planet-list-meta">${signLabel} · Hebrew: ${hebrewLabel}</div>
<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 })}` : ""}
${row.hebrewLetterId ? ` · Hebrew ${hebrewLabel}` : ""}
${row.signId ? ` · Zodiac ${signLabel}` : ""}
</div>
</div>
`;
@@ -202,13 +225,14 @@
const list = rows.map((row) => {
const displayCardName = api.getDisplayTarotName(row.cardName);
const signLabel = buildSignInlineButton(row.signId, row.signName, row.signSymbol);
return `
<div class="cal-item-row">
<div class="cal-item-head">
<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>
<span class="cal-item-name">${signLabel} · Decan ${row.decanIndex}</span>
<span class="planet-list-meta">${row.degreeRangeLabel || `${row.startDegree}°–${row.endDegree}°`} · ${row.dateRange}</span>
</div>
<div class="planet-text detail-inline-value">Tarot ${inlineNavButton(displayCardName, "tarot-card", { "card-name": row.cardName })}</div>
<div class="planet-text detail-inline-value">Tarot ${inlineNavButton(displayCardName, "tarot-card", { "card-name": row.cardName })} · Zodiac ${signLabel}</div>
</div>
`;
}).join("");
@@ -291,6 +315,10 @@
const { month, api, getState, buildAssociationButtons, renderHolidaysCard } = context;
const currentState = getState();
const gregorianStartDate = api.getGregorianReferenceDateForCalendarMonth(month);
const zodiacSignId = month?.associations?.zodiacSignId || findSignIdByAstrologyName(month?.zodiacSign, context);
const zodiacLabel = buildSignInlineButton(zodiacSignId, api.cap(month.zodiacSign) || "--", "");
const hebrewLetterId = month?.associations?.hebrewLetterId || String(month?.hebrewLetterId || "").trim();
const hebrewLabel = buildHebrewInlineButton(hebrewLetterId, month.hebrewLetter || "--");
const factsRows = [
["Hebrew Name", month.nativeName || "--"],
["Month Order", month.leapYearOnly ? `${month.order} (leap year only)` : String(month.order)],
@@ -298,10 +326,10 @@
["Month Start (Gregorian)", api.formatGregorianReferenceDate(gregorianStartDate)],
["Days", month.daysVariant ? `${month.days}${month.daysVariant} (varies)` : String(month.days || "--")],
["Season", month.season || "--"],
["Zodiac Sign", api.cap(month.zodiacSign) || "--"],
["Zodiac Sign", zodiacLabel],
["Tribe of Israel", month.tribe || "--"],
["Sense", month.sense || "--"],
["Hebrew Letter", month.hebrewLetter || "--"]
["Hebrew Letter", hebrewLabel]
].map(([dt, dd]) => `<dt>${dt}</dt><dd>${dd}</dd>`).join("");
const monthOrder = Number(month?.order);