Files
blogger-nodejs/views/pages/tag.ejs
DeaDvey 8b9ddcf048 Added page indexes for comments, posts, users and pages overall, should
add one for tags but it might be inefficient as I don't store all tags
in an array or anything...
2025-08-02 00:51:33 +01:00

25 lines
768 B
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<%- include('../partials/head'); %>
</head>
<body>
<div id="header">
<%- include('../headers/site_wide'); %>
<%- include('../headers/tag'); %>
</div>
<div id="posts">
<% for (let index = posts.length - 1; index >= 0; index--) { %>
<% posts[index].tags.forEach((current_tag, tag_index) => { %>
<% if (current_tag == tag) { %>
<%- include('../posts/tag', {post: posts[index], postID: index}); %>
<% } %>
<% }) %>
<% } %>
</div>
<footer>
<%- include('../partials/footer'); %>
</footer>
</body>
</html>