jabe/templates/index.ejs
hexlocation's laptop (asiago) bad8050e83 add ui features
2024-03-29 05:52:09 -04:00

24 lines
652 B
Text

<%- include('header') %>
<div id="main-content">
<table>
<!---
<tr>
<th id="title-header">Title</th>
<th id="date-header">Last Edited</th>
</tr>
--->
<% posts = posts.sort((a,b) => {return new Date(b.metadata.mtime) - new Date(a.metadata.mtime)}) %>
<% for(const post of posts) { %>
<tr>
<td class="post-item"><a class="post" href="/post/<%= post.file %>"><%= post.title %></a></td>
<td class="date-item"><%= new Date(post.metadata.mtime).toDateString() %></td>
</tr>
<% } %>
</div>
<style>
#main-content {
font-size: 15px;
}
</style>
<%- include('global-style'); %>
<%- include('footer') %>