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