ID: 757c686bab41aa106e043889d7f8a2e681a0962d
56 lines
—
2K —
View raw
| {% include 'header.twig' %}
<div class="post">
<table class="posts">
<tr>
<td class="bump">
{% if not votes[post.id] %}
<a href="vote?up&post={{ post.hashId }}" target="vote_sink" onclick="hide(this)">▲</a>
{% endif %}
</td>
<td class="post">
<div class="title">
{% if post.link|length > 0 %}
<a href="{{ post.link }}">
{{ post.title }}
</a>
{% else %}
{{ post.title }}
{% endif %}
</div>
<div class="info">
by <a href="{{ ('user/' ~ post.username)|docroot }}">{{ post.username }}</a> <em>{{ post.created|ago }}</em>
— {{ post.vote }} votes, {{ post.commentsCount }} comments
{% if user and post.userId == user.id %}
— <a href="../edit?post={{ post.hashId }}">Edit</a>
{% endif %}
</div>
</td>
</tr>
</table>
<div class="text">
{{ post.text|markdown|raw }}
</div>
{% if user %}
<form action="" method="post" class="new_comment">
<textarea name="new_comment" class="form-control" placeholder="Write a comment"></textarea>
<input type="submit" value="Add comment" class="btn btn-primary" />
</form>
{% endif %}
<div class="comments">
{% include 'comment.twig' with {
'post': post,
'comments': comments,
'parent_id': 0,
'depth': 0
} %}
</div>
</div>
{% include 'footer.twig' %}
|