forked from rDrama/rDrama
improve videos
parent
0443148e23
commit
3cf865dfec
|
@ -5369,12 +5369,6 @@ textarea {
|
||||||
margin-bottom: 0.5rem !important;
|
margin-bottom: 0.5rem !important;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
video {
|
|
||||||
max-height: 50vh !important;
|
|
||||||
max-width: 100% !important;
|
|
||||||
margin-top: 0.5rem !important;
|
|
||||||
margin-bottom: 0.5rem !important;
|
|
||||||
}
|
|
||||||
.spotify {
|
.spotify {
|
||||||
max-height: 80px !important;
|
max-height: 80px !important;
|
||||||
max-width: 100% !important;
|
max-width: 100% !important;
|
||||||
|
@ -5658,12 +5652,10 @@ lite-youtube {
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-bottom: 1.3rem !important;
|
margin-bottom: 1.3rem !important;
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
resize: both;
|
overflow: hidden;
|
||||||
overflow: auto;
|
|
||||||
max-height: 70vh !important;
|
max-height: 70vh !important;
|
||||||
max-width: 100vw !important;
|
max-width: 90vw !important;
|
||||||
width: min(100%, 500px);
|
width: min(100%, 500px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7075,15 +7067,19 @@ div.markdown {
|
||||||
.resizable {
|
.resizable {
|
||||||
resize: both;
|
resize: both;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: auto;
|
overflow: hidden;
|
||||||
max-width: 100vw !important;
|
|
||||||
}
|
|
||||||
.resizable > video {
|
|
||||||
height: 99% !important;
|
|
||||||
width: 99% !important;
|
|
||||||
max-height: 70vh !important;
|
max-height: 70vh !important;
|
||||||
max-width: 100vw !important;
|
max-width: 90vw !important;
|
||||||
|
}
|
||||||
|
.resizable.yt {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.resizable > * {
|
||||||
|
height: 95% !important;
|
||||||
|
width: 95% !important;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
|
max-height: 65vh !important;
|
||||||
|
max-width: 85vw !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-signature video {
|
.user-signature video {
|
||||||
|
|
|
@ -95,7 +95,7 @@ def allowed_attributes(tag, name, value):
|
||||||
if name == 'preload' and value == 'none': return True
|
if name == 'preload' and value == 'none': return True
|
||||||
|
|
||||||
if tag == 'p':
|
if tag == 'p':
|
||||||
if name == 'class' and value in {'mb-0','resizable','text-center'}: return True
|
if name == 'class' and value in {'mb-0','resizable','yt','text-center'}: return True
|
||||||
|
|
||||||
if tag == 'span':
|
if tag == 'span':
|
||||||
if name == 'data-bs-toggle' and value == 'tooltip': return True
|
if name == 'data-bs-toggle' and value == 'tooltip': return True
|
||||||
|
@ -650,6 +650,8 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
|
||||||
|
|
||||||
html = handle_youtube_links(i.group(1))
|
html = handle_youtube_links(i.group(1))
|
||||||
if html:
|
if html:
|
||||||
|
if not chat:
|
||||||
|
html = f'<p class="resizable yt">{html}</p>'
|
||||||
sanitized = sanitized.replace(i.group(0), html)
|
sanitized = sanitized.replace(i.group(0), html)
|
||||||
|
|
||||||
if '<pre>' not in sanitized and blackjack != "rules":
|
if '<pre>' not in sanitized and blackjack != "rules":
|
||||||
|
|
|
@ -74,12 +74,6 @@
|
||||||
{% block mobileUserBanner %}{% endblock %}
|
{% block mobileUserBanner %}{% endblock %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-around" id="main-content-row">
|
<div class="row justify-content-around" id="main-content-row">
|
||||||
{% block sidebar %}
|
|
||||||
{% if has_sidebar and (home or p) %}
|
|
||||||
{% set sidebar = "sidebar_" ~ SITE_NAME ~ ".html" %}
|
|
||||||
{% include sidebar %}
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
|
||||||
<div class="order-first col h-100 {% block customPadding %}{% if request.path.startswith('/@') %}user-gutters{% else %}custom-gutters{% endif %}{% endblock %}" id="main-content-col">
|
<div class="order-first col h-100 {% block customPadding %}{% if request.path.startswith('/@') %}user-gutters{% else %}custom-gutters{% endif %}{% endblock %}" id="main-content-col">
|
||||||
{% block desktopUserBanner %}{% endblock %}
|
{% block desktopUserBanner %}{% endblock %}
|
||||||
{% block desktopBanner %}{% endblock %}
|
{% block desktopBanner %}{% endblock %}
|
||||||
|
@ -88,6 +82,12 @@
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
{% block pagenav %}{% endblock %}
|
{% block pagenav %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
{% block sidebar %}
|
||||||
|
{% if has_sidebar and (home or p) %}
|
||||||
|
{% set sidebar = "sidebar_" ~ SITE_NAME ~ ".html" %}
|
||||||
|
{% include sidebar %}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% block mobilenavbar %}{% include "mobile_navigation_bar.html" %}{% endblock %}
|
{% block mobilenavbar %}{% include "mobile_navigation_bar.html" %}{% endblock %}
|
||||||
|
|
|
@ -110,7 +110,9 @@
|
||||||
<script defer src="{{'js/vendor/twitter.js' | asset}}"></script>
|
<script defer src="{{'js/vendor/twitter.js' | asset}}"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif p.domain in ['youtu.be','youtube.com'] and p.embed and p.embed.startswith('<lite-youtube') %}
|
{% elif p.domain in ['youtu.be','youtube.com'] and p.embed and p.embed.startswith('<lite-youtube') %}
|
||||||
|
<p class="resizable yt">
|
||||||
{{p.embed | safe}}
|
{{p.embed | safe}}
|
||||||
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,7 @@
|
||||||
<audio id="video2-{{p.id}}" controls preload="none" src="{{p.realurl(v)}}"></audio>
|
<audio id="video2-{{p.id}}" controls preload="none" src="{{p.realurl(v)}}"></audio>
|
||||||
</div>
|
</div>
|
||||||
{% elif p.is_youtube %}
|
{% elif p.is_youtube %}
|
||||||
<div id="video-{{p.id}}" class="d-none ml-md-5 mt-4">
|
<div id="video-{{p.id}}" class="d-none ml-md-5 mt-4 resizable">
|
||||||
{{p.embed | safe}}
|
{{p.embed | safe}}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue