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.

54 lines
2.2 KiB

extends ../layouts/main
2 years ago
block content
section.uk-section.uk-section-default
.uk-container
h1 Author Dashboard
2 years ago
div(uk-grid)
.uk-width-2-3
+renderSectionTitle('Recent Comments')
2 years ago
.uk-width-1-3
if Array.isArray(drafts) && (drafts.length > 0)
+renderSectionTitle('Drafts')
ul.uk-list.uk-list-divider
each draft in drafts
li
div(uk-grid).uk-grid-small.uk-flex-middle
.uk-width-expand
a(href=`/post/${draft._id}/edit`, title="Edit draft")= draft.title
.uk-article-meta
div(uk-grid).uk-grid-small.uk-text-small
.uk-width-expand
a(href=`/post/${draft.slug}`, title="Edit draft")= moment(draft.created).fromNow()
.uk-width-auto
button(
type="button",
title="Delete draft",
data-draft-id= draft._id,
data-draft-title= draft.title,
onclick="return dtp.app.deleteDraft(event);",
).uk-button.uk-button-danger.uk-button-small
span
i.fas.fa-trash
if Array.isArray(posts) && (posts.length > 0)
+renderSectionTitle('Posts')
ul.uk-list.uk-list-divider
each post in posts
li
a(href=`/post/${post.slug}`).uk-display-block
div= post.title
.uk-article-meta
div(uk-grid).uk-grid-small.uk-text-small
.uk-width-expand
a(href=`/post/${post.slug}`)= moment(post.created).fromNow()
.uk-width-auto
a(href=`/post/${post._id}/edit`).uk-display-block
+renderButtonIcon('fa-pen', 'edit')
.uk-width-auto
span= formatCount(post.stats.totalVisitCount)
span.uk-margin-small-left
i.fas.fa-eye