WPD: add revolving banner selection.

master
Snakes 2022-09-29 14:08:36 -04:00
parent e52fc4eb9e
commit 60d6f8b20d
3 changed files with 12 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -295,6 +295,9 @@ elif SITE == 'watchpeopledie.co':
PERMS['HOLE_CREATE'] = 2
SIDEBAR_THREAD = 5403
BANNER_THREAD = 9869
HOLE_NAME = 'flair'
HOLE_STYLE_FLAIR = True
HOLE_REQUIRED = True
@ -310,7 +313,6 @@ elif SITE == 'watchpeopledie.co':
GIFT_NOTIF_ID = CARP_ID
SIDEBAR_THREAD = 5403
else: # localhost or testing environment implied
FEATURES['PRONOUNS'] = True
FEATURES['HOUSES'] = True

View File

@ -279,14 +279,16 @@
<img alt="site banner" src="{% if v %}{{image}}{% else %}{{'cached.webp' | asset_siteimg}}{% endif %}" width="100%">
{% endif %}
</a>
{% elif SITE_NAME == 'WPD' %}
{% if v %}
{% set path = "assets/images/" + SITE_NAME + "/banners" %}
{% set banner = "/" + path + "/" + listdir('files/' + path)|random() + '?v=1' %}
{% else %}
{% set banner = 'cached.webp' | asset_siteimg %}
{% endif %}
<img alt="site banner" src="{{banner}}" width="100%">
{% else %}
{% if SITE_NAME == 'WPD' %}
{% if v %}
{% set banner = 'banner.webp' | asset_siteimg %}
{% else %}
{% set banner = 'cached.webp' | asset_siteimg %}
{% endif %}
{% elif SITE_NAME == 'PCM' %}
{% if SITE_NAME == 'PCM' %}
{% set banner = 'banners/great-value-v2.webp' | asset_siteimg %}
{% else %}
{% set banner = 'banner.webp' | asset_siteimg %}