24 lines
777 B
Plaintext
24 lines
777 B
Plaintext
mixin post(post)
|
|
.card.p-2.mb-3.post(class=`${post.teaser ? 'teaser' : 'full'}`)
|
|
.post-meta.mb-3
|
|
.float-right
|
|
+date(post.date)
|
|
.post-meta--author
|
|
a(href=`${post.author.link}`): img.mr-3(src=`${post.author.avatar}`)
|
|
a(href=`${post.author.link}`)= post.author.login
|
|
header
|
|
if post.teaser
|
|
h2: a(href=`${cogear.baseUrl}${post.uri}`)= post.title
|
|
else
|
|
h1= post.title
|
|
.post-content!= post.teaser ? post.teaser : post.content
|
|
if !post.teaser
|
|
ul.mt-3.pagination
|
|
li.page-item
|
|
a.page-link(href="javascript: history.back()") ← Back
|
|
mixin date(date)
|
|
- let months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
|
|
- let d = new Date(date)
|
|
- month = months[d.getMonth()]
|
|
time= `${month} ${d.getDate()}`
|