Cleanup of the code

This commit is contained in:
Bashy 2025-11-21 09:09:26 +01:00
parent 6074b9c152
commit 4f65db4bce
13 changed files with 120 additions and 146 deletions

View file

@ -1 +1,29 @@
<%- include("_partial/article", { page: page }) %>
<div class="post-page post">
<% if(page.photos && page.photos.length) { %>
<div class="post-cover">
<img class="gallery" src="<%- config.root %><%- page.photos[0] %>" alt="<%- page.title || "Untitled" %>">
</div>
<% } %>
<div class="post-text-wrapper">
<div class="post-text">
<div class="post-header">
<h1 class="article"><%= page.title || "Untitled" %></h1>
<span class="smoll"><%- include('_partial/date', { date: page.date.toISOString() }) %> by <%= page.author %></span>
<p><%= page.description %></p>
</div>
<div class="post-content">
<%- page.content %>
</div>
<div class="post-footer">
<div class="tags smoll">
<% if (page.tags) { %>
<% page.tags.data.forEach(function(tag) { %>
<a href="<%= url_for('/tags/' + tag.name) %>">#<%= tag.name %></a>
<% }); %>
<% } else {console.log(page)} %>
</div>
</div>
</div>
</div>
</div>