birthgay
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 262 KiB |
After Width: | Height: | Size: 645 KiB |
After Width: | Height: | Size: 599 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 48 KiB |
|
@ -4,23 +4,6 @@ from os import environ, path
|
||||||
import tldextract
|
import tldextract
|
||||||
import datetime
|
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_TIME_FILTER = "all"
|
||||||
DEFAULT_THEME = "midnight"
|
DEFAULT_THEME = "midnight"
|
||||||
DEFAULT_COLOR = "805ad5"
|
DEFAULT_COLOR = "805ad5"
|
||||||
|
@ -1093,3 +1076,30 @@ else:
|
||||||
STARS = '\n\n★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★\n\n'
|
STARS = '\n\n★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★\n\n'
|
||||||
|
|
||||||
EMOJI_KINDS = ("Marsey", "Platy", "Wolf", "Tay", "Donkey Kong", "Marsey Flags", "Marsey Alphabet", "Classic", "Rage", "Wojak", "Misc")
|
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
|
||||||
|
|
|
@ -137,5 +137,5 @@ def inject_constants():
|
||||||
"git_head":git_head, "max_days":max_days, "EMOJI_KINDS":EMOJI_KINDS,
|
"git_head":git_head, "max_days":max_days, "EMOJI_KINDS":EMOJI_KINDS,
|
||||||
"BIO_FRIENDS_ENEMIES_LENGTH_LIMIT":BIO_FRIENDS_ENEMIES_LENGTH_LIMIT,
|
"BIO_FRIENDS_ENEMIES_LENGTH_LIMIT":BIO_FRIENDS_ENEMIES_LENGTH_LIMIT,
|
||||||
"IMMUNE_TO_AWARDS": IMMUNE_TO_AWARDS, "SITE_FULL_IMAGES": SITE_FULL_IMAGES,
|
"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,
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
|
||||||
if SITE_NAME == 'WPD':
|
if SITE_NAME == 'WPD':
|
||||||
coin_mult *= 2
|
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_mult *= 2
|
||||||
|
|
||||||
coin_value = coin_delta * coin_mult
|
coin_value = coin_delta * coin_mult
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
{% if IS_FISTMAS() and not sub %}
|
{% if IS_FISTMAS() and not sub %}
|
||||||
{% include 'fistmas/banner.html' %}
|
{% include 'fistmas/banner.html' %}
|
||||||
{% else %}
|
{% 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") %}
|
{% set src = macros.random_image("assets/DKD/images/banners") %}
|
||||||
{% elif err and SITE_NAME == 'rDrama' %}
|
{% elif err and SITE_NAME == 'rDrama' %}
|
||||||
{% set src = "banner_error.webp" | asset_siteimg %}
|
{% set src = "banner_error.webp" | asset_siteimg %}
|
||||||
|
|
|
@ -6,15 +6,17 @@
|
||||||
</h5>
|
</h5>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{%- if v -%}
|
{%- if IS_BIRTHGAY() -%}
|
||||||
{%- set art_image = macros.random_image("assets/images/" ~ SITE_NAME ~ "/sidebar") -%}
|
{% set image = macros.random_image("assets/birthgay/images/sidebar/" ~ SITE_NAME) %}
|
||||||
|
{%- elif v -%}
|
||||||
|
{%- set image = macros.random_image("assets/images/" ~ SITE_NAME ~ "/sidebar") -%}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{%- set art_image = '/i/' ~ SITE_NAME ~ '/sidebar.webp?x=1' -%}
|
{%- set image = '/i/' ~ SITE_NAME ~ '/sidebar.webp?x=1' -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{% if request.path != '/sidebar' %}
|
{% if request.path != '/sidebar' %}
|
||||||
<a href="{{art_image}}">
|
<a href="{{image}}">
|
||||||
<img class="mb-4" alt="sidebar image" data-nonce="{{g.nonce}}" data-onclick="expandImage()" loading="lazy" src="{{art_image}}" width=100%>
|
<img class="mb-4" alt="sidebar image" data-nonce="{{g.nonce}}" data-onclick="expandImage()" loading="lazy" src="{{image}}" width=100%>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
{% if sub %}
|
{% if sub %}
|
||||||
{% set image=sub.sidebar_url %}
|
{% set image=sub.sidebar_url %}
|
||||||
|
{% elif IS_BIRTHGAY() %}
|
||||||
|
{% set image = macros.random_image("assets/birthgay/images/sidebar/" ~ SITE_NAME) %}
|
||||||
{% elif IS_DKD() %}
|
{% elif IS_DKD() %}
|
||||||
{% set image = macros.random_image("assets/DKD/images/sidebar") %}
|
{% set image = macros.random_image("assets/DKD/images/sidebar") %}
|
||||||
{% elif IS_FISTMAS() %}
|
{% elif IS_FISTMAS() %}
|
||||||
|
|