fix: align blog renderer field names with posts.json schema
This commit is contained in:
+11
-12
@@ -2858,24 +2858,23 @@
|
|||||||
|
|
||||||
function postMarkup(post) {
|
function postMarkup(post) {
|
||||||
return [
|
return [
|
||||||
'<a class="news-card" href="' + post.link + '">',
|
'<div class="news-card">',
|
||||||
'<img class="news-card-image" src="' +
|
post.image ? '<img class="news-card-image" src="' +
|
||||||
post.image +
|
post.image +
|
||||||
'" alt="' +
|
'" alt="' +
|
||||||
post.headline.replace(/"/g, """) +
|
post.title.replace(/"/g, """) +
|
||||||
'">',
|
'">' : '',
|
||||||
'<div class="news-card-body">',
|
'<div class="news-card-body">',
|
||||||
"<div>",
|
"<div>",
|
||||||
'<div class="news-area">' + post.vertical + "</div>",
|
'<div class="news-area">' + post.area + "</div>",
|
||||||
'<h3 class="news-title">' + post.headline + "</h3>",
|
'<h3 class="news-title">' + post.title + "</h3>",
|
||||||
'<p class="news-teaser">' + post.shortText + "</p>",
|
'<p class="news-teaser">' + post.teaser + "</p>",
|
||||||
'<span class="news-date">' +
|
'<span class="news-date">' +
|
||||||
formatDate(post.date) +
|
formatDate(post.date) +
|
||||||
"</span>",
|
"</span>",
|
||||||
"</div>",
|
"</div>",
|
||||||
'<span class="news-link">Read article →</span>',
|
|
||||||
"</div>",
|
"</div>",
|
||||||
"</a>",
|
"</div>",
|
||||||
].join("");
|
].join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2921,9 +2920,9 @@
|
|||||||
filteredPosts = allPosts.filter(function (post) {
|
filteredPosts = allPosts.filter(function (post) {
|
||||||
if (!term) return true;
|
if (!term) return true;
|
||||||
var haystack = [
|
var haystack = [
|
||||||
post.headline,
|
post.title,
|
||||||
post.vertical,
|
post.area,
|
||||||
post.shortText,
|
post.teaser,
|
||||||
]
|
]
|
||||||
.join(" ")
|
.join(" ")
|
||||||
.toLowerCase();
|
.toLowerCase();
|
||||||
|
|||||||
Reference in New Issue
Block a user