pull/143/head
Aevann 2023-04-25 17:30:44 +02:00
parent 16766981bc
commit 78fd7463d5
28 changed files with 41 additions and 25 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -4,23 +4,6 @@ from os import environ, path
import tldextract
import datetime
t = datetime.datetime.now()
fistmas_begin = datetime.datetime.strptime(f'1/12/{t.year}', '%d/%m/%Y')
fistmas_end = datetime.datetime.strptime(f'30/12/{t.year}', '%d/%m/%Y')
def IS_FISTMAS():
return fistmas_begin < datetime.datetime.now() < fistmas_end
homoween_begin = datetime.datetime.strptime(f'15/10/{t.year}', '%d/%m/%Y')
homoween_end = datetime.datetime.strptime(f'1/11/{t.year}', '%d/%m/%Y')
def IS_HOMOWEEN():
return homoween_begin < datetime.datetime.now() < homoween_end
dkd_begin = datetime.datetime.strptime(f'25/4/{t.year}', '%d/%m/%Y')
dkd_end = datetime.datetime.strptime(f'2/5/{t.year}', '%d/%m/%Y')
def IS_DKD():
return SITE_NAME == 'rDrama' and dkd_begin < datetime.datetime.now() < dkd_end
DEFAULT_TIME_FILTER = "all"
DEFAULT_THEME = "midnight"
DEFAULT_COLOR = "805ad5"
@ -1093,3 +1076,30 @@ else:
STARS = '\n\n★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★\n\n'
EMOJI_KINDS = ("Marsey", "Platy", "Wolf", "Tay", "Donkey Kong", "Marsey Flags", "Marsey Alphabet", "Classic", "Rage", "Wojak", "Misc")
t = datetime.datetime.now()
fistmas_begin = datetime.datetime.strptime(f'1/12/{t.year}', '%d/%m/%Y')
fistmas_end = datetime.datetime.strptime(f'30/12/{t.year}', '%d/%m/%Y')
def IS_FISTMAS():
return fistmas_begin < datetime.datetime.now() < fistmas_end
homoween_begin = datetime.datetime.strptime(f'15/10/{t.year}', '%d/%m/%Y')
homoween_end = datetime.datetime.strptime(f'1/11/{t.year}', '%d/%m/%Y')
def IS_HOMOWEEN():
return homoween_begin < datetime.datetime.now() < homoween_end
dkd_begin = datetime.datetime.strptime(f'25/4/{t.year}', '%d/%m/%Y')
dkd_end = datetime.datetime.strptime(f'2/5/{t.year}', '%d/%m/%Y')
def IS_DKD():
return SITE_NAME == 'rDrama' and dkd_begin < datetime.datetime.now() < dkd_end
if SITE_NAME == 'rDrama':
birthgay_begin = datetime.datetime.strptime(f'20/5/{t.year}', '%d/%m/%Y')
birthgay_end = datetime.datetime.strptime(f'21/5/{t.year}', '%d/%m/%Y')
else:
birthgay_begin = datetime.datetime.strptime(f'26/4/{t.year}', '%d/%m/%Y')
birthgay_end = datetime.datetime.strptime(f'27/5/{t.year}', '%d/%m/%Y')
def IS_BIRTHGAY():
return birthgay_begin < datetime.datetime.now() < birthgay_end

View File

@ -137,5 +137,5 @@ def inject_constants():
"git_head":git_head, "max_days":max_days, "EMOJI_KINDS":EMOJI_KINDS,
"BIO_FRIENDS_ENEMIES_LENGTH_LIMIT":BIO_FRIENDS_ENEMIES_LENGTH_LIMIT,
"IMMUNE_TO_AWARDS": IMMUNE_TO_AWARDS, "SITE_FULL_IMAGES": SITE_FULL_IMAGES,
"IS_FISTMAS":IS_FISTMAS, "IS_HOMOWEEN":IS_HOMOWEEN, "IS_DKD":IS_DKD
"IS_FISTMAS":IS_FISTMAS, "IS_HOMOWEEN":IS_HOMOWEEN, "IS_DKD":IS_DKD, "IS_BIRTHGAY":IS_BIRTHGAY,
}

View File

@ -88,7 +88,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
if SITE_NAME == 'WPD':
coin_mult *= 2
if IS_FISTMAS() or IS_HOMOWEEN() or IS_DKD():
if IS_FISTMAS() or IS_HOMOWEEN() or IS_DKD() or IS_BIRTHGAY():
coin_mult *= 2
coin_value = coin_delta * coin_mult

View File

@ -7,7 +7,9 @@
{% if IS_FISTMAS() and not sub %}
{% include 'fistmas/banner.html' %}
{% else %}
{% if IS_DKD() and not sub %}
{% if IS_BIRTHGAY() and not sub %}
{% set src = macros.random_image("assets/birthgay/images/banners/" ~ SITE_NAME) %}
{% elif IS_DKD() and not sub %}
{% set src = macros.random_image("assets/DKD/images/banners") %}
{% elif err and SITE_NAME == 'rDrama' %}
{% set src = "banner_error.webp" | asset_siteimg %}

View File

@ -6,15 +6,17 @@
</h5>
</a>
{%- if v -%}
{%- set art_image = macros.random_image("assets/images/" ~ SITE_NAME ~ "/sidebar") -%}
{%- if IS_BIRTHGAY() -%}
{% set image = macros.random_image("assets/birthgay/images/sidebar/" ~ SITE_NAME) %}
{%- elif v -%}
{%- set image = macros.random_image("assets/images/" ~ SITE_NAME ~ "/sidebar") -%}
{%- else -%}
{%- set art_image = '/i/' ~ SITE_NAME ~ '/sidebar.webp?x=1' -%}
{%- set image = '/i/' ~ SITE_NAME ~ '/sidebar.webp?x=1' -%}
{%- endif -%}
{% if request.path != '/sidebar' %}
<a href="{{art_image}}">
<img class="mb-4" alt="sidebar image" data-nonce="{{g.nonce}}" data-onclick="expandImage()" loading="lazy" src="{{art_image}}" width=100%>
<a href="{{image}}">
<img class="mb-4" alt="sidebar image" data-nonce="{{g.nonce}}" data-onclick="expandImage()" loading="lazy" src="{{image}}" width=100%>
</a>
{% endif %}

View File

@ -8,6 +8,8 @@
{% if sub %}
{% set image=sub.sidebar_url %}
{% elif IS_BIRTHGAY() %}
{% set image = macros.random_image("assets/birthgay/images/sidebar/" ~ SITE_NAME) %}
{% elif IS_DKD() %}
{% set image = macros.random_image("assets/DKD/images/sidebar") %}
{% elif IS_FISTMAS() %}