Added basic theme
This commit is contained in:
parent
a085ca6867
commit
8b9afa66ce
42 changed files with 5633 additions and 0 deletions
27
themes/custom/layout/archive.ejs
Normal file
27
themes/custom/layout/archive.ejs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<div class="main-content meethigher-scroll">
|
||||
<% let postsArr = [];
|
||||
site.posts.forEach(function (post) {
|
||||
postsArr.push(post);
|
||||
});
|
||||
let compare = function (obj1, obj2) {
|
||||
var val1 = obj1.date;
|
||||
var val2 = obj2.date;
|
||||
if (val1 > val2) {
|
||||
return -1;
|
||||
} else if (val1 < val2) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
postsArr = postsArr.sort(compare);
|
||||
%>
|
||||
<div class="tag-tags">
|
||||
<span class="tags-title">Archive - Total of <%= postsArr.length %> posts.</span>
|
||||
<ul class="posts-all">
|
||||
<% postsArr.forEach(function(post){ %>
|
||||
<li><span><%= time(post.date, "YYYY-MM-DD") %></span><a href="<%- url_for("/") %><%= post.path %>"><%= post.title %></a></li>
|
||||
<% }) %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue