ID: 8bdbe91b5c807ac5c2c89d98535bd4865d95a2cb
91 lines
—
3K —
View raw
| {% include 'header.twig' %}
<script>
/*
@ licstart The following is the entire license notice for the JavaScript code in this page.*
This is the code powering <http://freepo.st>.
Copyright © 2014-2016 zPlus
Copyright © 2016 Adonay "adfeno" Felipe Nogueira <adfeno@openmailbox.org> <https://libreplanet.org/wiki/User:Adfeno>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
As additional permission under GNU GPL version 3 section 7, you may
distribute non-source (e.g., minimized or compacted) forms of that code
without the copy of the GNU GPL normally required by section 4, provided
you include this license notice and a URL through which recipients can
access the Corresponding Source.
@licend The above is the entire license notice for the JavaScript code
in this page.
*/
</script>
<div 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">
{%
include 'vote.twig' with {
target: 'post',
hash_id: post.hashId,
vote: votes.post[post.id] is defined ? votes.post[post.id].vote : null,
vote_count: post.vote,
user: user is defined ? user : null
} only
%}
by <a href="{{ ('user/' ~ post.username)|docroot }}">{{ post.username }}</a> <em>{{ post.created|ago }}</em>
— {{ post.vote }} votes, <a href="#comments">{{ post.commentsCount }} comments</a>
{% if user and post.userId == user.id %}
— <a href="../edit?post={{ post.hashId }}">Edit</a>
{% endif %}
</div>
<div class="text">
{{ post.text|markdown|raw }}
</div>
{# An anchor for where the comments section starts #}
<a id="comments"></a>
{% if user %}
<form action="" method="post" class="new_comment">
<textarea name="new_comment" required="required" 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,
'votes': votes.comment,
'parent_id': 0,
'depth': 0
} %}
</div>
</div>
{% include 'footer.twig' %}
|