fix: show post.vertical instead of post.area in card and article labels

This commit is contained in:
oliver
2026-05-15 14:55:42 -03:00
parent fd4e0ea883
commit a95f6c6895
+8 -3
View File
@@ -3300,7 +3300,7 @@
'<div style="flex:1;display:flex;flex-direction:column;">', '<div style="flex:1;display:flex;flex-direction:column;">',
'<div class="news-card-header">', '<div class="news-card-header">',
'<div class="news-area">' + '<div class="news-area">' +
(post.area || "") + (post.vertical || "") +
"</div>", "</div>",
'<span class="news-date">' + '<span class="news-date">' +
formatDate(post.date) + formatDate(post.date) +
@@ -3369,7 +3369,12 @@
var term = (search.value || "").trim().toLowerCase(); var term = (search.value || "").trim().toLowerCase();
filteredPosts = allPosts.filter(function (post) { filteredPosts = allPosts.filter(function (post) {
if (!term) return true; if (!term) return true;
var haystack = [post.title, post.area, post.teaser] var haystack = [
post.title,
post.area,
post.vertical,
post.teaser,
]
.join(" ") .join(" ")
.toLowerCase(); .toLowerCase();
return haystack.indexOf(term) !== -1; return haystack.indexOf(term) !== -1;
@@ -3437,7 +3442,7 @@
function openArticle(index) { function openArticle(index) {
var post = allPosts[index]; var post = allPosts[index];
if (!post) return; if (!post) return;
articleArea.textContent = post.area || ""; articleArea.textContent = post.vertical || "";
articleTitle.textContent = post.title || ""; articleTitle.textContent = post.title || "";
articleDate.textContent = formatDate(post.date); articleDate.textContent = formatDate(post.date);
articleContent.innerHTML = post.content || ""; articleContent.innerHTML = post.content || "";