-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpost.htm
44 lines (41 loc) · 1.43 KB
/
post.htm
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
title = "Blog Post"
url = "/blog/post/:slug"
layout = "blog"
[blogPost]
slug = {{ :slug }}
categoryPage = "blog/category"
==
<?php
function onEnd()
{
$this->title = $this->blogPost->post->title;
$this->page['heading'] = $this->blogPost->post->title;
}
==
<section id="body" class="py-20 flex-grow">
<div class="container max-w-screen-xl">
<div class="block lg:flex lg:flex-row divide-x divide-gray-100">
<div class="flex-grow-0 px-8 lg:w-3/4">
{{ post.content | md }}
</div>
<div class="flex-grow-0 px-8 mt-16 lg:w-1/4 lg:mt-0">
<div class="mt-4">
<span class="block text-gray-300">Published on</span>
<span class="text-gray-400">{{ post.published_at | date("M d Y \\a\\t g:i a")}}</span>
</div>
<div class="mt-4">
<span class="block text-gray-300">Categories</span>
{% if post.categories|length == 0 %}
<span class="text-gray-400">None</span>
{% else %}
<ul class="text-gray-400">
{% for category in post.categories %}
<li>{{ category.name }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
</div>
</div>
</section>