2018-05-09 21:09:52 +02:00
|
|
|
{% extends "base" %}
|
2018-07-25 18:18:41 +02:00
|
|
|
{% import "macros" as macros %}
|
2018-05-09 21:09:52 +02:00
|
|
|
|
|
|
|
{% block title %}
|
2018-07-26 19:00:23 +02:00
|
|
|
{{ article.post.title }}
|
2018-05-09 21:09:52 +02:00
|
|
|
{% endblock title %}
|
|
|
|
|
2018-05-10 22:31:52 +02:00
|
|
|
{% block header %}
|
2018-07-26 19:00:23 +02:00
|
|
|
<a href="/~/{{ blog.fqn }}">{{ blog.title }}</a>
|
2018-05-10 22:31:52 +02:00
|
|
|
{% endblock header %}
|
|
|
|
|
2018-05-09 21:09:52 +02:00
|
|
|
{% block content %}
|
2018-07-26 19:00:23 +02:00
|
|
|
<h1 class="article">{{ article.post.title }}</h1>
|
2018-09-04 13:26:13 +02:00
|
|
|
<h2 class="article">{{ article.post.subtitle }}</h2>
|
2018-05-19 16:26:56 +02:00
|
|
|
<p class="article-info">
|
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='/">',
|
2018-07-26 16:36:19 +02:00
|
|
|
name=author.name,
|
2018-06-17 18:19:39 +02:00
|
|
|
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-09-01 17:28:47 +02:00
|
|
|
{% if is_author %}
|
2018-09-07 19:51:53 +02:00
|
|
|
—
|
|
|
|
<a href="{{ article.url}}edit">{{ "Edit" | _ }}</a>
|
2018-09-01 22:16:38 +02:00
|
|
|
—
|
2018-09-01 16:28:50 +02:00
|
|
|
<a href="{{ article.url}}delete" onclick="return confirm('Are you sure you?')">{{ "Delete this article" | _ }}</a>
|
2018-09-01 17:28:47 +02:00
|
|
|
{% endif %}
|
2018-05-19 09:53:51 +02:00
|
|
|
</p>
|
2018-05-10 22:31:52 +02:00
|
|
|
<article>
|
2018-07-26 19:00:23 +02:00
|
|
|
{{ article.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-07-26 19:00:23 +02:00
|
|
|
<p>{{ "This article is under the {{ license }} license." | _(license=article.post.license) }}</p>
|
2018-09-05 22:18:27 +02:00
|
|
|
<ul class="tags">
|
|
|
|
{% for tag in article.tags %}
|
2018-09-06 14:06:04 +02:00
|
|
|
<li><a href="/tag/{{ tag.tag }}">{{ tag.tag }}</a></li>
|
2018-09-05 22:18:27 +02:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2018-09-04 15:55:15 +02:00
|
|
|
<div class="flex">
|
2018-09-09 22:41:55 +02:00
|
|
|
{{ macros::avatar(user=author, pad=true, size="medium") }}
|
2018-09-04 15:55:15 +02:00
|
|
|
<div class="grow">
|
|
|
|
<h2><a href="/@/{{ author.fqn }}">{{ author.name }}</a></h2>
|
|
|
|
<p>{{ author.summary | safe }}</h2>
|
|
|
|
</div>
|
|
|
|
<a href="/@/{{ author.fqn }}/follow" class="button">
|
|
|
|
{% if is_following %}
|
|
|
|
{{ "Unfollow" | _ }}
|
|
|
|
{% else %}
|
|
|
|
{{ "Follow" | _ }}
|
|
|
|
{% endif %}
|
|
|
|
</a>
|
|
|
|
</div>
|
2018-05-10 18:38:03 +02:00
|
|
|
|
2018-07-18 23:37:05 +02:00
|
|
|
{% if account %}
|
|
|
|
<div class="actions">
|
2018-07-26 19:00:23 +02:00
|
|
|
<form class="likes" action="{{ article.url }}like" method="POST">
|
2018-07-18 23:37:05 +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-07-18 23:37:05 +02:00
|
|
|
{% if has_liked %}
|
2018-09-04 21:55:44 +02:00
|
|
|
<button type="submit" class="action liked">{{ macros::feather(name="heart") }}{{ "I don't like this anymore" | _ }}</button>
|
2018-07-18 23:37:05 +02:00
|
|
|
{% else %}
|
2018-09-04 21:55:44 +02:00
|
|
|
<button type="submit" class="action">{{ macros::feather(name="heart") }}{{ "Add yours" | _ }}</button>
|
2018-07-18 23:37:05 +02:00
|
|
|
{% endif %}
|
|
|
|
</form>
|
2018-07-26 19:00:23 +02:00
|
|
|
<form class="reshares" action="{{ article.url }}reshare" method="POST">
|
2018-08-19 00:52:28 +02:00
|
|
|
<p aria-label="{{ "{{ count }} Boosts" | _n(singular="One Boost", count=n_reshares) }}" title="{{ "{{ count }} Boosts" | _n(singular="One Boost", count=n_reshares) }}">{{ n_reshares }}</p>
|
2018-06-25 14:07:28 +02:00
|
|
|
|
2018-07-18 23:37:05 +02:00
|
|
|
{% if has_reshared %}
|
2018-09-04 21:55:44 +02:00
|
|
|
<button type="submit" class="action reshared"><i class="icon icon-repeat"></i>{{ "I don't want to boost this anymore" | _ }}</button>
|
2018-07-18 23:37:05 +02:00
|
|
|
{% else %}
|
2018-09-04 21:55:44 +02:00
|
|
|
<button type="submit" class="action"><i class="icon icon-repeat"></i>{{ "Boost" | _ }}</button>
|
2018-07-18 23:37:05 +02:00
|
|
|
{% endif %}
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<p class="center">{{ "Login or use your Fediverse account to interact with this article" | _ }}</p>
|
2018-09-04 14:46:08 +02:00
|
|
|
<div class="actions">
|
|
|
|
<div class="likes">
|
|
|
|
<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-09-04 21:55:44 +02:00
|
|
|
<a href="/login?m=Login%20to%20like" class="action">{{ macros::feather(name="heart") }}{{ "Add yours" | _ }}</a>
|
2018-09-04 14:46:08 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="reshares">
|
|
|
|
<p aria-label="{{ "{{ count }} Boosts" | _n(singular="One Boost", count=n_reshares) }}" title="{{ "{{ count }} Boosts" | _n(singular="One Boost", count=n_reshares) }}">{{ n_reshares }}</p>
|
2018-09-04 21:55:44 +02:00
|
|
|
<a href="/login?m=Login%20to%20boost" class="action"><i class="icon icon-repeat"></i>{{ "Boost" | _ }}</a>
|
2018-09-04 14:46:08 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-18 23:37:05 +02:00
|
|
|
{% endif %}
|
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 %}
|
2018-07-26 19:00:23 +02:00
|
|
|
<form method="post" action="{{ article.url }}comment">
|
2018-06-21 15:40:00 +02:00
|
|
|
<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-07-27 20:34:23 +02:00
|
|
|
{% if comments | length > 0 %}
|
|
|
|
<div class="list">
|
|
|
|
{% for comment in comments %}
|
|
|
|
{{ macros::comment(comm=comment) }}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<p class="center">{{ "No comments yet. Be the first to react!" | _ }}</p>
|
|
|
|
{% endif %}
|
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 %}
|