Aevann1 2022-03-24 05:00:39 +02:00
parent 7b469947e1
commit 6842b509ab
2 changed files with 10 additions and 4 deletions

View File

@ -8,7 +8,7 @@ if "load_chat" in sys.argv or SITE == 'localhost':
from datetime import datetime
from flask_socketio import SocketIO, emit
from files.__main__ import app, limiter, cache
from flask import render_template
from flask import render_template, make_response, send_from_directory
import sys
import atexit
@ -26,7 +26,7 @@ if "load_chat" in sys.argv or SITE == 'localhost':
@app.get('/static/chat.js')
@limiter.exempt
def chatjs(path):
def chatjs():
resp = make_response(send_from_directory('assets', 'js/chat.js'))
return resp

View File

@ -15,7 +15,7 @@
</div>
<div id="chat-line-template" class="d-none">
<div class="chat-line my-2">
<div class="chat-line">
<div class="d-flex align-items-center">
<span class="rounded mb-auto d-none d-md-block chat-profile">
<img class="desktop-avatar rounded-circle w-100">
@ -41,7 +41,7 @@
{% for m in messages %}
{% set text_html = m['text_html'] %}
{% set link = '<a href="/id/' + v.id|string + '">' %}
<div class="chat-line my-2 {% if link in text_html %}chat-mention{% endif %}">
<div class="chat-line {% if link in text_html %}chat-mention{% endif %}">
<div class="d-flex align-items-center">
<span class="rounded mb-auto d-none d-md-block chat-profile">
<img class="desktop-avatar rounded-circle w-100" src="{{m['avatar']}}">
@ -120,6 +120,12 @@
.chat-message p {
display: inline-block;
}
@media (max-width: 768px) {
* {
font-size: 10px !important;
}
}
</style>
<script>