Fix replies template

This commit is contained in:
Antonio J. Delgado 2024-08-04 20:01:21 +03:00
parent 0b8fae74e4
commit 83c23ffe69

View file

@ -72,36 +72,37 @@
</DIV>
{% endfor %}
{% endif %}
{% if data['reply'] %}
{% if data['meb_reply_to'] %}
{% for reply in data['meb_reply_to'] %}
<!-- reply -->
<DIV STYLE="margin:5%;">
<DIV>
<A TARGET="_blank" HREF="{{ data['reply']['url'] }}">Reply original page</A>
<A TARGET="_blank" HREF="{{ reply['url'] }}">Reply original page</A>
</DIV>
<!-- reply-account -->
<DIV>
<A HREF="{{ data['reply']['account']['url'] }}" TARGET="_blank"></A>
<IMG ALT="{{ data['reply']['account']['display_name'] }} avatar image" SRC="{{ data['reply']['account']['avatar_static'] }}" STYLE='width:64px;height:64px;margin:1%;float: left;'>
<B>{{ data['reply']['account']['display_name'] }} ({{ data['reply']['account']['username'] }})</B>
<A HREF="{{ reply['account']['url'] }}" TARGET="_blank"></A>
<IMG ALT="{{ reply['account']['display_name'] }} avatar image" SRC="{{ reply['account']['avatar_static'] }}" STYLE='width:64px;height:64px;margin:1%;float: left;'>
<B>{{ reply['account']['display_name'] }} ({{ reply['account']['username'] }})</B>
</A>
</DIV>
<!-- reply_creation_date -->
<DIV STYLE='font-size: 12px;'>
{% set created_date = time.strptime(data['reply']['created_at'], '%Y-%m-%dT%H:%M:%S.%fZ') %}
{% set created_date = time.strptime(reply['created_at'], '%Y-%m-%dT%H:%M:%S.%fZ') %}
{{ time.strftime('%Y-%m-%d %H:%M:%S %zUTC', created_date) }}
</DIV>
<!-- reply_content_bloc -->
<DIV STYLE='font-size: 24px;'>
<!-- reply_spoiler -->
<DIV CLASS='reply-spoiler'>
{{ data['reply']['spoiler'] }}
{{ reply['spoiler'] }}
</DIV>
<!-- reply_content -->
<DIV CLASS='reply-content'>
{{ data['reply']['content'] }}
{{ reply['content'] }}
<!-- media -->
{% if data['reply']['media_attachments'] %}
{% for media in data['reply']['media_attachments'] %}
{% if reply['media_attachments'] %}
{% for media in reply['media_attachments'] %}
{% if media['type'] == 'image' %}
<IMG SRC="{{ media['preview_url'] }}" ALT="{{ media['description'] }}">
{% elif media['type'] == 'video' %}
@ -118,6 +119,7 @@
</DIV>
</DIV>
</DIV>
{% endfor %}
{% endif %}
{% if data['reblog'] %}
<!-- reblog -->