Hide hidden blog posts

This commit is contained in:
bingus_violet 2024-07-09 16:28:20 -05:00
parent b07efd1f84
commit 67d2e2174e

View file

@ -308,14 +308,16 @@ function converter(html, dynamic = true) {
var addedHTML = "" var addedHTML = ""
for (var i in api.blogPosts) { for (var i in api.blogPosts) {
var post = api.blogPosts[i] var post = api.blogPosts[i]
addedHTML += if (!post.hidden) {
`<div class="post"> addedHTML +=
<a style="text-decoration: none;" href="./${post.folder}"> `<div class="post">
<h2>${post.title}</h2> <a style="text-decoration: none;" href="./${post.folder}">
<p style="color: white; font-size: 1rem;">${post.desc}</p> <h2>${post.title}</h2>
<p style="color: darkgray; font-size: 1rem;">Path: <span class="noHighlight">/${post.folder}/</span></p> <p style="color: white; font-size: 1rem;">${post.desc}</p>
</a> <p style="color: darkgray; font-size: 1rem;">Path: <span class="noHighlight">/${post.folder}/</span></p>
</div>` </a>
</div>`
}
} }
if (!api.blogConnected) { if (!api.blogConnected) {
addedHTML += "<p>Not connected to blog server :(</p>" addedHTML += "<p>Not connected to blog server :(</p>"