mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
55 lines
2.7 KiB
HTML
55 lines
2.7 KiB
HTML
<template name="post_item">
|
|
{{# with post}}
|
|
<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">{{i18n 'Share'}}</span></a>
|
|
<div class="share-options hidden">
|
|
<div data-url="{{#if url}}{{outgoingUrl}}{{else}}{{current_domain}}/posts/{{_id}}{{/if}}" data-text="{{headline}}" class="share-replace">
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li class="post-discuss">
|
|
<a class="discuss-link go-to-comments" href="/posts/{{_id}}">
|
|
<i class="icon-comment"></i>
|
|
<span class="count">{{comments}}</span>
|
|
<span class="action">{{i18n '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 oneBasedRank}}<span class="post-rank">{{oneBasedRank}}</span>{{/if}}
|
|
<div class="post-upvote">
|
|
{{#if voted}}
|
|
<span class="upvote-link voted"><i class="icon-check"></i><span>{{i18n "Upvote"}}</span></span>
|
|
{{else}}
|
|
<a class="upvote-link not-voted" href="#"><i class="icon-up"></i><span>{{i18n "Upvote"}}</span></a>
|
|
{{/if}}
|
|
</div>
|
|
<div class="post-info">
|
|
{{#if sticky}}
|
|
<span class="post-sticky"><i class="icon-pin"></i><span>{{i18n "Sticky"}}</span></span>
|
|
{{/if}}
|
|
<h3 class="post-heading">
|
|
<a href="{{postLink}}" class="post-title" target="{{postTarget}}">{{headline}}</a>
|
|
{{#if url}}<span class="post-domain">{{domain}}</span>{{/if}}
|
|
{{#each categories}}
|
|
<a href="{{categoryLink}}" class="post-category category-{{slug}}">{{name}}</a>
|
|
{{/each}}
|
|
</h3>
|
|
<p class="post-meta"><span class="points">{{votes}} <span class="unit">{{pointsUnitDisplayText}} </span></span>by <a class="post-author" href="{{profileUrl}}">{{authorName}}</a> <span class="post-time">{{ago}}</span><span class="comments">, <a class="go-to-comments" href="/posts/{{_id}}">{{comments}} {{commentsDisplayText}}</a></span>
|
|
{{#if can_edit}}
|
|
| <a href="/posts/{{_id}}/edit" class="edit-link goto-edit">Edit</a>
|
|
{{/if}}
|
|
{{#if currentUser.isAdmin}}
|
|
| {{i18n "status"}}: {{status}}, {{i18n "votes"}}: {{votes}}, {{i18n "baseScore"}}: {{baseScore}}, {{i18n "score"}}: {{short_score}}, {{i18n "clicks"}}: {{clicks}}
|
|
{{/if}}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{{#if body}}
|
|
<div class="post-message markdown">{{{body_formatted}}}</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/with}}
|
|
</template>
|