diff --git a/files/__main__.py b/files/__main__.py index 03ec28833..298625f50 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 40132e3bc..7ca31794e 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 ac939592d..d32c12d1d 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 +