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.

77 lines
2.6 KiB

extends ../layouts/main-sidebar
block content-header
if post.image
div(style="position: relative;")
img(src=`/image/${post.image._id}`, style="max-height: 420px; object-fit: cover; object-position: top center;").responsive
block content
include ../components/share-buttons
include ../comment/components/comment-list
include ../comment/components/composer
2 years ago
include components/author-credit
article(dtp-post-id= post._id)
.uk-margin
h1.article-title= post.title
.uk-margin
.uk-text-lead= post.summary
div(uk-grid)
.uk-width-auto
+renderGabShareButton(`https://${site.domainKey}/post/${post.slug}`, `${post.title} - ${post.summary}`)
.uk-margin
.uk-article-meta
div(uk-grid).uk-grid-small.uk-flex-top
.uk-width-expand
div #{moment(post.created).format('MMM DD, YYYY, hh:mm a')}, by #[a(href=`/user/${post.author._id}`)= post.author.displayName || post.author.username]
2 years ago
if user && user.permissions.canAuthorPages && post.author._id.equals(user._id)
.uk-width-auto
a(href=`/post/${post._id}/edit`)
+renderButtonIcon('fa-pen', 'edit')
.uk-width-auto
+renderButtonIcon('fa-eye', displayIntegerValue(post.stats.totalViewCount))
.uk-width-auto
+renderButtonIcon('fa-chevron-up', displayIntegerValue(post.stats.upvoteCount))
.uk-width-auto
+renderButtonIcon('fa-chevron-down', displayIntegerValue(post.stats.downvoteCount))
.uk-width-auto
+renderButtonIcon('fa-comment', displayIntegerValue(post.stats.commentCount))
.uk-margin
!= post.content
if post.updated
.uk-margin
.uk-article-meta This post was updated on #{moment(post.updated).format('MMMM DD, YYYY, [at] hh:mm a')}.
.uk-margin
h4 Post author
2 years ago
+renderPostAuthorCredit(post.author)
if user && post.flags.enableComments && user.permissions.canComment
+renderSectionTitle('Add a comment')
.uk-margin
+renderCommentComposer(`/post/${post._id}/comment`)
if featuredComment
#featured-comment.uk-margin-large
.uk-margin
+renderSectionTitle('Linked Comment')
+renderComment(featuredComment)
.uk-margin
+renderSectionTitle('Comments')
.uk-margin
if Array.isArray(comments) && (comments.length > 0)
ul#post-comment-list.uk-list.uk-list-divider.uk-list-large
+renderCommentList(comments, { countPerPage, rootUrl: `/post/${post.slug}/comment` })
else
ul#post-comment-list.uk-list.uk-list-divider.uk-list-large
div There are no comments at this time. Please check back later.