diff --git a/app/views/author/index.pug b/app/views/author/index.pug index 7248643..1a39922 100644 --- a/app/views/author/index.pug +++ b/app/views/author/index.pug @@ -3,7 +3,25 @@ block content include ../comment/components/comment - section.uk-section.uk-section-default.uk-section-small + 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 @@ -17,21 +35,15 @@ block content 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' }) + ul.uk-list.uk-list-divider each comment in comments li - .uk-margin - a(href=`/post/${comment.resource.slug}`).uk-display-block.uk-link-reset - div(uk-grid).uk-grid-small - if comment.resource.image - .uk-width-auto - img(src= `/image/${comment.resource.image}`).uk-width-small - .uk-width-expand - .uk-text-large.uk-text-bold(style="line-height: 1em;")= comment.resource.title - .uk-text-small.uk-text-muted - div= comment.resource.summary - div= moment(comment.resource.created).fromNow() - +renderComment(comment) + .uk-tile.uk-tile-default.uk-padding-small.uk-padding-remove-horizontal + .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) diff --git a/app/views/post/view.pug b/app/views/post/view.pug index 72283f5..39478b2 100644 --- a/app/views/post/view.pug +++ b/app/views/post/view.pug @@ -1,18 +1,27 @@ extends ../layouts/main-sidebar block content-header - div(style="position: relative;") - img(src=`/image/${post.image._id}`, style="max-height: 420px; object-fit: cover; object-position: top center;").responsive + 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/gab-share-button + include ../comment/components/comment-list include ../comment/components/composer article(dtp-post-id= post._id) .uk-margin h1.article-title= post.title - .uk-text-lead= post.summary + + .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