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.5 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="{{ path(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 userId %}
<div class="pull-right">
<a class="btn btn-mini" href="{{ path(concat('/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="{{ path(concat('/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 }}
</div>
<div class="footer">
<div class="pull-left">
<small>{% for tag in post.tags %}<span class="label"><a href="{{ path(concat('/tag/', tag)) }}">{{ tag }}</a></span> {% endfor %}</small>
</div>
{% if inlist %}
<div class="pull-right">
<a href="{{ path(post|post_url) }}#comments">Comments</a>
</div>
{% endif %}
<div class="clearfix"></div>
</div>
</div>