Merge branch 'frost' of https://github.com/Aevann1/Drama into frost

remotes/1693045480750635534/spooky-22
Aevann1 2021-12-29 08:43:24 +02:00
commit c73121cfa3
9 changed files with 134 additions and 71 deletions

View File

@ -1172,8 +1172,8 @@ video {
.h-7 {
height: 1.75rem;
}
.max-h-10 {
max-height: 2.5rem;
.max-h-0 {
max-height: 0px;
}
.max-h-\[20rem\] {
max-height: 20rem;
@ -1226,9 +1226,6 @@ video {
.w-\[14px\] {
width: 14px;
}
.w-24 {
width: 6rem;
}
.w-8 {
width: 2rem;
}
@ -3760,6 +3757,10 @@ video {
display: none;
}
.sm\:max-h-10 {
max-height: 2.5rem;
}
.sm\:items-stretch {
align-items: stretch;
}
@ -3787,6 +3788,11 @@ video {
padding-right: 0px;
}
.sm\:text-lg {
font-size: 1.125rem;
line-height: 1.75rem;
}
.sm\:text-base {
font-size: 1rem;
line-height: 1.5rem;

View File

@ -194,7 +194,7 @@
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?a=2">
<link rel="stylesheet" href="/static/dist/main.css?a=2">
<link rel="stylesheet" href="/static/dist/main.css?a=3">
{% if v %}
<style>:root{--primary:#dc2626}</style>

View File

@ -73,7 +73,7 @@
<script src="/assets/CHRISTMAS/js/pusher.js?a=1"></script>
{% endif %}
<script src="/assets/CHRISTMAS/js/submission_listing.js?a=1"></script>
<script src="/assets/CHRISTMAS/js/submission_listing.js?a=6"></script>
{% if v and not v.fp %}
<script>

View File

@ -36,7 +36,7 @@
<link rel="stylesheet" href="/assets/CHRISTMAS/css/main.css?a=2">
<link rel="stylesheet" href="/static/dist/main.css?a=2">
<link rel="stylesheet" href="/static/dist/main.css?a=3">
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>

View File

@ -1,4 +1,65 @@
{% set random = range(1, 11)|random() %}
{% set random = range(0,11)|random() %}
{%
set banner = [
{
'username': 'Bartholomew_1',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-1.jpg?a=1'
},
{
'username': 'Yui',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-2.jpg?a=1'
},
{
'username': 'Bartholomew_1',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-3.jpg?a=1'
},
{
'username': 'chiobu',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-4.jpg?a=1'
},
{
'username': 'chiobu',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-5.webp?a=1'
},
{
'username': 'geese_suck',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-6.jpg?a=1'
},
{
'username': 'Bartholomew_1',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-7.jpg?a=1'
},
{
'username': 'drama_enthusiast',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-8.webp?a=1'
},
{
'username': 'dramarama',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-9.jpg?a=1'
},
{
'username': 'geese_suck',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-10.jpg?a=1'
},
{
'username': 'ThreeLetterAgent',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-11.jpg?a=1'
},
{
'username': 'geese_suck',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-12.jpg?a=1'
},
{
'username': 'geese_suck',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-13.jpg?a=1'
},
{
'username': 'geese_suck',
'image': '/static/assets/CHRISTMAS/banners/sidebar-banner-14.jpg?a=1'
}
]
%}
<div class="hidden xl:block xl:col-start-10 xl:col-end-13 flex-shrink-0 py-4">
<div>
@ -57,16 +118,11 @@
</ul>
</div>
<hr class="mt-6 mb-5 h-0.5 border-b border-gray-300 dark:border-gray-900 shadow-inset-t-white-05"/>
<button data-bs-toggle="modal" data-bs-target="#expandImageModal" data-bs-url="/static/assets/CHRISTMAS/banners/banner-1.jpg?a=1" onclick="expandDesktopImage('/static/assets/CHRISTMAS/banners/banner-1.jpg?a=1')" class="w-full h-56 shadow-sm p-[3px] bg-white dark:bg-gray-900 overflow-hidden">
<img class="w-full h-full flex-shrink-0 object-contain cursor-pointer" src="/static/assets/CHRISTMAS/banners/banner-1.jpg?a=1" alt="new year celebration party with drinks"/>
</button>
<!-- Link to OC post -->
<small class="block mt-1 text-right text-gray-500">
<a href="/post/32341/" class="font-bold">Share</a> your artwork to have it featured
</small>
<!-- Creds -->
<small class="hidden mt-1 text-right text-gray-500">
Artwork by <a href="/@username-here" class="font-bold">@username-here</a>
<a href="/post/32341/" class="block w-full h-56 shadow-sm p-[3px] bg-white dark:bg-gray-900 overflow-hidden">
<img class="w-full h-full flex-shrink-0 object-contain cursor-pointer" src="{{ banner[random].image }}" alt="artwork featuring an orange and white cat"/>
</a>
<small class="mt-1 block text-gray-500">
Artwork by <a href="/@{{ banner[random].username }}" class="font-bold">@{{ banner[random].username }}</a>
</small>
{% if v %}
<hr class="mt-6 mb-5 h-0.5 border-b border-gray-300 dark:border-gray-900 shadow-inset-t-white-05"/>

View File

@ -263,7 +263,7 @@
{% endif %}
<!-- Post -->
<div id="post-root" class="sm:py-4 my-2.5 sm:my-0">
<div id="post-root" class="sm:py-4 mt-2.5 sm:my-0">
<div id="post-{{p.id}}" class="w-full p-2.5 md:p-0 bg-gray-200 dark:bg-gray-800 {% if voted==1 %}upvoted{% elif voted==-1 %}downvoted{% endif %}">
<div class="{% if p.deleted_utc > 0 %}deleted {% endif %} flex flex-row-reverse flex-nowrap justify-end">
@ -271,7 +271,7 @@
{% if not p.is_image and p.thumb_url and not p.embed_url %}
<div class="hidden md:block pl-3 flex-shrink-0">
<a rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>
<img loading="lazy" src="{{p.thumb_url}}" class="post-thumbnail shadow-sm p-[3px] w-24 h-16 md:w-32 md:h-20 object-cover object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0" alt="post thumbnail">
<img loading="lazy" src="{{p.thumb_url}}" class="post-thumbnail shadow-sm p-[3px] w-20 h-14 md:w-32 md:h-20 object-cover object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0" alt="post thumbnail">
</a>
</div>
{% endif %}
@ -454,9 +454,7 @@
</div>
{% if v and (v.id==p.author_id or v.admin_level > 1 and v.admin_level > 2) %}
<div class="py-2">
{% include "CHRISTMAS/submission/SubmissionEditForm.html" %}
</div>
{% endif %}
{% if p.embed_url and "http" not in p.embed_url and "<" not in p.embed_url %}
@ -536,7 +534,7 @@
{% endif %}
</div>
<div class="shadow-inset-t-white-05 bg-gray-200 dark:bg-gray-800 md:border-t md:border-gray-300 dark:md:border-gray-900 py-4 mt-3 md:mt-0">
<div class="shadow-inset-t-white-05 bg-gray-200 dark:bg-gray-800 md:border-t md:border-gray-300 dark:md:border-gray-900 py-4 mt-2.5 md:mt-0">
<div class="flex flex-wrap justify-between mb-2 px-2.5 md:px-0">
<div class="md:ml-20 font-bold text-sm">

View File

@ -1,4 +1,4 @@
<div id="edit-post-body-{{p.id}}" class="hidden">
<div id="edit-post-body-{{p.id}}" class="py-2 hidden">
<form id="post-edit-form-{{p.id}}" class="flex flex-col w-full" action="/edit_post/{{p.id}}" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input type="hidden" name="current_page" value="{{request.path}}">

View File

@ -45,7 +45,7 @@
</div>
{% endif %}
<li id="post-{{p.id}}" class="relative p-2.5 mb-2 md:mb-4 md:pb-4 md:pt-0 md:px-0 border-b border-gray-300 dark:border-gray-700 {% if p.is_banned %}bg-red-200{% elif p.deleted_utc %}bg-yellow-200{% else %} md:bg-transparent bg-gray-200 dark:bg-gray-800 dark:md:bg-transparent{% endif %} {% if p.stickied %} stickied{% endif %}{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}{% if p.over_18 %} nsfw{% endif %} list-none">
<li id="post-{{p.id}}" class="relative p-2.5 mb-1 md:mb-4 md:pb-4 md:pt-0 md:px-0 border-b border-gray-300 dark:border-gray-700 {% if p.is_banned %}bg-red-200{% elif p.deleted_utc %}bg-yellow-200{% else %} md:bg-transparent bg-gray-200 dark:bg-gray-800 dark:md:bg-transparent{% endif %} {% if p.stickied %} stickied{% endif %}{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}{% if p.over_18 %} nsfw{% endif %} list-none">
<div class="flex flex-nowrap">
@ -241,14 +241,14 @@
{% endif %}
</div>
<h5 class="post-title font-medium text-lg md:text-xl leading-5 mb-2">
<h5 class="post-title font-medium sm:text-lg md:text-xl leading-5 mb-2">
<a {% if v and v.newtab %}target="_blank"{% endif %} href="{{p.permalink}}" class="{% if p.author.agendaposter %}agendaposter{% endif %} stretched-link text-black dark:text-gray-200 hover:text-primary visited:text-gray-700 dark:visited:text-gray-400 break-words" style="word-break: break-word;">
{{p.realtitle(v) | safe}}
</a>
</h5>
{% if p.realbody(v) and not p.over_18 %}
<div class="{% if p.author.agendaposter %}agendaposter{% endif %} post-text relative z-10 gradient-mask max-h-10 overflow-hidden pointer-events-none text-gray-500 break-words" style="word-break: break-word;" id="post-text-{{p.id}}">
<div class="{% if p.author.agendaposter %}agendaposter{% endif %} post-text relative z-10 gradient-mask max-h-0 sm:max-h-10 overflow-hidden pointer-events-none text-gray-500 break-words" style="word-break: break-word;" id="post-text-{{p.id}}">
{{p.realbody(v) | safe}}
</div>
{% endif %}
@ -259,37 +259,33 @@
</div>
<div class="relative z-10 flex flex-row flex-nowrap pl-3 md:pl-5 flex-shrink-0">
<div style="z-index: 3;">
{% if p.club and not (v and v.paid_dues) %}
<img loading="lazy" src="/assets/images/emojis/marseyglow.webp" class="post-thumbnail shadow-sm p-[3px] w-24 h-16 md:w-32 md:h-20 object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0">
{% elif not p.url %}
<a {% if v and v.newtab %}target="_blank"{% endif %} {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %}>
<img loading="lazy" src="{{p.thumb_url}}" class="post-thumbnail shadow-sm p-[3px] w-24 h-16 md:w-32 md:h-20 object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0">
</a>
{% elif p.is_image %}
<button data-bs-toggle="modal" data-bs-target="#expandImageModal" data-bs-url="{{p.realurl(v)}}" onclick="expandDesktopImage('{{ p.realurl(v) }}')">
<img loading="lazy" src="{{p.thumb_url}}" class="post-thumbnail shadow-sm p-[3px] w-24 h-16 md:w-32 md:h-20 object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0">
</button>
{% elif (p.url and p.url.lower().endswith('.mp4')) or (p.embed_url and "youtu" in p.domain) or (p.url and "streamable.com/e/" in p.url) %}
<button onclick="document.getElementById('video-{{p.id}}').classList.toggle('hidden')">
<img loading="lazy" src="{{p.thumb_url}}" class="post-thumbnail shadow-sm p-[3px] w-24 h-16 md:w-32 md:h-20 object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0">
</button>
{% else %}
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}">
<img loading="lazy" src="{{p.thumb_url}}" class="post-thumbnail shadow-sm p-[3px] w-24 h-16 md:w-32 md:h-20 object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0">
</a>
{% endif %}
</div>
{% if p.club and not (v and (v.paid_dues or v.id == p.author_id)) %}
<img loading="lazy" src="/assets/images/emojis/marseyglow.webp" class="post-thumbnail shadow-sm p-[3px] w-20 h-14 md:w-32 md:h-20 object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0">
{% elif not p.url %}
<a {% if v and v.newtab %}target="_blank"{% endif %} {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %}>
<img loading="lazy" src="{{p.thumb_url}}" class="post-thumbnail shadow-sm p-[3px] w-20 h-14 md:w-32 md:h-20 object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0">
</a>
{% elif p.is_image %}
<a href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#expandImageModal" data-bs-url="{{p.realurl(v)}}" onclick="expandDesktopImage('{{ p.realurl(v) }}')">
<img loading="lazy" src="{{p.thumb_url}}" class="post-thumbnail shadow-sm p-[3px] w-20 h-14 md:w-32 md:h-20 object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0">
</a>
{% elif p.is_video %}
<a href="javascript:void(0)" onclick="toggleVideo({{p.id}})">
<img alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-thumbnail shadow-sm p-[3px] w-20 h-14 md:w-32 md:h-20 object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0">
</a>
{% elif p.is_youtube %}
<a href="javascript:void(0)" onclick="document.getElementById('video-{{p.id}}').classList.toggle('hidden')">
<img alt="post thumnail" loading="lazy" src="{{p.thumb_url}}" class="post-thumbnail shadow-sm p-[3px] w-20 h-14 md:w-32 md:h-20 object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0">
</a>
{% else %}
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}">
<img loading="lazy" src="{{p.thumb_url}}" class="post-thumbnail shadow-sm p-[3px] w-20 h-14 md:w-32 md:h-20 object-cover bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 flex-shrink-0">
</a>
{% endif %}
</div>
</div>
<div class="relative z-10 md:hidden pt-3">
{% include "CHRISTMAS/submission/SubmissionActionsMobile.html" %}
</div>
{% include "CHRISTMAS/modals/ModalSubmissionActions.html" %}
{% if p.is_image and not p.over_18 and ((v and v.cardview) or (not v and environ.get('CARD_VIEW') == '1')) %}
<div class="md:ml-[4.5rem] mt-4">
<a target="_blank" rel="nofollow noopener noreferrer" href="{{p.url}}" class="inline-block">
@ -298,29 +294,28 @@
</div>
{% endif %}
{% if not p.club or v and (v.paid_dues or v.id == p.author_id) %}
{% if not p.club or v and (v.paid_dues or v.id == p.author_id) and (p.is_video or p.is_youtube) %}
<div class="relative z-10">
{% if p.is_video %}
<div id="video-{{p.id}}" style="text-align: center" class="{% if p.over_18 or not ((v and v.cardview) or (not v and environ.get('CARD_VIEW') == '1')) %}hidden{% endif %} md:ml-[4.5rem] mt-3">
<div id="video-{{p.id}}" class="text-center {% if p.over_18 or not ((v and v.cardview) or (not v and environ.get('CARD_VIEW') == '1')) %}hidden{% endif %} md:ml-[4.5rem] mt-3">
<video controls loop preload="metadata" class="w-full max-h-[20rem]">
<source src="{{p.realurl(v)}}" type="video/mp4">
</video>
</div>
{% elif p.embed_url and "youtu" in p.domain %}
<div id="video-{{p.id}}" style="text-align: center" class="{% if p.over_18 or not ((v and v.cardview) or (not v and environ.get('CARD_VIEW') == '1')) %}hidden{% endif %} md:ml-[4.5rem] mt-3">
{% if 'lite' in p.embed_url %}
{{p.embed_url | safe}}
{% else %}
<iframe loading="lazy" src="{{p.embed_url}}" frameborder="0" class="w-full max-h-[20rem]" width="600" height="337" allow="fullscreen"></iframe>
{% endif %}
</div>
{% elif p.url and "streamable.com/e/" in p.url %}
<div id="video-{{p.id}}" style="text-align: center" class="{% if p.over_18 or not ((v and v.cardview) or (not v and environ.get('CARD_VIEW') == '1')) %}hidden{% endif %} md:ml-[4.5rem] mt-3">
<iframe loading="lazy" src="{{p.url}}" frameborder="0" class="w-full max-h-[20rem]" width="600" height="337" allow="fullscreen">
</iframe>
{% elif p.is_youtube %}
<div id="video-{{p.id}}" class="{% if p.over_18 or not ((v and v.cardview) or (not v and environ.get('CARD_VIEW') == '1')) %}hidden{% endif %} md:ml-[4.5rem] mt-3">
{{p.embed_url | safe}}
</div>
{% endif %}
</div>
{% endif %}
<div class="relative z-10 md:hidden">
{% include "CHRISTMAS/submission/SubmissionActionsMobile.html" %}
</div>
{% include "CHRISTMAS/modals/ModalSubmissionActions.html" %}
</li>
{% else %}
@ -393,7 +388,7 @@
{% include "CHRISTMAS/expanded_image_modal.html" %}
<script defer src="/assets/CHRISTMAS/js/new_comments_count.js?a=1"></script>
<script defer src="/assets/CHRISTMAS/js/submission_listing.js?a=1"></script>
<script defer src="/assets/CHRISTMAS/js/submission_listing.js?a=6"></script>
<style>
.mod:before {

View File

@ -136,11 +136,11 @@
<span data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Original username: @{{u.original_username}}">@{{u.original_username}}
</span>
</div>
{% endif %}
<div>&#183;</div>
<div>
#{{u.id}}
</div>
{% endif %}
</div>
</div>
</div>
@ -158,6 +158,10 @@
<div class="text-lg mb-0">{{ u.coins_spent }}</div>
<small class="block text-gray-500">Dramacoin Spent</small>
</li>
<li>
<div class="text-lg mb-0">{{ u.truecoins }}</div>
<small class="block text-gray-500">Dramacoin Earned</small>
</li>
<li>
<div class="text-lg mb-0">{{ u.coins }}</div>
<small class="block text-gray-500">Dramacoin Balance</small>
@ -192,6 +196,10 @@
<div class="text-lg font-bold mb-0">{{ u.coins_spent }}</div>
<small class="block font-bold text-gray-500">Dramacoin Spent</small>
</li>
<li>
<div class="text-lg font-bold mb-0">{{ u.truecoins }}</div>
<small class="block font-bold text-gray-500">Dramacoin Earned</small>
</li>
<li>
<div class="text-lg font-bold mb-0">{{ u.coins }}</div>
<small class="block font-bold text-gray-500">Dramacoin Balance</small>