mirror of
https://0xacab.org/johnxina/rat.git
synced 2024-12-23 13:09:08 +00:00
optimzie display of pictures
This commit is contained in:
parent
4100095cdf
commit
d49a9f4a08
4
app.py
4
app.py
@ -116,8 +116,8 @@ async def _jinja2_filter_translate(frags, reply_id=0):
|
|||||||
|
|
||||||
# Leah Rowe's lightbox implementation
|
# Leah Rowe's lightbox implementation
|
||||||
htmlfmt += \
|
htmlfmt += \
|
||||||
f'<img tabindex=1 src="/proxy/pic/{ extract_image_name(frag.src) }" />' \
|
f'<img tabindex=1 width="{ frag.show_width }" height="{ frag.show_height }" src="/proxy/pic/{ extract_image_name(frag.src) }" />' \
|
||||||
f'<span class="f"><img width="{ frag.show_width }" src="/proxy/pic/{ extract_image_name(frag.origin_src) }" /></span>'
|
f'<span class="f"><img src="/proxy/pic/{ extract_image_name(frag.origin_src) }" /></span>'
|
||||||
elif isinstance(frag, FragEmoji_p):
|
elif isinstance(frag, FragEmoji_p):
|
||||||
htmlfmt = append_with_leading_clean(htmlfmt,
|
htmlfmt = append_with_leading_clean(htmlfmt,
|
||||||
f'<img class="emoticons" alt="[{ frag.desc }]"'
|
f'<img class="emoticons" alt="[{ frag.desc }]"'
|
||||||
|
Loading…
Reference in New Issue
Block a user