mirror of https://gitgud.io/fatchan/jschan.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
980 B
25 lines
980 B
mixin newspost(post, globalmanage=false)
|
|
.table-container.flex-center.mv-5
|
|
.anchor(id=post._id)
|
|
table
|
|
tr
|
|
th
|
|
if globalmanage === true
|
|
input.left.post-check(type='checkbox', name='checkednews' value=post._id)
|
|
a.left(href=`/news.html#${post._id}`) #{post.title}
|
|
if globalmanage === true
|
|
a.right.ml-5(href=`/globalmanage/editnews/${post._id}.html`) [#{__('Edit')}]
|
|
- const newsDate = new Date(post.date);
|
|
time.right.reltime(datetime=newsDate.toISOString()) #{newsDate.toLocaleString(undefined, {hourCycle:'h23'})}
|
|
tr
|
|
td
|
|
if globalmanage === true
|
|
p.no-m-p #{`${post.message.raw.substring(0,50)}...`}
|
|
else
|
|
pre.post-message.no-m-p !{post.message.markdown}
|
|
|
|
if post.edited
|
|
small.right.cb.edited
|
|
| #{__('Last edited')}
|
|
- const newsEditDate = new Date(post.edited);
|
|
time.reltime(datetime=newsEditDate.toISOString()) #{newsEditDate.toLocaleString(undefined, {hourCycle:'h23'})}
|
|
|