This commit is contained in:
mwiegand 2022-06-01 20:05:49 +02:00
parent f5dad88b9b
commit 078b20eb38
2 changed files with 7 additions and 1 deletions

View file

@ -2,6 +2,7 @@
from os import environ
from flask import Flask, request, render_template
from urllib.parse import urlparse
from .pg import query, select
@ -49,4 +50,5 @@ def home():
'''
),
messages=messages,
urlparse=urlparse,
)

View file

@ -26,7 +26,11 @@
at
<span class=date>{{ message['date'] }}</span>
</div>
<div class=body>{{ message['message'].replace('\n', '<br/>') |safe}}</div>
{% if message['message'].startswith('https://steamuserimages-a.akamaihd.net/'): -%}
<img src="/steamuserimages/{{ urlparse(message['message']).path.strip('/').replace('/', '_') }}"
{% else: -%}
<div class=body>{{ message['message'].replace('\n', '<br/>') |safe}}</div>
{% endif -%}
</li>
{% endfor -%}
</ul>