|
|
|
extends ../layouts/main
|
|
|
|
block content
|
|
|
|
|
|
|
|
include ../comment/components/comment
|
|
|
|
|
|
|
|
mixin renderPostSummaryFull (post)
|
|
|
|
div(uk-grid).uk-grid-small
|
|
|
|
if post.image
|
|
|
|
.uk-width-auto
|
|
|
|
img(src= `/image/${post.image}`).uk-width-small
|
|
|
|
.uk-width-expand
|
|
|
|
.uk-text-large.uk-text-bold(style="line-height: 1em;")= post.title
|
|
|
|
.uk-text-small.uk-text-muted
|
|
|
|
div= post.summary
|
|
|
|
div= moment(post.created).fromNow()
|
|
|
|
|
|
|
|
mixin renderPostSummary (post)
|
|
|
|
div(uk-grid).uk-grid-small.uk-flex-middle
|
|
|
|
div(class="uk-width-1-1 uk-width-expand")
|
|
|
|
.uk-text-large.uk-text-bold(style="line-height: 1em;")= post.title
|
|
|
|
div(class="uk-width-1-1 uk-width-auto")
|
|
|
|
div= moment(post.created).fromNow()
|
|
|
|
|
|
|
|
section.uk-section.uk-section-default.uk-section-xsmall
|
|
|
|
.uk-container.uk-container-expand
|
|
|
|
div(uk-grid).uk-flex-middle
|
|
|
|
.uk-width-expand
|
|
|
|
h1.uk-margin-remove Author Dashboard
|
|
|
|
.uk-width-auto
|
|
|
|
a(href= "/post/compose").uk-button.uk-button-primary.uk-border-rounded
|
|
|
|
span
|
|
|
|
i.fas.fa-plus
|
|
|
|
span.uk-margin-small-left Create Post
|
|
|
|
|
|
|
|
div(uk-grid)
|
|
|
|
div(class="uk-width-1-1 uk-width-2-3@m")
|
|
|
|
+renderSectionTitle('Recent Comments', { url: '/author/comments', title: 'See All', label: 'SEE ALL' })
|
|
|
|
|
|
|
|
.uk-tile.uk-tile-default.uk-tile-small
|
|
|
|
ul#post-comment-list.uk-list.uk-list-divider.uk-list-large
|
|
|
|
each comment in comments
|
|
|
|
li
|
|
|
|
.uk-margin
|
|
|
|
a(href=`/post/${comment.resource.slug}`).uk-display-block.uk-link-reset
|
|
|
|
+renderPostSummary(comment.resource)
|
|
|
|
+renderComment(comment, { })
|
|
|
|
|
|
|
|
div(class="uk-width-1-1 uk-width-1-3@m")
|
|
|
|
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
|