mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Website Style Upgrade (#353)
* [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets * Landing Page Updates * Markdown updates, colors coming later * Remove testing theme from FF1 * Color updates for markdown styles * Updates to generated pages, so many updates * [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets * Landing Page Updates * Markdown updates, colors coming later * Remove testing theme from FF1 * Color updates for markdown styles * Updates to generated pages, so many updates * Seed download page improvements * Add styles to weighted-settings page * Minor adjustments to styles * Revert base theme to grass * Add more items to ArchipIDLE * [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets * Landing Page Updates * Markdown updates, colors coming later * Remove testing theme from FF1 * Color updates for markdown styles * Updates to generated pages, so many updates * Seed download page improvements * [WebHost] Update WebHost to include modular themes system, remove unused and outdated assets * Landing Page Updates * Markdown updates, colors coming later * Remove testing theme from FF1 * Color updates for markdown styles * Updates to generated pages, so many updates * Add styles to weighted-settings page * Minor adjustments to styles * Revert base theme to grass * Add more items to ArchipIDLE * Improve Archipidle item name * [WebHost] Update background images, waiting on jungle.png, added partyTime theme * [WebHost] Fix tab ordering on landing page, remove islands on screen scale, fix tutorial page width scaling * [WebHost] Final touches to WebHost * Improve get_world_theme function, add partyTime theme to ArchipIDLE WebWorld * Remove sending_visible from AutoWorld * AP Ocarina of Time Client (#352) * Core: update jinja (#351) * some typing and cleaning, mostly in Fill.py (#349) * some typing and cleaning, mostly in Fill.py * address missing Option types * resolve a few TODOs discussed in pull request * SM: Optimize a bit (#350) * SM: Optimize a bit * SM: init bosses only once * New World Order (#355) * Core: update jinja * SM: Optimize a bit * AutoWorld: import worlds in alphabetical order, to be predictable rather than arbitrary Co-authored-by: Hussein Farran <hmfarran@gmail.com> * Remove references to Z5Client in English OoT setup guide * Prevent markdown code blocks from overflowing their container Co-authored-by: espeon65536 <81029175+espeon65536@users.noreply.github.com> Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com> Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com> Co-authored-by: Hussein Farran <hmfarran@gmail.com>
This commit is contained in:
@@ -70,6 +70,12 @@ app.url_map.converters["suuid"] = B64UUIDConverter
|
||||
app.jinja_env.filters['suuid'] = lambda value: base64.urlsafe_b64encode(value.bytes).rstrip(b'=').decode('ascii')
|
||||
|
||||
|
||||
def get_world_theme(game_name: str):
|
||||
if game_name in AutoWorldRegister.world_types:
|
||||
return AutoWorldRegister.world_types[game_name].web.theme
|
||||
return 'grass'
|
||||
|
||||
|
||||
@app.before_request
|
||||
def register_session():
|
||||
session.permanent = True # technically 31 days after the last visit
|
||||
@@ -97,13 +103,13 @@ def weighted_settings():
|
||||
# Player settings pages
|
||||
@app.route('/games/<string:game>/player-settings')
|
||||
def player_settings(game):
|
||||
return render_template(f"player-settings.html", game=game)
|
||||
return render_template(f"player-settings.html", game=game, theme=get_world_theme(game))
|
||||
|
||||
|
||||
# Game Info Pages
|
||||
@app.route('/games/<string:game>/info/<string:lang>')
|
||||
def game_info(game, lang):
|
||||
return render_template('gameInfo.html', game=game, lang=lang)
|
||||
return render_template('gameInfo.html', game=game, lang=lang, theme=get_world_theme(game))
|
||||
|
||||
|
||||
# List of supported games
|
||||
@@ -118,7 +124,7 @@ def games():
|
||||
|
||||
@app.route('/tutorial/<string:game>/<string:file>/<string:lang>')
|
||||
def tutorial(game, file, lang):
|
||||
return render_template("tutorial.html", game=game, file=file, lang=lang)
|
||||
return render_template("tutorial.html", game=game, file=file, lang=lang, theme=get_world_theme(game))
|
||||
|
||||
|
||||
@app.route('/tutorial/')
|
||||
|
Reference in New Issue
Block a user