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:
+91
-21
@@ -104,6 +104,71 @@
|
||||
return list;
|
||||
}
|
||||
|
||||
function createAstrologyValue(astrology, context) {
|
||||
const type = toDisplayText(astrology?.type).toLowerCase();
|
||||
const name = toDisplayText(astrology?.name);
|
||||
|
||||
if (!name) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (type === "planet") {
|
||||
return createInlineEventLink(name, "nav:planet", {
|
||||
planetId: context.normalizeId(name)
|
||||
});
|
||||
}
|
||||
|
||||
if (type === "zodiac") {
|
||||
return createInlineEventLink(name, "nav:zodiac", {
|
||||
signId: context.normalizeId(name)
|
||||
});
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
function createElementValue(elementName, context) {
|
||||
const label = toDisplayText(elementName);
|
||||
const elementId = context.normalizeId(label);
|
||||
|
||||
if (!elementId) {
|
||||
return label;
|
||||
}
|
||||
|
||||
return createInlineEventLink(label, "nav:elements", { elementId });
|
||||
}
|
||||
|
||||
function appendPathAssociationRows(rows, pathEntry, context) {
|
||||
if (!Array.isArray(rows) || !pathEntry) {
|
||||
return;
|
||||
}
|
||||
|
||||
const astrologyValue = createAstrologyValue(pathEntry?.astrology, context);
|
||||
if (astrologyValue) {
|
||||
rows.push({ label: "Astrology", value: astrologyValue });
|
||||
}
|
||||
|
||||
const tarotCard = toDisplayText(pathEntry?.tarot?.card);
|
||||
const tarotTrumpNumber = context.toFiniteNumber(pathEntry?.tarot?.trumpNumber);
|
||||
if (tarotCard || tarotTrumpNumber != null) {
|
||||
rows.push({
|
||||
label: "Tarot",
|
||||
value: createInlineEventLink(tarotCard || `Trump ${tarotTrumpNumber}`, "nav:tarot-trump", {
|
||||
cardName: tarotCard,
|
||||
trumpNumber: tarotTrumpNumber
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
const pathNo = context.toFiniteNumber(pathEntry?.pathNumber);
|
||||
if (pathNo != null) {
|
||||
rows.push({
|
||||
label: "Path",
|
||||
value: createInlineEventLink(`Path ${pathNo}`, "nav:kabbalah-path", { pathNo })
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function createNavButton(label, eventName, detail) {
|
||||
const button = document.createElement("button");
|
||||
button.type = "button";
|
||||
@@ -155,7 +220,7 @@
|
||||
})
|
||||
: centerLetterText
|
||||
},
|
||||
{ label: "Element", value: center?.element }
|
||||
{ label: "Element", value: createElementValue(center?.element, context) || center?.element }
|
||||
];
|
||||
|
||||
if (centerTarotCard || centerTrumpNo != null) {
|
||||
@@ -225,9 +290,8 @@
|
||||
const pathNo = toFiniteNumber(connectorPath?.pathNumber);
|
||||
const tarotCard = toDisplayText(connectorPath?.tarot?.card);
|
||||
const tarotTrumpNumber = toFiniteNumber(connectorPath?.tarot?.trumpNumber);
|
||||
const astrologyType = toDisplayText(connectorPath?.astrology?.type);
|
||||
const astrologyName = toDisplayText(connectorPath?.astrology?.name);
|
||||
const astrologySummary = [astrologyType, astrologyName].filter(Boolean).join(": ");
|
||||
const astrologySummary = createAstrologyValue(connectorPath?.astrology, context)
|
||||
|| [toDisplayText(connectorPath?.astrology?.type), toDisplayText(connectorPath?.astrology?.name)].filter(Boolean).join(": ");
|
||||
|
||||
elements.detailNameEl.textContent = connector?.name || "Mother Connector";
|
||||
elements.detailSubEl.textContent = ["Mother Letter", letterText].filter(Boolean).join(" · ") || "Mother Letter";
|
||||
@@ -329,9 +393,8 @@
|
||||
const edgeLetterId = getEdgeLetterId(selectedEdge);
|
||||
const edgeLetter = getEdgeLetter(selectedEdge);
|
||||
const edgePath = getEdgePathEntry(selectedEdge);
|
||||
const astrologyType = toDisplayText(edgePath?.astrology?.type);
|
||||
const astrologyName = toDisplayText(edgePath?.astrology?.name);
|
||||
const astrologySymbol = getEdgeAstrologySymbol(selectedEdge);
|
||||
const astrologyName = toDisplayText(edgePath?.astrology?.name);
|
||||
const astrologyText = astrologySymbol && astrologyName
|
||||
? `${astrologySymbol} ${astrologyName}`
|
||||
: astrologySymbol || astrologyName;
|
||||
@@ -361,12 +424,7 @@
|
||||
},
|
||||
{
|
||||
label: "Astrology",
|
||||
value: astrologyType === "zodiac" && astrologyName
|
||||
? createInlineValue([
|
||||
astrologySymbol ? `${astrologySymbol} ` : "",
|
||||
createInlineEventLink(astrologyName, "nav:zodiac", { signId: normalizeId(astrologyName) })
|
||||
])
|
||||
: astrologyText
|
||||
value: createAstrologyValue(edgePath?.astrology, context) || astrologyText
|
||||
}
|
||||
];
|
||||
|
||||
@@ -420,6 +478,7 @@
|
||||
getWallEdgeDirections,
|
||||
getWallFaceLetterId,
|
||||
getWallFaceLetter,
|
||||
getPathEntryByLetterId,
|
||||
getHebrewLetterName,
|
||||
getEdgeLetter,
|
||||
localDirectionOrder,
|
||||
@@ -458,6 +517,7 @@
|
||||
bodyEl.innerHTML = "";
|
||||
|
||||
const wallAssociations = wall.associations || {};
|
||||
const faceLetterPath = getPathEntryByLetterId(wallFaceLetterId);
|
||||
const wallFaceLetterName = getHebrewLetterName(wallFaceLetterId) || toDisplayText(wallFaceLetterId);
|
||||
const faceLetterLabel = [wallFaceLetter, wallFaceLetterName].filter(Boolean).join(" ");
|
||||
const wallRows = [
|
||||
@@ -478,7 +538,7 @@
|
||||
})
|
||||
: wallFaceLetterText
|
||||
},
|
||||
{ label: "Element", value: wall.element },
|
||||
{ label: "Element", value: createElementValue(wall.element, context) || wall.element },
|
||||
{
|
||||
label: "Planet",
|
||||
value: wallAssociations.planetId
|
||||
@@ -497,6 +557,22 @@
|
||||
}
|
||||
];
|
||||
|
||||
if (faceLetterPath) {
|
||||
appendPathAssociationRows(wallRows, faceLetterPath, context);
|
||||
} else {
|
||||
const directTarotCard = toDisplayText(wallAssociations?.tarotCard || wall?.tarotCard);
|
||||
const directTrumpNumber = toFiniteNumber(wallAssociations?.tarotTrumpNumber);
|
||||
if (directTarotCard || directTrumpNumber != null) {
|
||||
wallRows.push({
|
||||
label: "Tarot",
|
||||
value: createInlineEventLink(directTarotCard || `Trump ${directTrumpNumber}`, "nav:tarot-trump", {
|
||||
cardName: directTarotCard,
|
||||
trumpNumber: directTrumpNumber
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
bodyEl.appendChild(createMetaCard("Wall Details", createDetailList(wallRows)));
|
||||
|
||||
if (Array.isArray(wall.keywords) && wall.keywords.length) {
|
||||
@@ -612,9 +688,8 @@
|
||||
? [edgeLetter, edgeLetterName].filter(Boolean).join(" ")
|
||||
: "";
|
||||
const edgePath = getEdgePathEntry(edge);
|
||||
const astrologyType = toDisplayText(edgePath?.astrology?.type);
|
||||
const astrologyName = toDisplayText(edgePath?.astrology?.name);
|
||||
const astrologySymbol = getEdgeAstrologySymbol(edge);
|
||||
const astrologyName = toDisplayText(edgePath?.astrology?.name);
|
||||
const astrologyText = astrologySymbol && astrologyName
|
||||
? `${astrologySymbol} ${astrologyName}`
|
||||
: astrologySymbol || astrologyName;
|
||||
@@ -655,12 +730,7 @@
|
||||
},
|
||||
{
|
||||
label: "Astrology",
|
||||
value: astrologyType === "zodiac" && astrologyName
|
||||
? createInlineValue([
|
||||
astrologySymbol ? `${astrologySymbol} ` : "",
|
||||
createInlineEventLink(astrologyName, "nav:zodiac", { signId: normalizeId(astrologyName) })
|
||||
])
|
||||
: astrologyText
|
||||
value: createAstrologyValue(edgePath?.astrology, context) || astrologyText
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user