wip
This commit is contained in:
parent
f5dad88b9b
commit
078b20eb38
2 changed files with 7 additions and 1 deletions
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue