This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
blarg/resources/views/posts/post.html

44 lines
1.4 KiB
HTML
Raw Normal View History

2013-05-20 17:43:38 -04:00
<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 %}
2013-05-26 20:02:30 -04:00
<a class="btn btn-mini btn-success" data-publishpostid="{{post._id}}" href="#">Publish</a>
2013-05-20 17:43:38 -04:00
{% endif %}
</div>
{% endif %}
<div class="clearfix"></div>
</div>
</div>
<div class="content">
2013-07-29 18:35:27 -04:00
{{post.body|md-to-html|safe}}
2013-05-20 17:43:38 -04:00
</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>