From fde2d5ca11458a7eef6d628c9fac0b8e6a29e4c1 Mon Sep 17 00:00:00 2001 From: TLSM Date: Sat, 9 Jul 2022 06:09:33 -0400 Subject: [PATCH 1/4] LGB: Use static default pfp. --- files/helpers/const.py | 36 ++++++++++++++++++++---------------- files/routes/login.py | 4 +++- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 2ee72c36a1..c266d42c02 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -139,12 +139,6 @@ AGENDAPOSTER_MSG_HTML = """

Hi Date: Sat, 9 Jul 2022 06:38:45 -0400 Subject: [PATCH 2/4] LGB: Add directory. --- files/__main__.py | 1 + files/templates/megathread_index.html | 49 ++++++++++++++++++++++-- files/templates/sidebar_LGBDropTheT.html | 4 ++ files/templates/util/assetcache.html | 2 +- 4 files changed, 51 insertions(+), 5 deletions(-) diff --git a/files/__main__.py b/files/__main__.py index 03ec28833e..298625f508 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -21,6 +21,7 @@ app = Flask(__name__, template_folder='templates') app.url_map.strict_slashes = False app.jinja_env.cache = {} app.jinja_env.auto_reload = True +app.jinja_env.add_extension('jinja2.ext.do') faulthandler.enable() app.config['SECRET_KEY'] = environ.get('MASTER_KEY') diff --git a/files/templates/megathread_index.html b/files/templates/megathread_index.html index 40132e3bcc..7ca31794e4 100644 --- a/files/templates/megathread_index.html +++ b/files/templates/megathread_index.html @@ -2,8 +2,10 @@ {# Title (~25char max), Description (~80char max), Icon (fa-foo-bar), Color (#ff0000), URL (/post/12345/) #} -{%- -set MEGATHREAD_INDEX = [ +{%- set MEGATHREAD_INDEX = [] -%} + +{%- if SITE_NAME == 'rDrama' -%} +{%- do MEGATHREAD_INDEX.extend([ ( 'Bugs / Suggestions', 'Something broken? Improvements?', @@ -46,8 +48,47 @@ set MEGATHREAD_INDEX = [ 'fa-dice-six', '#c9d1d9', '/post/39413', ), -] --%} +])-%} +{%- elif SITE_NAME == 'LGBDropTheT' -%} +{%- do MEGATHREAD_INDEX.extend([ + ( + 'Rules & FAQs', + 'Commonly-Asked Questions', + 'fa-circle-info', '#4bc2ea', + '/kb/rulesfaqs', + ), + ( + 'Help & Support', + 'User Guides, Suggestions, Tech Issues', + 'fa-comment-question', '#70e572', + '/h/help_and_support', + ), + ( + 'Resources & Organizations', + 'LGB and "Drop The T" Support', + 'fa-sitemap', '#4bc2ea', + '/kb/resourcesorgs', + ), + ( + 'Artwork & Design Suggestions', + 'Emotes, Icons, Banners, and More', + 'fa-panorama', '#e9ef2f', + '/h/off_topic_social/post/40/artwork-design-suggestions-megathread', + ), + ( + 'Banned From / Censorship', + 'Megathread: Share Your Woes & Commiserate', + 'fa-ban', '#ed3d2d', + '/post/27/banned-from-and-censorship-megathread', + ), + ( + 'Gambling Mega-Thread', + 'Goomble without bothering people.', + 'fa-dice-six', '#c9d1d9', + '/h/off_topic_social/post/25/gambling-megathread', + ), +])-%} +{%- endif -%} {% block content %}

diff --git a/files/templates/sidebar_LGBDropTheT.html b/files/templates/sidebar_LGBDropTheT.html index ac939592d4..d32c12d1de 100644 --- a/files/templates/sidebar_LGBDropTheT.html +++ b/files/templates/sidebar_LGBDropTheT.html @@ -29,6 +29,10 @@ {% endif %} {{HOLE_NAME|upper}} MODS {% endif %} + + DIRECTORY + Resources | Site Help | Megathreads +