Vulcan/client/views/posts/post_item.html

57 lines
2.5 KiB
HTML
Raw Normal View History

2012-09-06 10:18:26 +09:00
<template name="post_item">
<div class="post post-{{rank}} {{#if sticky}}sticky{{/if}} {{inactiveClass}}" id="{{_id}}">
<ul class="post-actions">
<li class="post-share desktop"><a href="#" class="share-link"><i class="icon-share"></i><span class="action">Share</span></a>
<div class="share-options hidden">
2012-09-21 18:54:04 +09:00
{{#constant}}
2012-10-03 16:45:46 +09:00
<div data-url="{{#if url}}{{url}}{{else}}{{current_domain}}/posts/{{_id}}{{/if}}" data-text="{{headline}}" class="share-replace">
</div>
2012-09-21 18:54:04 +09:00
{{/constant}}
</div>
</li>
<li class="post-discuss">
2012-09-29 23:13:23 +09:00
<a class="discuss-link go-to-comments" href="/posts/{{_id}}">
<i class="icon-comment"></i>
<span class="count">{{comments}}</span>
<span class="action">Discuss</span>
</a>
</li>
<li class="post-more mobile"><a class="more-link"><i class="icon-share"></i><span class="action">Text </span></a></li>
</ul>
<div class="post-content">
{{#if showRank}}<span class="post-rank">{{rank}}</span>{{/if}}
<div class="post-upvote">
{{#if voted}}
<span class="upvote-link voted"><i class="icon-check"></i><span>Upvote</span></span>
{{else}}
<a class="upvote-link not-voted" href="#"><i class="icon-up"></i><span>Upvote</span></a>
{{/if}}
</div>
<div class="post-info">
2012-10-02 10:54:04 +09:00
{{#if sticky}}
<span class="post-sticky"><i class="icon-pin"></i><span>Sticky</span></span>
{{/if}}
<h3 class="post-heading">
2012-09-18 10:25:15 +09:00
{{#if url}}
2012-10-01 08:51:54 +09:00
<a href="{{url}}" class="post-title" target="_blank">{{headline}}</a>
2012-09-18 10:25:15 +09:00
{{else}}
<a href="/posts/{{_id}}" class="post-title">{{headline}}</a>
{{/if}}
{{#if url}}<span class="post-domain">{{domain}}</span>{{/if}}
</h3>
2012-10-01 16:08:30 +09:00
<p class="post-meta"><span class="points">{{votes}} <span class="unit">points </span></span>by <a class="post-author" href="/users/{{userId}}">{{authorName}}</a> <span class="post-time">{{ago}}</span><span class="comments">, <a class="go-to-comments" href="/posts/{{_id}}">{{comments}} comments</a></span>
{{#if can_edit}}
2012-09-06 11:09:24 +09:00
| <a href="/posts/{{_id}}/edit" class="edit-link goto-edit">Edit</a>
{{/if}}
{{#if currentUser.isAdmin}}
| status: {{status}}</span>, votes: {{votes}}, baseScore: {{baseScore}}, score: {{short_score}}
{{/if}}
</p>
</div>
</div>
2012-09-08 11:54:08 +09:00
{{#if body}}
<div class="post-message markdown">{{{body_formatted}}}</div>
{{/if}}
</div>
</template>