first pass

pull/165/head
Chuck Sneed 2023-07-02 14:45:04 -05:00
parent cd737046ea
commit ca5f3e5b92
4 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,9 @@
.orgy-top-container {
display: flex;
flex-flow: row wrap;
justify-content: space-around;
}
.orgy-chat-window-item {
flex-grow: 2;
}

View File

@ -35,7 +35,7 @@ messages = cache.get(f'messages') or {}
def chat(v):
if not v.admin_level and TRUESCORE_CHAT_MINIMUM and v.truescore < TRUESCORE_CHAT_MINIMUM:
abort(403, f"Need at least {TRUESCORE_CHAT_MINIMUM} truescore for access to chat!")
return render_template("chat.html", v=v, messages=messages)
return render_template("orgy.html", v=v, messages=messages)
@socketio.on('speak')
@is_not_permabanned

View File

@ -0,0 +1,35 @@
{%- extends 'root.html' -%}
{% block pagetitle -%}Chat{%- endblock %}
{% block pagetype %}chat{% endblock %}
{% block body_attributes %}class="has_header"{% endblock %}
{% block body %}
{% include "header.html" %}
{% include "modals/expanded_image.html" %}
{% include "modals/emoji.html" %}
{% include "util/macros.html" %}
{% set vlink = '<a href="/id/' ~ v.id ~ '">' %}
<div class="container pb-4">
<div class="orgy-top-container">
<div >
<h1>Orgy</h1>
<img width=720 height=480 src="https://i.guim.co.uk/img/media/26392d05302e02f7bf4eb143bb84c8097d09144b/446_167_3683_2210/master/3683.jpg?width=1200&quality=85&auto=format&fit=max&s=a52bbe202f57ac0f5ff7f47166906403"/>
{{macros.chat_users_list()}}
</div>
<div class="orgy-chat-window-item">
{{macros.chat_users_online()}}
{{macros.chat_window(vlink)}}
</div>
</div>
</div>
<input id="vid" hidden value="{{v.id}}">
<input id="site_name" hidden value="{{SITE_NAME}}">
<input id="slurreplacer" hidden value="{{v.slurreplacer}}">
<input id="admin_level" hidden value="{{v.admin_level}}">
<script defer src="{{'js/vendor/socketio.js' | asset}}"></script>
<script defer src="{{'js/chat.js' | asset}}"></script>
<script defer src="{{'js/vendor/lozad.js' | asset}}"></script>
<script defer src="{{'js/vendor/lite-youtube.js' | asset}}"></script>
{% endblock %}

View File

@ -139,6 +139,7 @@
{% if request.path.endswith('/chat') %}
<link rel="stylesheet" href="{{'css/chat.css' | asset}}">
<link rel="stylesheet" href="{{'css/orgy.css' | asset}}">
{% endif %}
{% endmacro %}