Compare commits

...

4 Commits

Author SHA1 Message Date
Snakes aada1b5474
orgy: update URL for Day 2. 2022-11-16 14:43:50 -05:00
Snakes 6a5c4510c5
watchparty: put chat on right on desktop. 2022-11-16 14:43:49 -05:00
Snakes d39a5c8e44
Add /orgy route alias. 2022-11-16 14:43:49 -05:00
Snakes 5d4e48ee67
Implement watch party (ghetto edition). 2022-11-16 14:43:49 -05:00
4 changed files with 71 additions and 2 deletions

View File

@ -412,3 +412,9 @@ if not os.path.exists(f'files/templates/donate_{SITE_NAME}.html'):
@auth_desired_with_logingate
def donate(v):
return render_template(f'donate_{SITE_NAME}.html', v=v)
@app.get("/watchparty")
@app.get("/orgy")
@is_not_permabanned
def chat_watchparty(v):
return render_template("chat_watchparty.html", v=v)

View File

@ -9,7 +9,7 @@
{% endif %}
{{html_head.html_head(true, true, true, csp, "Chat", none, "", false)}}
<body>
{% include "header.html" %}
{% if not request.values.get("embed", False) %}{% include "header.html" %}{% endif %}
{% include "modals/expanded_image.html" %}
{% include "modals/emoji.html" %}
@ -33,4 +33,19 @@
{% endif %}
<script defer src="{{'js/lozad.js' | asset}}"></script>
<script defer src="{{'js/lite-youtube.js' | asset}}"></script>
{% if request.values.get("embed", False) %}
<style>
body {
padding-top: 0;
}
@media screen and (min-width: 650px) {
.App-center {
height: 80vh;
}
.App-content {
height: 75vh;
}
}
</style>
{% endif %}
</body>

View File

@ -0,0 +1,48 @@
{%- import 'util/macros.html' as macros with context -%}
{%- import 'html_head.html' as html_head with context -%}
<!DOCTYPE html>
<html lang="en">
{% if SITE == 'localhost' %}
{% set csp="script-src 'self' 'unsafe-inline' rdrama.net; connect-src 'self'; object-src 'none';" %}
{% else %}
{% set csp=none %}
{% endif %}
{{html_head.html_head(true, true, true, csp, "Chat", none, "", false)}}
<body>
{% include "header.html" %}
<div id="watchparty">
<iframe id="watchparty-video" src="https://www.youtube.com/embed/FREuW765_O4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe id="watchparty-chat" src="/chat?embed=true"></iframe>
</div>
<style>
html, body, #watchparty {
width: 100%;
height: 100%;
}
#watchparty {
display: flex;
flex-direction: column;
}
#watchparty-video {
width: 100%;
height: 50%;
max-width: 560px;
max-height: 315px;
margin: 0 auto;
flex-grow: 1;
}
#watchparty-chat {
width: 100%;
height: 50%;
flex-grow: 1;
}
@media screen and (min-width: 1000px) {
#watchparty {
flex-direction: row;
}
#watchparty-video, #watchparty-chat {
height: 100%;
}
}
</style>
</body>

View File

@ -6,7 +6,7 @@ server {
proxy_set_header Host $http_host;
add_header Referrer-Policy "same-origin";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
add_header X-Frame-Options "deny";
#add_header X-Frame-Options "deny";
add_header X-Content-Type-Options "nosniff";
location / {