Browse Source
- Author pages at /post/author/:username - Post timestamp rendering in local time - Post tags at /post/tag/:tagSlug - Changing site icon and default post imagepull/38/head
Andrew
1 year ago
26 changed files with 770 additions and 169 deletions
@ -1,58 +1,27 @@ |
|||
extends ../../layouts/main |
|||
block content |
|||
|
|||
include ../../post/components/draft-list |
|||
include ../../post/components/list |
|||
include ../components/draft-list |
|||
include ../components/list |
|||
include ../../post/components/summary |
|||
|
|||
include ../../components/pagination-bar |
|||
|
|||
section.uk-section.uk-section-default.uk-section-small |
|||
section.uk-section.uk-section-default.uk-section-xsmall |
|||
.uk-container.uk-container-expand |
|||
h1 Post Author Dashboard |
|||
div(uk-grid).uk-flex-middle |
|||
.uk-width-expand |
|||
h2.uk-margin-remove Published Posts |
|||
if user.permissions.canAuthorPosts |
|||
.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.uk-text-bold Create Post |
|||
.uk-width-medium |
|||
a(href= "/author").uk-button.uk-button-primary.uk-border-rounded |
|||
span.uk-margin-small-left.uk-text-bold Author Dashboard |
|||
div(uk-grid) |
|||
.uk-width-2-3 |
|||
.uk-margin |
|||
+renderSectionTitle('Your Posts') |
|||
.content-block |
|||
if published && Array.isArray(published.posts) && (published.posts.length > 0) |
|||
.uk-margin |
|||
ul.uk-list.uk-list-divider |
|||
each post in published.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 |
|||
a( |
|||
href="", |
|||
data-post-id= post._id, |
|||
data-post-title= post.title, |
|||
onclick="return dtp.app.deletePost(event);", |
|||
).uk-display-block.uk-text-danger |
|||
+renderButtonIcon('fa-trash', 'delete') |
|||
|
|||
div(style="width: 65px;") |
|||
span |
|||
i.fas.fa-eye |
|||
span.uk-margin-small-left= formatCount(post.stats.totalVisitCount) |
|||
+renderPaginationBar('/author/post', published.totalPostCount) |
|||
else |
|||
div You have no published posts. |
|||
|
|||
.uk-width-1-3 |
|||
.uk-margin |
|||
+renderSectionTitle('Your Drafts') |
|||
+renderPostDraftList(drafts.posts) |
|||
|
|||
.uk-margin |
|||
+renderSectionTitle('Archived') |
|||
+renderPostList(archive.posts) |
|||
div(class="uk-width-1-1 uk-width-3-3@m") |
|||
+renderSectionTitle('Posts') |
|||
+renderPublishedPostList(published.posts) |
Loading…
Reference in new issue