mastodon-BDSM/BDSM/templates/view.html

130 lines
5.3 KiB
HTML
Raw Normal View History

2022-09-18 05:23:33 +02:00
{% extends 'base.html' %}
{% block content %}
2022-09-22 17:57:43 +02:00
{% for toot in toots recursive%}
2022-09-18 05:23:33 +02:00
<div class="toot">
<div class="status">
<div class="meta">
2022-09-19 16:44:22 +02:00
{% if toot.is_reblog%}
<small><span>转嘟了<i class="fa-solid fa-retweet"></i></span></small>
{% endif %}
2022-09-18 05:23:33 +02:00
<strong><span class ="username">{{ toot.acct }}</span></strong>
<a href="{{ toot.url }}" target="_blank"
rel="noopener noreferrer">
<span class="time">
2022-11-07 16:58:20 +01:00
{% if toot.visibility == "public"%}
2022-09-18 05:23:33 +02:00
<span class="visibility-icon"><i class="fa-solid fa-earth-americas fa-globle"></i></span>
2022-11-07 16:58:20 +01:00
{% elif toot.visibility == "unlisted"%}
2022-09-18 05:23:33 +02:00
<span class="visibility-icon"><i class="fa-solid fa-lock-open fa-unlock"></i></span>
2022-11-07 16:58:20 +01:00
{% elif toot.visibility == "private"%}
2022-09-18 05:23:33 +02:00
<span class="visibility-icon"><i class="fa-solid fa-lock"></i></span>
2022-11-07 16:58:20 +01:00
{% elif toot.visibility == "direct"%}
2022-09-18 05:23:33 +02:00
<span class="visibility-icon"><i class="fa-solid fa-envelope fa-at"></i></span>
{% endif %}
2022-11-07 16:58:20 +01:00
<time>{{ toot.created_at }}
{% if toot.edited_at != None %}
<strong>*</strong>
{% endif %}
</time></span></a>
2022-09-18 05:23:33 +02:00
</div>
<div class="content">
2022-09-20 13:48:37 +02:00
{% if toot.spoiler_text != "" %}
<strong><i>CW: {{toot.spoiler_text|safe}}</i></strong>
{% endif %}
2022-09-18 05:23:33 +02:00
{{ toot.content|safe }}
</div>
2022-09-18 15:56:48 +02:00
<div class="toot-media">
<div class="row">
{% if toot.medias %}
{% for media in toot.medias%}
{% if media.type == 'image' %}
<div class="col-lg-6">
<a class="media-gallery__item-thumbnail"
href="{{ media.url }}" target="_blank" rel="noopener noreferrer" data-lightbox="{{ toot.id }}" data-title="{{ media.description }}">
<img src="{{ media.url }}" class="w-100 shadow-1-strong rounded" alt="{{ media.description }}"/></a>
</div>
{% endif %}
{% endfor%}
{% endif %}
</div>
</div>
2022-09-18 05:23:33 +02:00
<div class="icon-bar">
2022-09-23 17:22:18 +02:00
<div class="info-bar">
2022-09-18 05:23:33 +02:00
{% if toot.replies_count > 1 %}
<span><i class="fa-solid fa-reply-all"></i>{{ toot.replies_count }}</span>
{% else %}
<span><i class="fa-solid fa-reply"></i>{{ toot.replies_count }}</span>
{% endif %}
{% if toot.reblogged %}
<span><i class="fa-solid fa-arrow-rotate-right"></i>{{ toot.reblogs_count}}</span>
{% else %}
<span><i class="fa-solid fa-retweet"></i></i>{{ toot.reblogs_count}}</span>
{% endif %}
{% if toot.favourited %}
<span><i class="fa-solid fa-star"></i>{{ toot.favourites_count }}</span>
{% else %}
<span><i class="fa-regular fa-star"></i>{{ toot.favourites_count }}</span>
{% endif %}
{% if toot.bookmarked %}
<span><i class="fa-solid fa-bookmark"></i></span>
{% else %}
<span><i class="fa-regular fa-bookmark"></i></span>
{% endif %}
</div>
2022-09-23 17:22:18 +02:00
<div class="action-bar">
2022-11-07 19:25:06 +01:00
{% if toot.is_myself %}
<span><i class="fa-solid fa-satellite-dish"></i><a href="{{ url_for('grab', toot_id=toot.id) }}"
target=" _blank">抓取回复</a></span>
2022-09-23 17:22:18 +02:00
<span><i class="fa-solid fa-up-right-and-down-left-from-center"></i><a
href="{{ url_for('context', toot_id=toot.id) }}" target=" _blank">上下文</a></span>
{% endif %}
</div>
</div>
2022-09-18 05:23:33 +02:00
</div>
</div>
2022-09-22 17:57:43 +02:00
{%- if toot.reply -%}
<div class="reply">{{ loop(toot.reply) }}</div>
{%- endif %}
{% endfor %}
2022-09-18 05:23:33 +02:00
<div class="pagination d-flex justify-content-center">
{% if pagination %}
2022-09-18 05:23:33 +02:00
{% if pagination.has_prev %}
<span>
<a class='page-number' href="{{ url_for(path.path, page=pagination.prev_num, **path.args) }}">
2022-09-18 05:23:33 +02:00
{{ '<<<' }}
</a>
</span>
{% endif %}
{% for number in pagination.iter_pages() %}
{% if number == None %}
<span>...</span>
{% elif pagination.page != number %}
<span>
<a class='page-number'
href="{{ url_for(path.path, page=number, **path.args) }}">
2022-09-18 05:23:33 +02:00
{{ number }}
</a>
</span>
{% else %}
<span class='current-page-number'>{{ number }}</span>
{% endif %}
{% endfor %}
{% if pagination.has_next %}
<span>
<a class='page-number' href="{{ url_for(path.path, page=pagination.next_num, **path.args) }}">
2022-09-18 05:23:33 +02:00
{{ '>>>' }}
</a>
</span>
{% endif %}
</div>
{% endif %}
2022-09-18 05:23:33 +02:00
{% endblock %}