client/home: show who featured the post

This commit is contained in:
rr- 2016-05-29 12:48:51 +02:00
parent abef6e5c35
commit aa71ccb02c
3 changed files with 11 additions and 3 deletions

View File

@ -22,8 +22,8 @@
width: auto width: auto
aside aside
margin-top: 0.2em margin-bottom: 0.5em
margin-bottom: 1em font-size: 90%
footer footer
font-size: 80% font-size: 80%

View File

@ -38,7 +38,13 @@
<% if (ctx.featuredPost) { %> <% if (ctx.featuredPost) { %>
<aside> <aside>
<%= ctx.makePostLink(ctx.featuredPost.id) %> <%= ctx.makePostLink(ctx.featuredPost.id) %>
uploaded &bull;
Featured
<%= ctx.makeRelativeTime(ctx.featuringTime) %>
by
<%= ctx.makeUserLink(ctx.featuringUser) %>
&bull;
Posted
<%= ctx.makeRelativeTime(ctx.featuredPost.creationTime) %> <%= ctx.makeRelativeTime(ctx.featuredPost.creationTime) %>
by by
<%= ctx.makeUserLink(ctx.featuredPost.user) %> <%= ctx.makeUserLink(ctx.featuredPost.user) %>

View File

@ -31,6 +31,8 @@ class HomeController {
diskUsage: response.diskUsage, diskUsage: response.diskUsage,
postCount: response.postCount, postCount: response.postCount,
featuredPost: response.featuredPost, featuredPost: response.featuredPost,
featuringUser: response.featuringUser,
featuringTime: response.featuringTime,
}); });
}, },
response => { response => {