mirror of
https://gitlab.com/OpenAlt/OpenAltRO/openalt_ro.git
synced 2026-11-23 15:19:15 +00:00
Cleanup of the code
This commit is contained in:
parent
6074b9c152
commit
4f65db4bce
13 changed files with 120 additions and 146 deletions
|
|
@ -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>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="narrow_view">
|
||||
<div>
|
||||
<% page.posts.forEach(function(post) { %>
|
||||
<%- include('post_feed',
|
||||
<%- include('post_preview',
|
||||
{ post: post,
|
||||
source: "feed"
|
||||
}) %>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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 %>
|
||||
<% } %>
|
||||
<% }); %>
|
||||
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>
|
||||
|
|
@ -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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue