2018-05-09 21:09:52 +02:00
|
|
|
{% extends "base" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{{ post.title }}
|
|
|
|
{% endblock title %}
|
|
|
|
|
2018-05-10 22:31:52 +02:00
|
|
|
{% block header %}
|
|
|
|
<a href="../">{{ blog.title }}</a>
|
|
|
|
{% endblock header %}
|
|
|
|
|
2018-05-09 21:09:52 +02:00
|
|
|
{% block content %}
|
2018-05-19 16:26:56 +02:00
|
|
|
<h1 class="article">{{ post.title }}</h1>
|
|
|
|
<p class="article-info">
|
2018-06-17 20:14:58 +02:00
|
|
|
|
2018-06-12 22:14:49 +02:00
|
|
|
{% if author.display_name %}
|
|
|
|
{% set name = author.display_name %}
|
|
|
|
{% else %}
|
|
|
|
{% set name = author.username %}
|
|
|
|
{% endif %}
|
|
|
|
|
2018-06-26 17:58:11 +02:00
|
|
|
<span class="author">{{ "Written by {{ link_1 }}{{ url }}{{ link_2 }}{{ name | escape }}{{ link_3 }}" | _(
|
2018-06-17 18:19:39 +02:00
|
|
|
link_1='<a href="/@/',
|
|
|
|
url=author.fqn,
|
|
|
|
link_2='/">',
|
|
|
|
name=name,
|
|
|
|
link_3="</a>"
|
|
|
|
)
|
2018-06-17 20:14:58 +02:00
|
|
|
}}</a></span>
|
2018-05-19 09:53:51 +02:00
|
|
|
—
|
2018-05-19 16:26:56 +02:00
|
|
|
<span class="date">{{ date | date(format="%B %e, %Y") }}</span>
|
2018-05-19 09:53:51 +02:00
|
|
|
</p>
|
2018-05-10 22:31:52 +02:00
|
|
|
<article>
|
2018-05-10 11:44:57 +02:00
|
|
|
{{ post.content | safe }}
|
2018-05-10 22:31:52 +02:00
|
|
|
</article>
|
2018-05-10 18:38:03 +02:00
|
|
|
|
2018-05-10 22:31:52 +02:00
|
|
|
<div class="article-meta">
|
2018-06-17 17:26:15 +02:00
|
|
|
<p>{{ "This article is under the {{ license }} license." | _(license=post.license) }}</p>
|
2018-05-10 18:38:03 +02:00
|
|
|
|
2018-06-25 14:07:28 +02:00
|
|
|
<div class="actions">
|
2018-07-11 21:27:47 +02:00
|
|
|
<form class="likes" action="like" method="POST">
|
2018-06-25 14:07:28 +02:00
|
|
|
<p aria-label="{{ "{{ count }} likes" | _n(singular="One like", count=n_likes) }}" title="{{ "{{ count }} likes" | _n(singular="One like", count=n_likes) }}">{{ n_likes }}</p>
|
2018-06-12 13:57:30 +02:00
|
|
|
|
2018-06-25 14:07:28 +02:00
|
|
|
{% if has_liked %}
|
2018-07-11 21:27:47 +02:00
|
|
|
<button type="submit" class="liked"><i class="far fa-heart"></i>{{ "I don't like this anymore" | _ }}</button>
|
2018-06-25 14:07:28 +02:00
|
|
|
{% else %}
|
2018-07-11 21:27:47 +02:00
|
|
|
<button type="submit"><i class="fa fa-heart"></i>{{ "Add yours" | _ }}</button>
|
2018-06-25 14:07:28 +02:00
|
|
|
{% endif %}
|
2018-07-11 21:27:47 +02:00
|
|
|
</form>
|
|
|
|
<form class="reshares" action="reshare" method="POST">
|
2018-06-25 14:07:28 +02:00
|
|
|
<p aria-label="{{ "{{ count }} reshares" | _n(singular="One reshare", count=n_reshares) }}" title="{{ "{{ count }} reshares" | _n(singular="One reshare", count=n_reshares) }}">{{ n_reshares }}</p>
|
|
|
|
|
|
|
|
{% if has_reshared %}
|
2018-07-18 15:35:01 +02:00
|
|
|
<button type="submit" class="reshared"><i class="far fa-retweet"></i>{{ "I don't want to reshare this anymore" | _ }}</button>
|
2018-06-25 14:07:28 +02:00
|
|
|
{% else %}
|
2018-07-11 21:27:47 +02:00
|
|
|
<button type="submit"><i class="fa fa-retweet"></i>{{ "Reshare" | _ }}</button>
|
2018-06-25 14:07:28 +02:00
|
|
|
{% endif %}
|
2018-07-11 21:27:47 +02:00
|
|
|
</form>
|
2018-05-10 11:44:57 +02:00
|
|
|
</div>
|
2018-05-10 22:31:52 +02:00
|
|
|
|
2018-05-19 16:26:56 +02:00
|
|
|
<div class="comments">
|
2018-06-17 20:14:58 +02:00
|
|
|
<h2>{{ "Comments" | _ }}</h2>
|
2018-06-21 15:40:00 +02:00
|
|
|
|
|
|
|
{% if account %}
|
|
|
|
<form method="post" action="/~/{{ blog.actor_id }}/{{ post.slug }}/comment">
|
|
|
|
<label for="content">{{ "Your comment" | _ }}</label>
|
2018-06-27 00:19:18 +02:00
|
|
|
{% if previous %}
|
2018-06-27 20:43:09 +02:00
|
|
|
<input type="hidden" name="responding_to" value="{{ previous.id }}"/>
|
2018-06-27 00:19:18 +02:00
|
|
|
{% endif %}
|
2018-06-21 15:40:00 +02:00
|
|
|
{# Ugly, but we don't have the choice if we don't want weird paddings #}
|
|
|
|
<textarea id="content" name="content">{% filter trim %}{% if previous %}{% if previous.author.fqn != user_fqn %}@{{ previous.author.fqn }} {% endif %}{% for mention in previous.mentions %}{% if mention != user_fqn %}@{{ mention }} {% endif %}{% endfor %}{% endif %}{% endfilter %}</textarea>
|
|
|
|
<input type="submit" value="{{ "Submit comment" | _ }}" />
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
|
2018-05-19 16:26:56 +02:00
|
|
|
<div class="list">
|
|
|
|
{% for comment in comments %}
|
2018-06-17 20:14:58 +02:00
|
|
|
{% if comment.author.display_name %}
|
|
|
|
{% set comment_author_name = comment.author.display_name %}
|
|
|
|
{% else %}
|
|
|
|
{% set comment_author_name = comment.author.username %}
|
|
|
|
{% endif %}
|
|
|
|
|
2018-05-19 16:26:56 +02:00
|
|
|
<div class="comment" id="comment-{{ comment.id }}">
|
|
|
|
<a class="author" href="{{ comment.author.ap_url }}">
|
|
|
|
<span class="display-name">{{ comment.author.display_name }}</span>
|
|
|
|
<span class="username">@{{ comment.author.username }}</span>
|
|
|
|
</a>
|
|
|
|
<div class="text">{{ comment.content | safe }}</div>
|
2018-06-21 16:00:25 +02:00
|
|
|
<a class="button" href="?responding_to={{ comment.id }}">{{ "Respond" | _ }}</a>
|
2018-05-19 16:26:56 +02:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2018-05-13 22:33:21 +02:00
|
|
|
</div>
|
2018-05-10 22:31:52 +02:00
|
|
|
</div>
|
2018-05-09 21:09:52 +02:00
|
|
|
{% endblock content %}
|