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,29 +0,0 @@
<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('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>

View file

@ -1,6 +1,6 @@
<div class="narrow_view">
<div>
<% page.posts.forEach(function(post) { %>
<%- include('post_feed',
<%- include('post_preview',
{ post: post,
source: "feed"
}) %>

View file

@ -1,23 +0,0 @@
<section id="feed_preview">
<div class="feed_preview">
<% counter = 3 %>
<% page.posts.forEach(function(post) { %>
<% if (counter != 0) { %>
<% isEvent = false %>
<% post.tags.data.forEach(function(tag) { %>
<% if (tag.name == "Events") { %>
<% isEvent = true %>
<% } %>
<% }); %>
<% if (isEvent == false) { %>
<%- include('./../post_feed',
{ post: post,
source: "index"
}) %>
<% counter = counter - 1 %>
<% } %>
<% } %>
<% }); %>
</div>
</section>

View file

@ -3,7 +3,7 @@
<% page.posts.forEach(function(post) { %>
<% post.tags.data.forEach(function(tag) { %>
<% if ( (tag.name == "Events") && (counter != 0) ) { %>
<%- include('./../post_feed', { post: post, source: "index", event: counter }) %>
<%- include('post_preview', { post: post, source: "index", event: counter }) %>
<% counter = counter - 1 %>
<% } %>
<% }); %>

View file

@ -0,0 +1,21 @@
<section id="minifeed">
<% counter = 3 %>
<% page.posts.forEach(function(post) { %>
<% if (counter != 0) { %>
<% isEvent = false %>
<% post.tags.data.forEach(function(tag) { %>
<% if (tag.name == "Events") { %>
<% isEvent = true %>
<% } %>
<% }); %>
<% if (isEvent == false) { %>
<%- include('post_preview',
{ post: post,
source: "index"
}) %>
<% counter = counter - 1 %>
<% } %>
<% } %>
<% }); %>
</section>

View file

@ -5,14 +5,10 @@
</div>
<div class="partners">
<ul class="partners">
<% site.data.partners.forEach(function(partner) { %>
<li>
<a href="<%= partner.url %>">
<img src="<%= partner.logo %>" alt="<%= partner.name %>">
</a>
</li>
<% }); %>
</ul>
</div>
</section>