brutaldon-interfaccia-web-m.../brutaldon/templates/main/toot_partial.html

138 lines
5.5 KiB
HTML
Raw Normal View History

{% load humanetime %}
2018-04-24 15:12:13 +02:00
{% load humanize %}
{% load sanitizer %}
{% load taglinks %}
{% load static %}
2018-04-24 15:12:13 +02:00
2018-05-23 16:05:13 +02:00
{% if active %}
<article class="media active-context">
{% else %}
<article class="media">
{% endif %}
2018-04-26 17:17:20 +02:00
<figure class="media-left">
<p class="image is-64x64 account-avatar">
<a href="{% url "user" toot.account.acct %}">
<img src="{{ toot.account.avatar }}"
alt="">
</a>
2018-04-26 17:17:20 +02:00
</p>
{% if reblog %}
<p class="image is-32x32 reblog-icon" >
<a href="{% url "user" reblog_by %}">
<img src ="{{ reblog_icon }}" alt="">
</a>
2018-04-24 15:12:13 +02:00
</p>
2018-04-26 17:17:20 +02:00
{% endif %}
</figure>
<div class="media-content">
<div class="content">
<p>
<strong>{{ toot.account.display_name }}</strong>
<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>
{% if reblog %}
<br>
Boosted by @{{ reblog_by }}
{% endif %}
</p>
{% if toot.spoiler_text %}
<details class="toot">
<summary><strong>{{ toot.spoiler_text }} </strong></summary>
<div class="toot">
{{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }}
</div>
</details>
{% else %}
2018-04-26 17:17:20 +02:00
<div class="toot">
{{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }}
2018-04-26 17:17:20 +02:00
</div>
{% endif %}
2018-04-24 15:12:13 +02:00
{% if toot.media_attachments %}
<br>
<div class="level">
<div class="level-left">
{% for media in toot.media_attachments %}
<a class="level-item" href="{{ media.url }}">
{% if toot.sensitive %}
<img src="{% static "images/sensitive.png" %}"
{% else %}
<img src="{{ media.preview_url }}"
{% endif %}
2018-04-26 17:17:20 +02:00
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-128">
</a>
{% endfor %}
2018-04-24 15:12:13 +02:00
</div>
</div>
{% endif %}
<br>
2018-04-27 01:46:05 +02:00
<p class="is-hidden"></p>
{% if not confirm_page %}
<nav class="level is-mobile">
<div class="level-left">
<a href="{% url "reply" toot.id %}" class="level-item">
<span class="icon is-small"><span class="fa fa-reply">
2018-05-01 14:37:08 +02:00
<span class="is-invisible">Reply</span>
</span></span>
2018-05-01 14:37:08 +02:00
</a>
{% if toot.visibility != 'private' and toot.visibility != 'direct' %}
<a href="{% url "boost" toot.id %}" class="level-item">
<span class="icon is-small">
{% if toot.reblogged %}
<span class="fa fa-retweet has-text-warning">
<strong class="is-invisible" >Boosted</strong>
{% else %}
<span class="fa fa-retweet" >
2018-06-13 18:45:39 +02:00
<span class="is-invisible" >Boost</span>
{% endif %}
</span>
</span>
</a>
{% endif %}
<a href="{% url "fav" toot.id %}" class="level-item">
2018-05-01 14:37:08 +02:00
<span class="icon is-small">
{% if toot.favourited %}
<span class="fa fa-heart has-text-warning">
<strong class="is-invisible" >Favorited</strong>
2018-05-01 14:37:08 +02:00
{% else %}
<span class="fa fa-heart">
2018-06-13 18:45:39 +02:00
<span class="is-invisible" >Favorite</span>
2018-05-01 14:37:08 +02:00
{% endif %}
</span>
2018-05-01 14:37:08 +02:00
</span>
</a>
</div>
<div class="level-right">
{% if toot.account.acct == own_acct.acct %}
<a class="level-item" href="{% url "delete" toot.id %}">
delete
</a>
{% endif %}
<span class="level-item">
{{ toot.visibility }}
</span>
<a class="level-item" href="{% url "thread" toot.id %}">
thread
2018-05-22 15:41:11 +02:00
</a>
</div>
</nav>
{% endif %}
</div>
2018-04-26 17:17:20 +02:00
</div>
<div class="media-right"></div>
2018-04-26 17:17:20 +02:00
</article>