LGB: Add directory.

master
Snakes 2022-07-09 06:38:45 -04:00
parent fde2d5ca11
commit bf386fa9fe
4 changed files with 51 additions and 5 deletions

View File

@ -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')

View File

@ -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 %}
<div id="directory--wrapper">

View File

@ -29,6 +29,10 @@
{% endif %}
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/mods">{{HOLE_NAME|upper}} MODS</a>
{% endif %}
<a id="sidebar--directory--btn" class="btn btn-primary btn-block mb-3" href="/directory">
<span id="sidebar--directory--head">DIRECTORY</span>
<span id="sidebar--directory--subhead">Resources | Site Help | Megathreads</span>
</a>
<div id="sidebar--rules">
<h3 id="sidebar--rules--head">Rules</h3>

View File

@ -1,6 +1,6 @@
{%-
set CACHE_VER = {
'css/main.css': 382,
'css/main.css': 383,
'css/4chan.css': 61,
'css/classic.css': 61,