Use event date for modal and tighten truth rail
This commit is contained in:
parent
3d7a33b06e
commit
5a9c49ab87
|
|
@ -120,7 +120,7 @@ function applyPostDetails(modalWrap, post) {
|
||||||
if (meta) {
|
if (meta) {
|
||||||
const author = (post?.author || post?.Author || "").toString().trim();
|
const author = (post?.author || post?.Author || "").toString().trim();
|
||||||
const sub = (post?.sub_category || post?.subCategory || "").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 metaLeft = author ? `by ${author}` : "";
|
||||||
const metaRight = sub ? sub : "";
|
const metaRight = sub ? sub : "";
|
||||||
meta.innerHTML = `
|
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) {
|
function truthScore(post) {
|
||||||
const raw = Number(post?.truth_score || post?.truthScore);
|
const raw = Number(post?.truth_score || post?.truthScore);
|
||||||
if (Number.isFinite(raw)) {
|
if (Number.isFinite(raw)) {
|
||||||
|
|
@ -349,7 +360,7 @@ export function openCenteredOverlay({ map, post, theme, fullScreen = false }) {
|
||||||
let postData = { ...(post || {}) };
|
let postData = { ...(post || {}) };
|
||||||
const data = adaptPostToTemplateData(postData);
|
const data = adaptPostToTemplateData(postData);
|
||||||
const cat = normCatLabel(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 author = (postData?.author || postData?.Author || "").toString().trim();
|
||||||
const sub = (postData?.sub_category || postData?.subCategory || "").toString().trim();
|
const sub = (postData?.sub_category || postData?.subCategory || "").toString().trim();
|
||||||
const metaLeft = author ? `by ${author}` : "";
|
const metaLeft = author ? `by ${author}` : "";
|
||||||
|
|
|
||||||
|
|
@ -540,7 +540,8 @@ body[data-theme="light"] .sw-chat-bubble::before{
|
||||||
.sw-truth-rail{
|
.sw-truth-rail{
|
||||||
width: 16px;
|
width: 16px;
|
||||||
min-width: 16px;
|
min-width: 16px;
|
||||||
height: 100%;
|
height: 180px;
|
||||||
|
min-height: 180px;
|
||||||
display:flex;
|
display:flex;
|
||||||
flex-direction:column;
|
flex-direction:column;
|
||||||
align-items:center;
|
align-items:center;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue