From e4f4c1f1be6193af8c12cafdbce8716abae26bd7 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 11 Oct 2021 20:52:30 -0400 Subject: [PATCH] Add Start Playing page, clean up /generate page --- WebHostLib/__init__.py | 6 ++ WebHostLib/static/styles/generate.css | 15 +++++ WebHostLib/static/styles/startPlaying.css | 18 +++++ WebHostLib/templates/generate.html | 74 +++++++++++++-------- WebHostLib/templates/header/baseHeader.html | 2 +- WebHostLib/templates/landing.html | 2 +- WebHostLib/templates/startPlaying.html | 35 ++++++++++ 7 files changed, 123 insertions(+), 29 deletions(-) create mode 100644 WebHostLib/static/styles/startPlaying.css create mode 100644 WebHostLib/templates/startPlaying.html diff --git a/WebHostLib/__init__.py b/WebHostLib/__init__.py index b42f55d9..6463540e 100644 --- a/WebHostLib/__init__.py +++ b/WebHostLib/__init__.py @@ -82,6 +82,12 @@ def page_not_found(err): return render_template('404.html'), 404 +# Start Playing Page +@app.route('/start-playing') +def start_playing(): + return render_template(f"startPlaying.html") + + # Player settings pages @app.route('/games//player-settings') def player_settings(game): diff --git a/WebHostLib/static/styles/generate.css b/WebHostLib/static/styles/generate.css index 676865c0..e0b3f5ec 100644 --- a/WebHostLib/static/styles/generate.css +++ b/WebHostLib/static/styles/generate.css @@ -25,6 +25,21 @@ margin-bottom: 1rem; } +#generate-game-form-wrapper table td{ + text-align: left; + padding-right: 0.5rem; +} + +#generate-form-button-row{ + display: flex; + flex-direction: row; + justify-content: center; +} + #file-input{ display: none; } + +.interactive{ + color: #ffef00; +} diff --git a/WebHostLib/static/styles/startPlaying.css b/WebHostLib/static/styles/startPlaying.css new file mode 100644 index 00000000..c13468fc --- /dev/null +++ b/WebHostLib/static/styles/startPlaying.css @@ -0,0 +1,18 @@ +#start-playing-wrapper{ + display: flex; + flex-direction: row; + justify-content: center; + flex-wrap: wrap; +} + +#start-playing{ + width: 700px; + min-height: 240px; + text-align: center; +} + +#start-playing-button-row{ + display: flex; + flex-direction: row; + justify-content: space-evenly; +} diff --git a/WebHostLib/templates/generate.html b/WebHostLib/templates/generate.html index 57bc25f8..a1a18115 100644 --- a/WebHostLib/templates/generate.html +++ b/WebHostLib/templates/generate.html @@ -11,12 +11,11 @@ {% include 'header/oceanHeader.html' %}
-

Upload Config{% if race %} (Race Mode){% endif %}

+

Generate Game{% if race %} (Race Mode){% endif %}

- This page allows you to generate a game by uploading a yaml file or a zip file containing yaml files. - If you do not have a config (yaml) file yet, you may create one on the game's settings page, - which you can find via the - Game List. + This page allows you to generate a game by uploading a config file or a zip file containing config + files. If you do not have a config (.yaml) file yet, you may create one on the game's settings page, + which you can find via the supported games list.

{% if race -%} @@ -24,33 +23,54 @@ roms will be encrypted, and single-player games will have no multidata files. {%- else -%} If you would like to generate a race game, - click here. Race games are generated without - a spoiler log, the ROMs are encrypted, and single-player games will not include a multidata file. + click here.
+ Race games are generated without a spoiler log, the ROMs are encrypted, and single-player games + will not include a multidata file. {%- endif -%}

-

- After generation is complete, you will have the option to download a patch file. - This patch file can be opened with the - client, which can be - used to to create a rom file. In-browser patching is planned for the future. -

- - - + + + + + + + + + + + + +
+ +
+ + (?) + + + +
+
+ +
- +
diff --git a/WebHostLib/templates/header/baseHeader.html b/WebHostLib/templates/header/baseHeader.html index dfe42e51..eb8a86a0 100644 --- a/WebHostLib/templates/header/baseHeader.html +++ b/WebHostLib/templates/header/baseHeader.html @@ -13,7 +13,7 @@ diff --git a/WebHostLib/templates/landing.html b/WebHostLib/templates/landing.html index ec187dad..28430239 100644 --- a/WebHostLib/templates/landing.html +++ b/WebHostLib/templates/landing.html @@ -13,7 +13,7 @@

multiworld multi-game randomizer