diff options
| author | rr- | 2016-06-11 17:41:28 +0200 |
|---|---|---|
| committer | rr- | 2016-06-12 12:54:08 +0200 |
| commit | 7e8a9a0948bb0f778eb162455276c2a806ece6ff (patch) | |
| tree | db165982da4698b7771a740e09ca9fb5afaadd09 /client/html/comment.tpl | |
| parent | 0908323290d55cf5f69218cd3f7689d55d2442b5 (diff) | |
client/comments: add comment list view for post
Diffstat (limited to 'client/html/comment.tpl')
| -rw-r--r-- | client/html/comment.tpl | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/client/html/comment.tpl b/client/html/comment.tpl new file mode 100644 index 0000000..aac6346 --- /dev/null +++ b/client/html/comment.tpl @@ -0,0 +1,75 @@ +<div class='comment'> + <div class='avatar'> + <% if (ctx.comment.user.name && ctx.canViewUsers) { %> + <a href='/user/<%= ctx.comment.user.name %>'> + <% } %> + + <%= ctx.makeThumbnail(ctx.comment.user.avatarUrl) %> + + <% if (ctx.comment.user.name && ctx.canViewUsers) { %> + </a> + <% } %> + </div> + + <div class='body'> + <header><!-- + --><span class='nickname'><!-- + --><% if (ctx.comment.user.name && ctx.canViewUsers) { %><!-- + --><a href='/user/<%= ctx.comment.user.name %>'><!-- + --><% } %><!-- + + --><%= ctx.comment.user.name %><!-- + + --><% if (ctx.comment.user.name && ctx.canViewUsers) { %><!-- + --></a><!-- + --><% } %><!-- + --></span><!-- + + --><span class='date'><!-- + --><%= ctx.makeRelativeTime(ctx.comment.creationTime) %><!-- + --></span><!-- + + --><span class='score-container'></span><!-- + + --><% if (ctx.canEditComment) { %><!-- + --><a class='edit' href='#'><!-- + --><i class='fa fa-pencil'></i> edit<!-- + --></a><!-- + --><% } %><!-- + + --><% if (ctx.canDeleteComment) { %><!-- + --><a class='delete' href='#'><!-- + --><i class='fa fa-remove'></i> delete<!-- + --></a><!-- + --><% } %><!-- + --></header> + + <div class='tabs'> + <form> + <div class='tabs-wrapper'> + <div class='preview tab'> + <div class='content-wrapper'><div class='content'><%= ctx.makeMarkdown(ctx.comment.text) %></div></div> + </div> + + <div class='edit tab'> + <textarea required minlength=1><%= ctx.comment.text %></textarea> + </div> + </div> + + <nav class='buttons'> + <ul> + <li class='preview'><a href='#'>Preview</a></li> + <li class='edit'><a href='#'>Edit</a></li> + </ul> + </nav> + + <nav class='actions'> + <input type='submit' class='save' value='Save'/> + <input type='button' class='cancel discourage' value='Cancel'/> + </nav> + </form> + + <div class='messages'></div> + </div> + </div> +</div> |