fix: show post.vertical instead of post.area in card and article labels
This commit is contained in:
+8
-3
@@ -3300,7 +3300,7 @@
|
||||
'<div style="flex:1;display:flex;flex-direction:column;">',
|
||||
'<div class="news-card-header">',
|
||||
'<div class="news-area">' +
|
||||
(post.area || "") +
|
||||
(post.vertical || "") +
|
||||
"</div>",
|
||||
'<span class="news-date">' +
|
||||
formatDate(post.date) +
|
||||
@@ -3369,7 +3369,12 @@
|
||||
var term = (search.value || "").trim().toLowerCase();
|
||||
filteredPosts = allPosts.filter(function (post) {
|
||||
if (!term) return true;
|
||||
var haystack = [post.title, post.area, post.teaser]
|
||||
var haystack = [
|
||||
post.title,
|
||||
post.area,
|
||||
post.vertical,
|
||||
post.teaser,
|
||||
]
|
||||
.join(" ")
|
||||
.toLowerCase();
|
||||
return haystack.indexOf(term) !== -1;
|
||||
@@ -3437,7 +3442,7 @@
|
||||
function openArticle(index) {
|
||||
var post = allPosts[index];
|
||||
if (!post) return;
|
||||
articleArea.textContent = post.area || "";
|
||||
articleArea.textContent = post.vertical || "";
|
||||
articleTitle.textContent = post.title || "";
|
||||
articleDate.textContent = formatDate(post.date);
|
||||
articleContent.innerHTML = post.content || "";
|
||||
|
||||
Reference in New Issue
Block a user