mirror of
https://gitlab.com/OpenAlt/OpenAltRO/openalt_ro.git
synced 2026-11-23 23:29:14 +00:00
Cleanup of the code
This commit is contained in:
parent
6074b9c152
commit
4f65db4bce
13 changed files with 120 additions and 146 deletions
21
themes/openalt/layout/_partial/index_minifeed.ejs
Normal file
21
themes/openalt/layout/_partial/index_minifeed.ejs
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue