2018-08-21 03:43:23 +02:00
|
|
|
{% load humanetime %}
|
2018-04-24 15:12:13 +02:00
|
|
|
{% load humanize %}
|
2018-04-27 02:36:48 +02:00
|
|
|
{% load sanitizer %}
|
2018-05-07 14:46:59 +02:00
|
|
|
{% load taglinks %}
|
2018-05-15 16:04:09 +02:00
|
|
|
{% load static %}
|
2018-04-24 15:12:13 +02:00
|
|
|
|
2018-11-30 20:30:46 +01:00
|
|
|
|
2018-05-23 16:05:13 +02:00
|
|
|
{% if active %}
|
2019-07-10 01:37:18 +02:00
|
|
|
<article id="toot-{{toot.id}}" class="media box active-context">
|
|
|
|
{% else %}
|
|
|
|
<article id="toot-{{toot.id}}" class="media box">
|
|
|
|
{% endif %}
|
2018-05-23 16:05:13 +02:00
|
|
|
|
2019-07-10 01:37:18 +02:00
|
|
|
<figure class="media-left">
|
|
|
|
<p class="image is-64x64 account-avatar">
|
|
|
|
<a href="{% url "user" toot.account.acct %}">
|
2019-08-27 01:18:21 +02:00
|
|
|
<img loading="auto" src="{{ toot.account.avatar_static }}"
|
2019-07-10 01:37:18 +02:00
|
|
|
alt="">
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
{% if reblog %}
|
|
|
|
<p class="image is-32x32 reblog-icon" >
|
|
|
|
<a href="{% url "user" reblog_by %}">
|
2019-08-27 01:18:21 +02:00
|
|
|
<img loading="auto" src ="{{ reblog_icon }}" alt="">
|
2019-07-10 01:37:18 +02:00
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
</figure>
|
|
|
|
<div class="media-content">
|
|
|
|
<div class="content">
|
|
|
|
<p>
|
2019-10-29 18:43:51 +01:00
|
|
|
<strong>{{ toot.account.display_name | fix_emojos:toot.account.emojis | strip_html |safe}}</strong>
|
2019-07-10 01:37:18 +02:00
|
|
|
<small><a href="{% url "user" toot.account.acct %}">
|
|
|
|
@{{ toot.account.acct }}</a></small>
|
|
|
|
<a href="{{ toot.url }}">
|
|
|
|
<small>{{ toot.created_at |humane_time }}</small>
|
|
|
|
</a>
|
2018-08-29 11:23:35 +02:00
|
|
|
{% if reblog %}
|
2019-07-10 01:37:18 +02:00
|
|
|
<br>
|
|
|
|
Boosted by @{{ reblog_by }}
|
2018-05-23 14:27:45 +02:00
|
|
|
{% endif %}
|
2019-07-10 01:37:18 +02:00
|
|
|
</p>
|
|
|
|
{% if toot.spoiler_text %}
|
|
|
|
<details class="toot">
|
|
|
|
<summary><strong>{{ toot.spoiler_text }} </strong></summary>
|
2018-05-23 14:27:45 +02:00
|
|
|
<div class="toot">
|
2018-08-17 01:21:51 +02:00
|
|
|
{{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }}
|
2018-05-23 14:27:45 +02:00
|
|
|
</div>
|
2019-07-10 01:37:18 +02:00
|
|
|
</details>
|
|
|
|
{% else %}
|
|
|
|
<div class="toot">
|
|
|
|
{{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if toot.poll %}
|
|
|
|
<div class="poll">
|
|
|
|
{% if toot.poll.voted or toot.poll.expired %}
|
|
|
|
{% include "polls/completed_partial.html" with toot=toot %}
|
|
|
|
{% else %}
|
|
|
|
<!-- Poll form -->
|
2019-07-10 02:26:52 +02:00
|
|
|
{% include "polls/new_partial.html" with toot=toot %}
|
2018-08-29 11:23:35 +02:00
|
|
|
{% endif %}
|
2019-07-10 01:37:18 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2018-04-24 15:12:13 +02:00
|
|
|
|
2019-07-10 01:37:18 +02:00
|
|
|
{% if toot.card %}
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-content columns">
|
|
|
|
{% if toot.card.image %}
|
2019-03-28 03:34:20 +01:00
|
|
|
<div class="column is-one-third">
|
|
|
|
<a href="{{ toot.card.url }}">
|
2019-08-27 01:18:21 +02:00
|
|
|
<noscript class="loading-lazy">
|
2019-08-07 15:21:07 +02:00
|
|
|
<img loading="lazy" alt="{{ toot.card.title }}"
|
2019-03-28 03:34:20 +01:00
|
|
|
src="{{ toot.card.image }}"
|
2019-03-28 12:58:31 +01:00
|
|
|
class="is-max-128">
|
2019-08-27 01:18:21 +02:00
|
|
|
</noscript>
|
2019-03-28 03:34:20 +01:00
|
|
|
</a>
|
2018-11-30 20:30:46 +01:00
|
|
|
</div>
|
2019-07-10 01:37:18 +02:00
|
|
|
{% endif %}
|
|
|
|
<div class="column is-two-thirds">
|
|
|
|
<p>
|
|
|
|
<strong>
|
|
|
|
<a href="{{ toot.card.url }}">
|
|
|
|
{{ toot.card.title }}
|
|
|
|
</a>
|
|
|
|
</strong>
|
2019-03-28 12:58:31 +01:00
|
|
|
|
2019-10-28 23:35:25 +01:00
|
|
|
<p>{{ toot.card.description |truncatechars_html:500}}</p>
|
2018-11-30 20:30:46 +01:00
|
|
|
</div>
|
2019-03-28 03:34:20 +01:00
|
|
|
</div>
|
2019-07-10 01:37:18 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-11-30 20:30:46 +01:00
|
|
|
|
2019-07-10 01:37:18 +02:00
|
|
|
{% if toot.media_attachments %}
|
|
|
|
<br>
|
|
|
|
<div class="columns is-multiline attachments is-gapless">
|
|
|
|
{% for media in toot.media_attachments %}
|
2019-02-04 21:24:06 +01:00
|
|
|
{% if media.type == "image" %}
|
2019-07-10 01:37:18 +02:00
|
|
|
<figure class="column attachment-image">
|
2019-02-04 21:24:06 +01:00
|
|
|
<a href="{{ media.url }}">
|
2019-08-27 01:18:21 +02:00
|
|
|
<noscript class="loading-lazy">
|
2018-11-06 16:44:26 +01:00
|
|
|
{% if toot.sensitive %}
|
2019-08-07 15:21:07 +02:00
|
|
|
<img loading="lazy" src="{% static "images/sensitive.png" %}"
|
2019-07-10 01:37:18 +02:00
|
|
|
{% else %}
|
2019-08-07 15:21:07 +02:00
|
|
|
<img loading="lazy" src="{{ media.preview_url }}"
|
2019-07-10 01:37:18 +02:00
|
|
|
{% endif %}
|
|
|
|
alt="{% if media.description %}
|
|
|
|
{{ media.description }}
|
|
|
|
{% elif media.text_url %}
|
|
|
|
{{ media.text_url }}
|
|
|
|
{% else %}
|
|
|
|
{{ media.url }}
|
|
|
|
{% endif %}"
|
|
|
|
{% if media.description %}
|
|
|
|
title="{{ media.description }}"
|
|
|
|
{% endif %}
|
|
|
|
class="image is-max-256">
|
2019-08-27 01:18:21 +02:00
|
|
|
</noscript>
|
2018-11-06 16:44:26 +01:00
|
|
|
</a>
|
2019-07-10 01:37:18 +02:00
|
|
|
</figure>
|
|
|
|
{% else %}
|
|
|
|
<figure class="column">
|
|
|
|
<video controls loop class="is-max-256"
|
|
|
|
poster="{{ media.preview_url }}">
|
|
|
|
<source src="{{ media.url }}" type="video/mp4">
|
|
|
|
<a href="{{ media.url }}">
|
2019-08-27 01:18:21 +02:00
|
|
|
<noscript class="loading-lazy">
|
2019-07-10 01:37:18 +02:00
|
|
|
{% if toot.sensitive %}
|
2019-08-07 15:21:07 +02:00
|
|
|
<img loading="lazy" src="{% static "images/sensitive.png" %}"
|
2019-07-10 01:37:18 +02:00
|
|
|
{% else %}
|
2019-08-07 15:21:07 +02:00
|
|
|
<img loading="lazy" src="{{ media.preview_url }}"
|
2019-07-10 01:37:18 +02:00
|
|
|
{% endif %}
|
|
|
|
alt="{% if media.description %}
|
|
|
|
{{ media.description }}
|
|
|
|
{% elif media.text_url %}
|
|
|
|
{{ media.text_url }}
|
|
|
|
{% else %}
|
|
|
|
{{ media.url }}
|
|
|
|
{% endif %}"
|
|
|
|
{% if media.description %}
|
|
|
|
title="{{ media.description }}"
|
|
|
|
{% endif %}
|
|
|
|
class="image is-max-256">
|
2019-08-27 01:18:21 +02:00
|
|
|
</noscript>
|
2019-07-10 01:37:18 +02:00
|
|
|
</a>
|
|
|
|
</video>
|
|
|
|
</figure>
|
2019-02-04 21:24:06 +01:00
|
|
|
{% endif %}
|
2018-11-06 16:44:26 +01:00
|
|
|
|
2019-07-10 01:37:18 +02:00
|
|
|
{% endfor %}
|
2018-09-10 00:22:01 +02:00
|
|
|
</div>
|
2019-07-10 01:37:18 +02:00
|
|
|
{% endif %}
|
|
|
|
<br>
|
|
|
|
<p class="is-hidden"></p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% if not confirm_page %}
|
|
|
|
<nav class="level is-mobile">
|
|
|
|
<div class="level-left">
|
|
|
|
<a href="{% url "reply" toot.id %}#toot-{{ toot.id }}" class="level-item">
|
|
|
|
{% if toot.replies_count > 0 %}
|
2019-03-28 03:34:20 +01:00
|
|
|
<span class="fa fa-reply-all">
|
|
|
|
<span class="is-hidden-mobile"><strong>Reply</strong></span>
|
|
|
|
</span>
|
2019-07-10 01:37:18 +02:00
|
|
|
{% else %}
|
2019-03-28 03:34:20 +01:00
|
|
|
<span class="fa fa-reply">
|
|
|
|
<span class="is-hidden-mobile">Reply</span>
|
|
|
|
</span>
|
2019-07-10 01:37:18 +02:00
|
|
|
{% endif %}
|
|
|
|
</a>
|
|
|
|
{% if toot.visibility != 'private' and toot.visibility != 'direct' %}
|
2018-09-10 00:22:01 +02:00
|
|
|
<a href="{% url "boost" toot.id %}" class="level-item"
|
|
|
|
ic-post-to="{% url "boost" toot.id %}"
|
|
|
|
ic-indicator="#toot-spinner-{{toot.id}}">
|
|
|
|
{% if toot.reblogged %}
|
2019-07-10 01:37:18 +02:00
|
|
|
<span class="fa fa-retweet has-text-warning">
|
|
|
|
<strong class="is-hidden-mobile" >Boosted</strong>
|
|
|
|
{% else %}
|
|
|
|
<span class="fa fa-retweet" >
|
|
|
|
<span class="is-hidden-mobile" >Boost</span>
|
|
|
|
{% endif %}
|
|
|
|
</span>
|
2018-05-23 14:27:45 +02:00
|
|
|
</span>
|
2018-09-10 00:22:01 +02:00
|
|
|
</a>
|
2019-07-10 01:37:18 +02:00
|
|
|
{% endif %}
|
|
|
|
<a href="{% url "fav" toot.id %}" class="level-item"
|
|
|
|
ic-post-to="{% url "fav" toot.id %}"
|
|
|
|
ic-indicator="#toot-spinner-{{toot.id}}">
|
|
|
|
{% if toot.favourited %}
|
2018-09-10 00:22:01 +02:00
|
|
|
<span class="fa fa-heart has-text-warning">
|
|
|
|
<strong class="is-hidden-mobile" >Favorited</strong>
|
2019-07-10 01:37:18 +02:00
|
|
|
{% else %}
|
2018-09-10 00:22:01 +02:00
|
|
|
<span class="fa fa-heart">
|
|
|
|
<span class="is-hidden-mobile" >Favorite</span>
|
2019-07-10 01:37:18 +02:00
|
|
|
{% endif %}
|
2018-08-29 11:23:35 +02:00
|
|
|
</span>
|
2018-09-10 00:22:01 +02:00
|
|
|
</span>
|
2019-07-10 01:37:18 +02:00
|
|
|
</a>
|
|
|
|
<i id="toot-spinner-{{toot.id}}" class="fa fa-spinner fa-spin" style="display:none"></i>
|
|
|
|
</div>
|
|
|
|
<div class="level-right">
|
|
|
|
{% if toot.account.acct == own_acct.acct %}
|
2019-03-04 02:04:29 +01:00
|
|
|
<a class="level-item" href="{% url "redraft" toot.id %}">
|
2018-09-10 00:22:01 +02:00
|
|
|
redraft
|
|
|
|
</a>
|
|
|
|
<a class="level-item" href="{% url "delete" toot.id %}"
|
|
|
|
ic-delete-from="{% url "delete" toot.id %}"
|
|
|
|
ic-indicator="#toot-spinner-{{toot.id}}"
|
|
|
|
ic-confirm="Really delete that toot?"
|
|
|
|
ic-success-action="fadeOut;remove"
|
|
|
|
ic-action-target="#toot-{{ toot.id }}">
|
|
|
|
delete
|
|
|
|
</a>
|
2019-07-10 01:37:18 +02:00
|
|
|
{% endif %}
|
|
|
|
{{ toot.visibility }}
|
|
|
|
|
|
|
|
{% if toot.in_reply_to_id or toot.replies_count > 0 %}
|
2019-03-28 03:34:20 +01:00
|
|
|
<a class="level-item" href="{% url "thread" toot.id %}#toot-{{ toot.id }}">
|
2019-05-20 19:40:21 +02:00
|
|
|
<span class="fa fa-comments"></span>
|
|
|
|
<strong> thread</strong>
|
2018-12-07 14:57:19 +01:00
|
|
|
</a>
|
2019-07-10 01:37:18 +02:00
|
|
|
{% else %}
|
2019-01-29 18:57:11 +01:00
|
|
|
<a class="level-item" href="{% url "thread" toot.id %}#toot-{{ toot.id }}">
|
2018-09-10 00:22:01 +02:00
|
|
|
thread
|
|
|
|
</a>
|
2019-07-10 01:37:18 +02:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
{% endif %}
|
2018-09-10 00:22:01 +02:00
|
|
|
|
2019-07-10 01:37:18 +02:00
|
|
|
</div>
|
|
|
|
<div class="media-right"></div>
|
|
|
|
</article>
|