From 5a9c49ab87d5e32b8c9f9d5014eae71210ce8feb Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 25 Dec 2025 17:09:03 -0500 Subject: [PATCH] Use event date for modal and tighten truth rail --- src/components/Map/markerManager.js | 15 +++++++++++++-- src/styles/mapMarkers.css | 3 ++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/Map/markerManager.js b/src/components/Map/markerManager.js index 8ec7842..74aa23e 100644 --- a/src/components/Map/markerManager.js +++ b/src/components/Map/markerManager.js @@ -120,7 +120,7 @@ function applyPostDetails(modalWrap, post) { if (meta) { const author = (post?.author || post?.Author || "").toString().trim(); const sub = (post?.sub_category || post?.subCategory || "").toString().trim(); - const relTime = formatRelativeTime(post?.created_at || post?.CreatedAt || post?.createdAt); + const relTime = formatRelativeTime(getPostTime(post)); const metaLeft = author ? `by ${author}` : ""; const metaRight = sub ? sub : ""; meta.innerHTML = ` @@ -281,6 +281,17 @@ function formatRelativeTime(createdAt) { } } +function getPostTime(post) { + return ( + post?.published_at || + post?.publishedAt || + post?.PublishedAt || + post?.created_at || + post?.CreatedAt || + post?.createdAt + ); +} + function truthScore(post) { const raw = Number(post?.truth_score || post?.truthScore); if (Number.isFinite(raw)) { @@ -349,7 +360,7 @@ export function openCenteredOverlay({ map, post, theme, fullScreen = false }) { let postData = { ...(post || {}) }; const data = adaptPostToTemplateData(postData); const cat = normCatLabel(postData); - const relTime = formatRelativeTime(postData?.created_at || postData?.CreatedAt || postData?.createdAt); + const relTime = formatRelativeTime(getPostTime(postData)); const author = (postData?.author || postData?.Author || "").toString().trim(); const sub = (postData?.sub_category || postData?.subCategory || "").toString().trim(); const metaLeft = author ? `by ${author}` : ""; diff --git a/src/styles/mapMarkers.css b/src/styles/mapMarkers.css index 6c682ce..6068ad6 100644 --- a/src/styles/mapMarkers.css +++ b/src/styles/mapMarkers.css @@ -540,7 +540,8 @@ body[data-theme="light"] .sw-chat-bubble::before{ .sw-truth-rail{ width: 16px; min-width: 16px; - height: 100%; + height: 180px; + min-height: 180px; display:flex; flex-direction:column; align-items:center;