blob: 238c9352725c9f8d04af961025b8415f2cf29c31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<!DOCTYPE html>
<html>
<head>
<%- include('partials/head') %>
<link rel="stylesheet" href="/css/blog.css">
</head>
<body>
<div id="main-container">
<%- include('partials/navbar') %>
<div id="content-container">
<% if (index) { %>
<div id="content">
<h1>Blog</h1>
<div class="blog-post-header">
<span class="blog-post-title monospace">title</span>
<span class="monospace">date</span>
</div>
<% for (const blog of blogs) { %>
<a class="blog-post" href="/<%= blog.route %>">
<span class="blog-post-title">
<%= blog.metadata.title %>
</span>
<span class="blog-post-date monospace">
<%= blog.metadata.date?.toISOString().substring(0, 10) %>
</span>
</a>
<% } %>
</div>
<% } else { %>
<div id="content">
<div id="back-container">
<div id="back-header">
<a href="/blog" class="monospace">← blog posts</a>
</div>
</div>
<div id="title" class="monospace">
<h1><%= page.metadata.title %></h1>
<span><%= page.metadata.date?.toDateString() %></span>
</div>
<%- page.html %>
<div id="back-footer">
<a href="/blog" class="monospace">← blog posts</a>
</div>
</div>
<% } %>
</div>
</div>
</body>
</html>
|