shoutbox: update chat and show it on homepage

This commit is contained in:
Lephe 2023-11-02 22:54:51 +01:00 committed by Eragon
parent 47c3b82e1a
commit cddd4baa8a
Signed by: Eragon
GPG Key ID: 087126EBFC725006
8 changed files with 12 additions and 17 deletions

View File

@ -5,21 +5,10 @@ from flask import send_file, url_for
@app.route('/chat')
def chat():
return render('chat.html',
styles=[
'+css/v5shoutbox.css',
'+css/shoutbox.css'],
scripts=[
'-scripts/trigger_menu.js',
'-scripts/editor.js'])
@app.route('/v5shoutbox.js')
def v5shoutbox_js():
return send_file('static/scripts/v5shoutbox.js')
@app.route('/v5shoutbox_irc.js')
def v5shoutbox_irc_js():
return send_file('static/scripts/v5shoutbox_irc.js')
@app.route('/v5shoutbox_worker.js')
def v5shoutbox_worker_js():
return send_file('static/scripts/v5shoutbox_worker.js')

View File

@ -3,4 +3,5 @@
--shoutbox-border-color: var(--border, #d8d8d8);
--shoutbox-header-bg: var(--background-alt);
--shoutbox-link-color: var(--links);
height: 240px;
}

View File

@ -0,0 +1 @@
../../../submodules/v5shoutbox/v5shoutbox_ui.js

View File

@ -1,7 +1,6 @@
{% for s in scripts %}
<script type="text/javascript" src={{url_for('static', filename=s)}}></script>
{% endfor %}
<script type="module" src='/v5shoutbox.js'></script>
{% for m in modules %}
<script type="module" src={{url_for('static', filename=m)}}></script>
{% endfor %}

View File

@ -4,6 +4,7 @@
<html lang="fr-FR">
{% include "base/head.html" with context %}
<body>
<div id="v5shoutbox-fullscreen"></div>
{% include "widgets/v5shoutbox.html" %}
{% include "base/scripts.html" %}
</body>

View File

@ -60,10 +60,8 @@
<li><p><i><a href="/forum/actus/">Voir toutes les news</a></i></p></li>
</ul>
</div>
<div class="home-shoutbox" style="border: 1px solid #737373; padding: 20px">
<div id="v5shoutbox">
Ici yaura la shoutbox (plus tard)
</div>
<div class="home-shoutbox" style="border: 1px solid #e0e0e0">
{% include "widgets/v5shoutbox.html" %}
</div>
<div class="home-projects">
<h1>Projets du moment</h1>

View File

@ -20,6 +20,9 @@ def render(*args, styles=[], scripts=[], modules=[], **kwargs):
'css/programs.css',
'css/editor.css',
'css/search.css',
# The order of these two is important; shoutbox.css overrides
'css/v5shoutbox.css',
'css/shoutbox.css',
]
scripts_ = [
'scripts/trigger_menu.js',
@ -29,6 +32,9 @@ def render(*args, styles=[], scripts=[], modules=[], **kwargs):
'scripts/filter.js',
'scripts/tag_selector.js',
'scripts/editor.js',
'scripts/v5shoutbox_irc.js',
'scripts/v5shoutbox_ui.js',
'scripts/v5shoutbox.js',
]
modules_ = [
'scripts/emoji-picker-element/index.js',

@ -1 +1 @@
Subproject commit 4e3118c779ce3048182033f79206b5f57e3d13a3
Subproject commit 2317e973d4464e81a3838159c987597c3ca2a927