44 lines
1.4 KiB
HTML
44 lines
1.4 KiB
HTML
<div class="post{%if not inlist %} single-post{% endif %}{% if not post.published %} unpublished-post{% endif %}">
|
|
<div class="header">
|
|
{% if inlist %}
|
|
<a href="{{context}}{{post|post-url}}"><h2>{{post.title}}</h2></a>
|
|
{% else %}
|
|
<h2>{{post.title}}</h2>
|
|
{% endif %}
|
|
<div>
|
|
<div class="pull-left">
|
|
<span class="muted">Posted by {{post.user}}, <time title="{{post.created_at|to_fulltime}}">{{post.created_at|to_relative}}</time></span>
|
|
</div>
|
|
{% if user-id %}
|
|
<div class="pull-right">
|
|
<a class="btn btn-mini" href="{{context}}/editpost/{{post._id}}">Edit</a>
|
|
<a class="btn btn-mini btn-danger" data-deletepostid="{{post._id}}" href="#">Delete</a>
|
|
{% if post.published %}
|
|
<a class="btn btn-mini btn-warning" href="{{context}}/unpublish/{{post._id}}">Unpublish</a>
|
|
{% endif %}
|
|
{% if not post.published %}
|
|
<a class="btn btn-mini btn-success" data-publishpostid="{{post._id}}" href="#">Publish</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
{{post.body|md-to-html|safe}}
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<div class="pull-left">
|
|
<small>{% for tag in post.tags %}<span class="label"><a href="{{context}}/tag/{{tag}}">{{tag}}</a></span> {% endfor %}</small>
|
|
</div>
|
|
{% if inlist %}
|
|
<div class="pull-right">
|
|
<a href="{{context}}{{post|post-url}}#comments">Comments</a>
|
|
</div>
|
|
{% endif %}
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|