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
+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) {