dark mode toggle

pull/79/head
geese_suck 2022-12-16 15:35:01 -08:00
parent de0014f008
commit 7755ef6d57
Signed by: geese_suck
GPG Key ID: 4D09E4B0A7264746
12 changed files with 58 additions and 204 deletions

View File

@ -147,6 +147,8 @@ textarea, input[type=textbox], input[type=search] {
cursor: url(/assets/images/event/pointer.png?v=1), auto !important;
}
.fa-moon-over-sun:before{content:"\f74a"}
/* lights */
.navbar::after, .lights::after {

View File

@ -0,0 +1 @@
/**/

View File

@ -0,0 +1,19 @@
function postToastRoastEventDarkmode(t, url) {
const xhr = createXhrWithFormKey(url);
xhr[0].onload = function() {
postToastLoadEventDarkmode(xhr[0])
};
xhr[0].send(xhr[1]);
}
function postToastLoadEventDarkmode(xhr) {
let data
try {
data = JSON.parse(xhr.response)
}
catch (e) {
console.log(e)
}
success = xhr.status >= 200 && xhr.status < 300;
showToast(success, getMessageFromJsonData(success, data));
}

View File

@ -10,7 +10,7 @@ class EventUser(Base):
event_music = Column(Boolean, default=True, nullable=False)
# start event specific columns
event_darkmode = Column(Boolean, default=False, nullable=False)
# end event specific columns
def __init__(self, *args, **kwargs):

View File

@ -1,2 +1,3 @@
from .const import *
from .jinja import *
from .get import *

View File

@ -1,12 +1,17 @@
import random
from datetime import date
from .get import get_or_create_event_user
def daysTillChristmas():
def days_till_christmas():
today = date.today()
christmas = date(today.year, 12, 25)
delta = abs(christmas - today)
return delta.days
def user_event_darkmode(target, db):
user = get_or_create_event_user(target, db)
return user.event_darkmode
EVENT_JINJA_CONST = {
"EVENT_BANNER": "banner_rDrama.html",
"EVENT_ICONS": True,
@ -25,6 +30,7 @@ EVENT_JINJA_CONST = {
" dramatards having their chimneys stuffed by Santa",
],
"random": random,
"daysTillChristmas": daysTillChristmas,
"days_till_christmas": days_till_christmas,
"user_event_darkmode": user_event_darkmode,
}

View File

@ -1,2 +1,3 @@
from .awards import *
from .jinja import *
from .theme import *

View File

@ -0,0 +1,16 @@
from files.events.helpers import get_or_create_event_user
from files.__main__ import g, app
from files.routes.wrappers import auth_required
@app.post("/event-darkmode")
@auth_required
def event_darkmode(v):
user = get_or_create_event_user(v, g.db)
if user.event_darkmode:
user.event_darkmode = False
else:
user.event_darkmode = True
g.db.add(user)
return {}

View File

@ -1,199 +0,0 @@
<svg id="banner-halloween-svg" viewBox="0 15 1558 320" width="100%" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<g id="banner-halloween-sky">
<rect width="1558" height="379.12619" id="banner-halloween-skybox" fill="url(#banner-halloween-skybox_1_)"/>
</g>
<g id="banner-halloween-scene" transform="matrix(1,0,0,1.0023048,427.09249,-121.25261)">
<g id="banner-halloween-text" transform="translate(-27.135979,1.5613725)" style="transform:rotate(-1.5deg) skewX(-3deg)">
<text id="banner-halloween-title" x="100" y="340" fill="#b31a46" stroke="#ffe19b"
stroke-width="2" style="font-size:70px;font-family:Plakat-Fraktur;filter: drop-shadow(3px 3px 0px black)">
<tspan>Merry Fistmas!</tspan>
</text>
</g>
<g id="banner-halloween-house" transform="translate(-236.09098,3.8681347)">
<path id="banner-halloween-house-fill" fill="url(#house-fill-gradient)" d="m 227.4,354.9 c 0.4,-10 13.8,-34.6 13.8,-34.6 -7.1,1.4 -15.3,2.4 -23.6,3.1 l 3.2,-14.8 6.9,-0.3 c -9.2,-11.2 -10.4,-19 -10.4,-19 -4.4,0 -19.1,0.4 -24.8,0.5 l 1,-11.7 c 3.3,0.1 5.3,0.2 5.3,0.2 -10.4,-7.5 -18.4,-31.7 -20.7,-38.6 0,0 -1.7,7.8 -10.4,22.2 -1.4,2.3 -2.7,4.3 -4,6 -3.8,-4.3 -9.3,-12.1 -6.4,-18.6 l -7.1,-0.2 -0.3,-5.1 4.4,0.2 c -5.8,-3.3 -12.1,-15.6 -12.1,-15.6 0,0 -4,11.9 -8.8,14.6 l 3.6,0.2 -0.4,5.4 -43.4,-1 c 0,0 1.5,6.1 -0.4,10.8 -1.9,4.6 -13.4,14.2 -13.4,14.2 l 15,1.9 1,42.6 -29.8,-3.1 c 0,0 19.6,26.1 21.9,40.7 1.2,7.3 0.7,12.9 -0.1,16.6 l -29.9,14.1 h 182.8 l -14.7,-11.1 c 0.6,-3.9 1.5,-12.3 1.8,-19.6 z m -30.2,-38.7 5.8,0.2 v 6.1 c -3.3,-0.6 -6.4,-3 -5.8,-6.3 z m 12.8,1.1 c 0,0.1 0,0.1 0,0 0,3.5 -2.3,5 -4.9,5.3 -0.1,-1.6 -0.2,-3.9 -0.3,-6.2 l 5.1,0.1 c 0.1,0.3 0.1,0.6 0.1,0.8 z m -72.4,16.9 c 0,0 10.3,1 21.3,2 l -0.5,10.5 -18.8,0.2 c -0.5,-4.7 -1.2,-9.4 -2,-12.7 z m 32.2,-39.2 6,-0.3 -0.4,11 -6.1,-0.3 z m 10,51.4 -17.9,0.2 0.5,-10.2 c 7.2,0.6 14.2,1.1 18.4,1.2 z m -21.6,2.7 -0.8,15.5 c -6.6,-0.2 -13.1,-0.3 -16.4,-0.4 0,0 -0.4,-7.4 -1.2,-15.3 z m 3.6,0 17.7,0.2 -1.8,15.8 c 0,0 -7.9,-0.2 -16.6,-0.4 z m 30.2,0.1 0.4,-12.1 5.2,-0.1 -0.3,12.2 z m 10.1,0 0.4,-12.1 5.2,-0.1 -0.3,12.2 z m 14.6,0 h -5.3 l 0.4,-12.1 5.2,-0.1 z m -33.7,-43.1 -6,-0.3 0.6,-11.1 6.2,-0.3 z m 0.9,-12.9 -6.2,0.1 0.5,-9.7 h 6.4 z m -8,0.1 -6,0.1 0.4,-9.8 h 5.9 z m -59.3,72.3 -6.7,0.4 v -32.6 l 5.8,0.4 z m -18.3,-32.3 5.8,0.4 1,31.9 -6.7,0.4 v -32.7 z m 111.4,-17.7 c -1.3,0 -3.1,0 -4.9,-0.1 -0.1,-1.9 -0.1,-3.7 -0.2,-5 0.6,0.1 1.2,0.2 1.8,0.5 1.6,0.8 2.8,2.8 3.3,4.6 z m -6.7,-5 v 4.9 c -2.2,-0.1 -4.3,-0.2 -5.5,-0.2 0.3,-0.6 0.7,-1.2 1,-1.8 1.1,-1.7 2.7,-2.7 4.5,-2.9 z m -61.4,-6.6 -9.9,0.1 0.1,-13.2 h 10 c -0.3,5.4 -0.6,11.2 -0.2,13.1 z m -23.4,-13.1 h 10.7 l -1.1,13.2 -11.8,0.1 c 0,0 2,-4.4 2.2,-13.3 z m 23.8,-2.1 -10.2,0.2 0.1,-8.9 10.9,0.2 c 0,0 -0.4,3.9 -0.8,8.5 z m -12.2,-8.8 -0.8,9 -10.9,0.2 c 0,-2.8 -0.2,-6 -0.7,-9.5 z" />
<g id="banner-halloween-house-windows" fill="url(#banner-halloween-house-window-gradient)" style="filter: drop-shadow(0px 0px 8px #ce9a00);">
<!--window 1-->
<path d="m 158.9,336.2 c -11,-0.9 -21.3,-2 -21.3,-2 0.8,3.3 1.5,8 2,12.7 l 18.8,-0.2 z" />
<path d="m 157.4,364.6 0.8,-15.5 -18.4,-0.2 c 0.8,7.9 1.2,15.3 1.2,15.3 3.4,0.1 9.9,0.2 16.4,0.4 z" />
<path d="m 177.6,365 1.8,-15.8 -17.7,-0.2 -0.7,15.6 c 8.7,0.3 16.6,0.4 16.6,0.4 z" />
<path d="m 162.4,336.5 -0.5,10.2 17.9,-0.2 1,-8.8 c -4.3,-0.1 -11.3,-0.6 -18.4,-1.2 z" />
<!--window 2-->
<polygon points="197.7,336.9 192.5,337.1 192,349.2 197.4,349.2 " />
<polygon points="207.7,336.9 202.6,337.1 202.1,349.2 207.4,349.2 " />
<polygon points="211.8,337.1 211.3,349.2 216.7,349.2 217,336.9 " />
<!--window 3-->
<polygon points="109.8,333.3 109.8,366 116.6,365.6 115.6,333.7 " />
<polygon points="105,365.6 104.1,333.7 98.3,333.3 98.3,366 " />
<!--window 4-->
<path d="m 128.9,290.9 h -10.7 c -0.1,8.9 -2.2,13.3 -2.2,13.3 l 11.8,-0.1 z" />
<path d="m 131.9,289 10.2,-0.2 c 0.4,-4.6 0.8,-8.5 0.8,-8.5 L 132,280.1 Z" />
<path d="m 131.8,290.9 -0.1,13.2 9.9,-0.1 c -0.4,-1.9 -0.1,-7.7 0.2,-13.1 z" />
<path d="m 129.1,289.1 0.8,-9 -12.4,-0.3 c 0.5,3.6 0.7,6.8 0.7,9.5 z" />
<!--window 5-->
<polygon points="175.4,305.7 175.8,294.8 169.8,295 169.4,305.5 " />
<polygon points="170.3,283.6 169.9,293.4 175.9,293.3 176.2,283.6 " />
<polygon points="178.2,283.6 177.7,293.3 183.9,293.2 184.5,283.6 " />
<polygon points="183.8,294.4 177.6,294.7 177,305.8 183,306.1 " />
<!--window 6-->
<path d="m 204.8,315.5 c 1.8,0.1 3.6,0.1 4.9,0.1 -0.5,-1.9 -1.7,-3.8 -3.3,-4.5 -0.6,-0.3 -1.2,-0.4 -1.8,-0.5 0.1,1.2 0.1,3 0.2,4.9 z" />
<path d="m 203,322.5 v -6.1 l -5.8,-0.2 c -0.6,3.3 2.5,5.7 5.8,6.3 z" />
<path d="m 205.1,322.6 c 2.6,-0.2 4.9,-1.8 4.9,-5.2 0,0 0,0 0,-0.1 0,-0.2 0,-0.5 -0.1,-0.8 l -5.1,-0.1 c 0.1,2.3 0.2,4.6 0.3,6.2 z" />
<path d="m 203,315.5 v -4.9 c -1.8,0.2 -3.4,1.3 -4.5,2.8 -0.4,0.6 -0.8,1.2 -1,1.8 1.2,0.1 3.3,0.2 5.5,0.3 z" />
</g>
</g>
<path id="banner-halloween-ground" fill="url(#ground-gradient)" d="m 1033.896,367.2 c -77.89999,5.6 -117.16159,-0.1 -203.16319,1.7 -24.097,0.5 -48.6096,-0.7 -72.4989,0.5 -57.7499,2.9 -118.8235,3.8 -173.0419,10.8 -104.07437,13.4 -154.55357,8.3 -271.09197,3.1 -48.6096,-2.1 -127.1328,-1.3 -175.95013,-2.4 -126.09413,-2.8 -205.24053,9.3 -325.10267,1.8 -74.57626,-4.7 -136.4808,-3.8 -202.74773,-15.7 -12.04853,-2.1 -24.51253,-4.2 -37.392,-6 V 500.1 H 1130.9075 V 364.6 c -33.4451,3 -62.32,0.1 -97.0115,2.6 z" />
<g id="banner-christmas-trees" transform="scale(0.8) translate(550 -100)" style="filter: drop-shadow(0px 10px 10px rgba(0,86,118,0.2))">
<path id="banner-tree-4" fill="url(#tree-gradient)" d="M653.514,567.411c-9.173,0.507-18.854,1.525-27.516,3.304 c4.075-5.086,10.19-10.17,11.465-16.271c-6.882,1.526-14.776-0.253-16.817-7.115c7.898-3.812,14.269-10.423,19.62-17.285 c-2.294-0.254-4.332-1.271-6.626-1.526c2.294-4.319,6.881-8.134,10.447-12.456c-6.115-1.526-10.702-6.098-15.034-10.42 c7.136-2.29,14.525-4.069,22.166-3.812c-2.292-2.797-2.037-7.627-3.82-10.17c3.312,0.254,7.644-1.271,11.21-0.508 c4.587-13.474,14.522-29.23,24.712-39.4c-0.254,4.576,0,9.913,0.767,13.981c4.84-2.29,7.644-7.119,10.955-10.931 c0.255,2.032,1.275,4.322,1.783,6.354c3.82-0.761,37.705-13.727,23.949,2.797c6.878-4.322,20.638-29.741,30.573-26.437 c7.898,2.543,5.86,14.235,2.292,18.557c3.568,0.508,6.369,2.797,9.172,3.558c-1.274,0.508-2.803,0.764-3.82,1.271 c10.444,4.83,23.949,13.218,31.336,21.862c-5.095,0.508-10.444,0.761-15.285,2.54c7.645,4.068,18.089,7.118,26.75,7.88 c-7.133,0.507-14.011,3.051-19.363,7.373c6.881,4.065,16.051,5.844,23.949,7.88c-9.17,2.54-12.481,8.641-14.01,16.267 c4.328,8.134,12.993,7.626,17.322,14.742c-4.329,5.083-11.719,5.337-17.068,8.898c4.329,1.525,8.406,4.065,11.719,7.369 c-9.427,5.595-25.732,13.981-37.708,13.981c-8.661,0-9.937-4.322-17.58-5.591c-10.19-1.782-15.03,0.254-24.712,3.048 c-21.654,6.354-25.479,6.612-45.35,1.018c-7.39-2.033-23.694,0.253-26.752-3.812"/>
<path id="banner-tree-3" fill="url(#tree-gradient)" d="M519.755,571.983c-7.133,1.525-14.269,0.51-21.4,0 c4.329-6.609,10.189-12.199,14.522-18.808c-2.037,0.508-5.095-0.51-7.135-0.256c-0.509-7.877,6.369-15.25,8.918-22.623 c-5.095,1.271-10.189,2.543-15.288,2.29c11.468-14.235,26.244-30.249,30.319-49.06c-6.624,0-14.011,2.287-19.872,4.83 c8.407-9.913,24.712-27.96,27.516-41.434c-4.332,2.29-8.915,5.084-13.759,5.848c1.786-6.101,3.823-12.202,8.409-16.524 c-4.077,1.782-8.409,1.525-11.976,0.256c8.918-18.049,24.203-32.028,36.688-47.026c-2.803,1.017-5.857,0.764-8.66,1.271 c8.406-6.609,18.342-11.438,25.986-19.064c-3.566,11.692,26.752,26.437,32.355,36.603c-4.074-0.507-8.661-1.525-12.738-2.29 c6.369,9.659,12.484,23.133,16.308,34.064c-3.058-2.032-7.644-2.543-10.956-3.814c1.783,17.796,13.756,33.046,21.4,48.299 c-4.074,0.761-8.407,1.778-12.484,2.54c-4.075,11.695,10.447,28.216,14.779,39.654c-4.844-5.336-13.505-6.862-19.875-4.322 c5.096,13.22,14.269,28.216,21.146,41.179c-8.661-1.014-20.38-1.779-26.75,3.815c6.879,3.557,11.719,9.658,14.266,17.028 c-12.994,2.29-27.262,6.609-40.509,5.34c-16.051-1.525-30.319-11.695-45.861-16.524"/>
<path id="banner-tree-2" fill="url(#tree-gradient)" d="M547.781,570.714c-7.644-6.609-2.295-15-4.078-23.387 c-1.274-6.101-4.841-13.471-10.701-16.521c0.766-0.257,1.528-1.526,2.295-1.779c-2.295-1.525-8.919-3.561-9.428-6.354 c-0.254-1.018,0.764-3.051,0.764-3.051c-0.764-3.305-3.566-6.612-6.878-9.659c1.273-1.018,2.803-1.525,4.332-2.035 c-3.313-4.319-7.898-9.149-9.937-14.236c3.058-0.253,6.37,0,9.425,0c-3.566-6.097-9.682-11.945-15.539-16.014 c4.332-1.525,9.172-0.507,13.756-1.525c-5.096-5.083-9.17-13.471-11.974-20.08c3.058,0,6.878,0.254,10.447,0 c-3.058-5.594-7.644-11.692-12.484-16.014c2.546-0.253,5.095,0,7.641,0.761c-5.349-7.115-10.952-14.996-17.834-21.097 c-4.841-4.575-9.169-8.388-13.501-13.471c-4.332-5.086-10.702-9.916-14.522-14.999c-2.037-2.541-2.549-6.101-4.332-9.149 c-1.274-2.29-4.841-4.575-5.861-6.612c2.804,6.612,7.645,15.253-2.546,16.778c1.274,13.981-7.135,23.641-11.719,34.314 c-4.844,11.441-21.403,34.064-19.874,44.738c3.058-3.558,7.39-6.098,11.976-6.862c-2.04,11.438-7.135,23.64-9.173,34.825 c-0.508,2.286,0.764,6.354,0.255,9.405c-1.021,4.83-6.115,11.692-8.407,16.267c4.329-4.068,10.19-7.115,15.539-9.405 c-4.074,12.456-10.444,23.387-15.284,35.078c17.07,1.526-5.096,28.724-5.096,38.129c9.17,3.051,18.089-1.271,27.262-2.543 c15.284-2.287,29.044,2.036,44.074,2.797c13.76,0.764,22.166-5.337,34.905-6.355c9.682-1.014,18.088,5.337,27.261,0"/>
<path id="banner-tree-1" fill="url(#tree-gradient)" d="M-903.592,565.831c-7.643-6.61-2.293-14.999-4.076-23.385 c-1.275-6.101-4.841-13.475-10.7-16.523c0.764-0.509,1.529-1.524,2.293-1.781c-2.293-1.522-8.918-3.558-9.427-6.354 c-0.256-1.015,0.764-3.048,0.764-3.048c-0.764-3.307-3.312-6.612-6.879-9.658c1.274-1.018,2.803-1.526,4.332-2.036 c-3.313-4.319-7.898-9.152-9.938-14.235c3.058-0.253,6.37,0,9.427,0c-3.568-6.098-9.681-11.945-15.542-16.014 c4.332-1.526,9.172-0.508,13.759-1.526c-5.096-5.083-9.172-13.471-11.974-20.079c3.058,0,6.878,0.253,10.445,0 c-3.058-5.594-7.644-11.695-12.484-16.014c2.547-0.254,5.095,0,7.644,0.761c-5.351-7.116-10.956-14.997-17.835-21.098 c-4.841-4.575-9.171-8.387-13.502-13.47c-4.332-5.087-10.702-9.917-14.523-15c-2.038-2.54-2.548-6.101-4.331-9.152 c-1.274-2.286-4.84-4.572-5.859-6.608c2.802,6.608,7.643,15.252-2.549,16.778c1.274,13.981-7.132,23.64-11.719,34.314 c-4.841,11.44-21.401,34.063-19.873,44.737c3.058-3.557,7.389-6.097,11.975-6.862c-2.039,11.438-7.134,23.641-9.172,34.825 c-0.509,2.287,0.764,6.354,0.255,9.405c-1.02,4.83-6.115,11.692-8.408,16.269c4.332-4.069,10.191-7.117,15.542-9.406 c-4.077,12.455-10.446,23.387-15.287,35.079c17.069,1.524-5.097,28.723-5.097,38.129c9.173,3.05,18.09-1.272,27.261-2.543 c15.287-2.288,29.045,2.034,44.076,2.796c13.759,0.764,22.166-5.337,34.905-6.354c9.681-1.019,18.089,5.335,27.261,0"/>
</g>
<use href="#banner-christmas-trees" x="5" y="5" stroke="rgba(0,0,0,0.5)"/>
</g>
<g id="banner-halloween-stars" fill="white" style="opacity:0.8" transform="translate(-68.499999,25.761047)">
<g class="star1 star">
<circle cx="354.34659" cy="51.486233" />
<circle cx="686.33435" cy="100.34389" />
<circle cx="1428.2604" cy="121.01141" />
<circle cx="142.41147" cy="57.083103" />
<circle cx="624.15045" cy="52.292145" />
<circle cx="261.05768" cy="197.4662" />
<circle cx="1586.7877" cy="232.13432" />
<circle cx="1457.4095" cy="193.31587" />
<circle cx="193.29951" cy="26.420403" />
<circle cx="1025.8184" cy="177.29558" />
<circle cx="1205.6655" cy="107.11586" />
<circle cx="988.62946" cy="115.36874" />
<circle cx="1418.1691" cy="174.45583" />
<circle cx="617.49738" cy="57.193687" />
<circle cx="299.98047" cy="121.33453" />
<circle cx="90.674393" cy="-0.54514796" />
<circle cx="1075.5156" cy="36.469925" />
<circle cx="1455.9106" cy="180.05734" />
<circle cx="646.97412" cy="132.32523" />
<circle cx="704.60657" cy="18.466848" />
</g>
<g class="star2 star">
<circle cx="1406.1763" cy="-5.5104017" />
<circle cx="536.49463" cy="103.55247" />
<circle cx="351.08881" cy="143.94203" />
<circle cx="1279.1542" cy="18.840036" />
<circle cx="221.29961" cy="28.242449" />
<circle cx="1603.348" cy="115.4075" />
<circle cx="921.06372" cy="107.46529" />
<circle cx="137.43065" cy="111.68105" />
<circle cx="505.65485" cy="-6.3819265" />
<circle cx="1577.0615" cy="171.6333" />
<circle cx="906.78802" cy="-1.5375607" />
<circle cx="860.159" cy="72.191864" />
<circle cx="212.81689" cy="112.77587" />
<circle cx="1451.5607" cy="91.880829" />
<circle cx="1153.7001" cy="79.335007" />
<circle cx="1235.9001" cy="93.177391" />
<circle cx="125.44918" cy="203.72043" />
<circle cx="1467.8811" cy="141.55785" />
<circle cx="87.268814" cy="115.13907" />
<circle cx="420.64523" cy="9.8289289" />
<circle cx="1078.9646" cy="156.93616" />
</g>
<g class="star3 star">
<circle cx="861.69922" cy="59.167252" />
<circle cx="92.081718" cy="186.95992" />
<circle cx="492.38992" cy="92.957916" />
<circle cx="782.71057" cy="55.074757" />
<circle cx="1569.3516" cy="207.68919" />
<circle cx="1553.7762" cy="173.45573" />
<circle cx="366.2016" cy="98.177361" />
<circle cx="158.98877" cy="182.29086" />
<circle cx="1566.6627" cy="-2.7730622" />
<circle cx="1032.2488" cy="99.917984" />
<circle cx="1442.6716" cy="16.022043" />
<circle cx="849.01971" cy="232.44159" />
<circle cx="572.78674" cy="28.079025" />
<circle cx="1265.6924" cy="208.07133" />
<circle cx="1321.8163" cy="167.11555" />
<circle cx="1203.9926" cy="204.14101" />
<circle cx="1074.4159" cy="7.6153278" />
<circle cx="1390.5989" cy="93.045151" />
<circle cx="1490.332" cy="123.14182" />
<circle cx="1130.7302" cy="150.13852" />
</g>
<g class="star4 star">
<circle cx="1235.1261" cy="183.63806" />
<circle cx="941.27423" cy="28.98748" />
<circle cx="1565.119" cy="39.94997" />
<circle cx="1320.7312" cy="197.81389" />
<circle cx="1330.1912" cy="94.380714" />
<circle cx="1501.6204" cy="193.72606" />
<circle cx="100.52748" cy="27.732065" />
<circle cx="1326.5785" cy="153.80927" />
<circle cx="840.51929" cy="5.7146263" />
<circle cx="1507.1639" cy="88.637108" />
<circle cx="1252.4867" cy="189.86913" />
<circle cx="433.59921" cy="12.135095" />
<circle cx="995.14679" cy="86.594627" />
<circle cx="1352.5358" cy="54.43977" />
<circle cx="581.47766" cy="97.300217" />
<circle cx="622.31262" cy="202.93999" />
<circle cx="988.44" cy="136.42937" />
<circle cx="224.8391" cy="136.87054" />
<circle cx="190.67062" cy="23.389349" />
<circle cx="378.93933" cy="215.09964" />
</g>
<g class="star5 star">
<circle cx="415.39145" cy="91.883652" />
<circle cx="1611.5449" cy="42.999901" />
<circle cx="1584.6263" cy="126.31186" />
<circle cx="794.80231" cy="62.717503" />
<circle cx="1451.3389" cy="16.653343" />
<circle cx="554.16071" cy="71.499649" />
<circle cx="314.88879" cy="183.24821" />
<circle cx="645.84845" cy="-4.3557439" />
<circle cx="1192.1021" cy="58.766937" />
<circle cx="1371.4421" cy="2.2274418" />
<circle cx="618.45569" cy="167.10979" />
<circle cx="254.45935" cy="81.400383" />
<circle cx="1514.1248" cy="198.7796" />
<circle cx="1352.1172" cy="150.42014" />
<circle cx="1365.3644" cy="28.673313" />
<circle cx="912.87531" cy="98.27787" />
<circle cx="350.54874" cy="81.523178" />
<circle cx="441.39749" cy="30.191652" />
<circle cx="169.44328" cy="10.935395" />
</g>
<defs>
<style>
.star1 circle {r: 0.5;}
.star2 circle {r: 0.75;}
.star3 circle {r: 1.0;}
.star4 circle {r: 1.2;}
.star5 circle {r: 1.5;}
</style>
</defs>
</g>
<defs>
<!--gradients-->
<linearGradient id="house-fill-gradient" gradientUnits="userSpaceOnUse" x1="149.4008" y1="260.50101" x2="149.4008" y2="546.78699">
<stop offset="0" style="stop-color:#100000"/>
<stop offset="1" style="stop-color:#1823bd" id="house-fill-gradient-stop"/>
</linearGradient>
<radialGradient id="banner-halloween-house-window-gradient">
<stop offset="0" style="stop-color:#ffffff"/>
<stop offset="1" style="stop-color:#ffe19b"/>
</radialGradient>
<linearGradient id="ground-gradient" gradientUnits="userSpaceOnUse" x1="-52.2058" y1="310.2124" x2="-52.2058" y2="1011.9044" gradientTransform="matrix(0.816 0 0 -0.3937 -78.4925 761.4772)">
<stop offset="0.5" style="stop-color:#a7efff"/>
<stop offset="1" style="stop-color:#FFFFFF"/>
</linearGradient>
<linearGradient id="tree-gradient" gradientUnits="userSpaceOnUse" x1="-1095.1936" y1="578.2625" x2="-1095.1936" y2="842.7986" gradientTransform="matrix(0.8121 0 0 -0.8121 -80.1719 1054.2906)">
<stop offset="0" style="stop-color:#006A75"/>
<stop offset="0.5834" style="stop-color:#006A55"/>
<stop offset="1" style="stop-color:#005E48"/>
</linearGradient>
<linearGradient id="banner-halloween-skybox_1_" gradientUnits="userSpaceOnUse" x1="306.0005" y1="578.1084" x2="306.0005" y2="110.8926">
<stop offset="0.3978" style="stop-color:#defcff"/>
<stop offset="1" style="stop-color:#2c93ff"/>
</linearGradient>
<!--snow-->
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@ -11,7 +11,7 @@
0
</li>
<li>
{{daysTillChristmas()}}
{{days_till_christmas()}}
</li>
</ul>
</div>

View File

@ -22,9 +22,12 @@
<a class="sidebar-link" href="/log" data-bs-toggle="tooltip" data-bs-placement="top" title="Moderation Log"><i class="fas fa-scroll-old"></i></a>
<a class="sidebar-link" href="/transfers" data-bs-toggle="tooltip" data-bs-placement="top" title="Transfers"><i class="fas fa-arrow-right-arrow-left"></i></a>
<a class="sidebar-link" href="/random_post" data-bs-toggle="tooltip" data-bs-placement="top" title="Random Post"><i class="fas fa-random"></i></a>
<span class="sidebar-link" onclick="if(localStorage.getItem('setting_upsidedown')=='true'){localStorage.setItem('setting_upsidedown', 'false')}else{localStorage.setItem('setting_upsidedown', 'true')};location.reload()" style="display:inline" data-bs-toggle="tooltip" data-bs-placement="top" title="???"><i class="fas fa-trees"></i></span>
<span class="sidebar-link" onclick="postToastRoastEventDarkmode(this, '/event-darkmode'); location.reload()" style="display:inline" data-bs-toggle="tooltip" data-bs-placement="top"
title="Toggle Dark Mode"><i class="fas fa-moon-over-sun"></i></span>
</p>
<script src="{{'js/event/darkmode.js' | asset}}"></script>
{% if sub %}
{% if sub.sidebar_html %}
<div class="mb-4">{{sub.sidebar_html|safe}}</div>

View File

@ -160,6 +160,10 @@
{% if EVENT_STYLES %}
{% set EVENT_STYLES = 'css/event/'+EVENT_STYLES %}
<link rel="stylesheet" href="{{EVENT_STYLES | asset}}">
{% if v and user_event_darkmode(v, g.db)%}
<link rel="stylesheet" href="{{'css/event/themes/dark.css'| asset}}">
{% endif %}
{% endif %}
{% if request.path == '/chat' %}