WebHost: provide a landing page
This commit is contained in:
parent
11405f4b19
commit
fc76698997
|
@ -137,4 +137,4 @@ def host_room(room: UUID):
|
|||
|
||||
|
||||
from WebHost.customserver import run_server_process
|
||||
from . import tracker, upload # to trigger app routing picking up on it
|
||||
from . import tracker, upload, landing # to trigger app routing picking up on it
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
from flask import render_template
|
||||
from WebHost import app, cache
|
||||
|
||||
|
||||
@cache.memoize(timeout=300)
|
||||
@app.route('/', methods=['GET', 'POST'])
|
||||
def landing():
|
||||
return render_template("landing.html")
|
|
@ -1,140 +0,0 @@
|
|||
{
|
||||
"11": "Bow",
|
||||
"100": "Progressive Bow",
|
||||
"101": "Progressive Bow (Alt)",
|
||||
"29": "Book of Mudora",
|
||||
"9": "Hammer",
|
||||
"10": "Hookshot",
|
||||
"26": "Magic Mirror",
|
||||
"20": "Flute",
|
||||
"75": "Pegasus Boots",
|
||||
"27": "Power Glove",
|
||||
"25": "Cape",
|
||||
"41": "Mushroom",
|
||||
"19": "Shovel",
|
||||
"18": "Lamp",
|
||||
"13": "Magic Powder",
|
||||
"31": "Moon Pearl",
|
||||
"21": "Cane of Somaria",
|
||||
"7": "Fire Rod",
|
||||
"30": "Flippers",
|
||||
"8": "Ice Rod",
|
||||
"28": "Titans Mitts",
|
||||
"15": "Bombos",
|
||||
"16": "Ether",
|
||||
"17": "Quake",
|
||||
"22": "Bottle",
|
||||
"43": "Bottle (Red Potion)",
|
||||
"44": "Bottle (Green Potion)",
|
||||
"45": "Bottle (Blue Potion)",
|
||||
"61": "Bottle (Fairy)",
|
||||
"60": "Bottle (Bee)",
|
||||
"72": "Bottle (Good Bee)",
|
||||
"80": "Master Sword",
|
||||
"2": "Tempered Sword",
|
||||
"73": "Fighter Sword",
|
||||
"3": "Golden Sword",
|
||||
"94": "Progressive Sword",
|
||||
"97": "Progressive Glove",
|
||||
"88": "Silver Arrows",
|
||||
"106": "Triforce",
|
||||
"107": "Power Star",
|
||||
"108": "Triforce Piece",
|
||||
"67": "Single Arrow",
|
||||
"68": "Arrows (10)",
|
||||
"84": "Arrow Upgrade (+10)",
|
||||
"83": "Arrow Upgrade (+5)",
|
||||
"39": "Single Bomb",
|
||||
"40": "Bombs (3)",
|
||||
"49": "Bombs (10)",
|
||||
"82": "Bomb Upgrade (+10)",
|
||||
"81": "Bomb Upgrade (+5)",
|
||||
"34": "Blue Mail",
|
||||
"35": "Red Mail",
|
||||
"96": "Progressive Armor",
|
||||
"12": "Blue Boomerang",
|
||||
"42": "Red Boomerang",
|
||||
"4": "Blue Shield",
|
||||
"5": "Red Shield",
|
||||
"6": "Mirror Shield",
|
||||
"95": "Progressive Shield",
|
||||
"33": "Bug Catching Net",
|
||||
"24": "Cane of Byrna",
|
||||
"62": "Boss Heart Container",
|
||||
"63": "Sanctuary Heart Container",
|
||||
"23": "Piece of Heart",
|
||||
"52": "Rupee (1)",
|
||||
"53": "Rupees (5)",
|
||||
"54": "Rupees (20)",
|
||||
"65": "Rupees (50)",
|
||||
"64": "Rupees (100)",
|
||||
"70": "Rupees (300)",
|
||||
"89": "Rupoor",
|
||||
"91": "Red Clock",
|
||||
"92": "Blue Clock",
|
||||
"93": "Green Clock",
|
||||
"98": "Single RNG",
|
||||
"99": "Multi RNG",
|
||||
"78": "Magic Upgrade (1/2)",
|
||||
"79": "Magic Upgrade (1/4)",
|
||||
"162": "Small Key (Eastern Palace)",
|
||||
"157": "Big Key (Eastern Palace)",
|
||||
"141": "Compass (Eastern Palace)",
|
||||
"125": "Map (Eastern Palace)",
|
||||
"163": "Small Key (Desert Palace)",
|
||||
"156": "Big Key (Desert Palace)",
|
||||
"140": "Compass (Desert Palace)",
|
||||
"124": "Map (Desert Palace)",
|
||||
"170": "Small Key (Tower of Hera)",
|
||||
"149": "Big Key (Tower of Hera)",
|
||||
"133": "Compass (Tower of Hera)",
|
||||
"117": "Map (Tower of Hera)",
|
||||
"160": "Small Key (Hyrule Castle)",
|
||||
"159": "Big Key (Hyrule Castle)",
|
||||
"143": "Compass (Hyrule Castle)",
|
||||
"127": "Map (Hyrule Castle)",
|
||||
"164": "Small Key (Agahnims Tower)",
|
||||
"155": "Big Key (Agahnims Tower)",
|
||||
"139": "Compass (Agahnims Tower)",
|
||||
"123": "Map (Agahnims Tower)",
|
||||
"166": "Small Key (Palace of Darkness)",
|
||||
"153": "Big Key (Palace of Darkness)",
|
||||
"137": "Compass (Palace of Darkness)",
|
||||
"121": "Map (Palace of Darkness)",
|
||||
"171": "Small Key (Thieves Town)",
|
||||
"148": "Big Key (Thieves Town)",
|
||||
"132": "Compass (Thieves Town)",
|
||||
"116": "Map (Thieves Town)",
|
||||
"168": "Small Key (Skull Woods)",
|
||||
"151": "Big Key (Skull Woods)",
|
||||
"135": "Compass (Skull Woods)",
|
||||
"119": "Map (Skull Woods)",
|
||||
"165": "Small Key (Swamp Palace)",
|
||||
"154": "Big Key (Swamp Palace)",
|
||||
"138": "Compass (Swamp Palace)",
|
||||
"122": "Map (Swamp Palace)",
|
||||
"169": "Small Key (Ice Palace)",
|
||||
"150": "Big Key (Ice Palace)",
|
||||
"134": "Compass (Ice Palace)",
|
||||
"118": "Map (Ice Palace)",
|
||||
"167": "Small Key (Misery Mire)",
|
||||
"152": "Big Key (Misery Mire)",
|
||||
"136": "Compass (Misery Mire)",
|
||||
"120": "Map (Misery Mire)",
|
||||
"172": "Small Key (Turtle Rock)",
|
||||
"147": "Big Key (Turtle Rock)",
|
||||
"131": "Compass (Turtle Rock)",
|
||||
"115": "Map (Turtle Rock)",
|
||||
"173": "Small Key (Ganons Tower)",
|
||||
"146": "Big Key (Ganons Tower)",
|
||||
"130": "Compass (Ganons Tower)",
|
||||
"114": "Map (Ganons Tower)",
|
||||
"175": "Small Key (Universal)",
|
||||
"90": "Nothing",
|
||||
"176": "Bee Trap",
|
||||
"46": "Red Potion",
|
||||
"47": "Green Potion",
|
||||
"48": "Blue Potion",
|
||||
"14": "Bee",
|
||||
"66": "Small Heart"
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
{% extends 'layout.html' %}
|
||||
{% block head %}
|
||||
<title>Berserker's Multiworld</title>
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<nav class="navbar navbar-dark bg-dark navbar-expand-sm">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for("uploads") }}">Start a Group</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for("uploads") }}">Upload a Multiworld</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for("uploads") }}">Your Content</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<br>
|
||||
<div class="container container-fluid">
|
||||
<div class="jumbotron jumbotron-fluid">
|
||||
<div class="container">
|
||||
<div class="col-md-5 p-lg-2 mx-auto my-2">
|
||||
<h1 class="text-center display-4 font-weight-normal">Berserker's Multiworld</h1>
|
||||
<p class="text-center lead font-weight-normal"><a
|
||||
href="https://github.com/Berserker66/MultiWorld-Utilities">Source Code</a>
|
||||
- <a href="https://github.com/Berserker66/MultiWorld-Utilities/wiki">Wiki</a>
|
||||
-
|
||||
<a href="https://github.com/Berserker66/MultiWorld-Utilities/graphs/contributors">Contributors</a>
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="lead">This is randomizer for The Legend of Zelda: A Link to the Past.</p>
|
||||
<p class="lead">It is a multiworld, meaning items get shuffled across multiple players' worlds
|
||||
which get exchanged on pickup through the internet.</p>
|
||||
<p class="lead">This website allows hosting such a Multiworld and comes with an item and location
|
||||
tracker.</p>
|
||||
<p class="lead">Currently you still require a locally installed client to play, that handles
|
||||
connecting to the server and patching a vanilla game to the randomized one. Get started on the
|
||||
<a href="https://github.com/Berserker66/MultiWorld-Utilities/wiki">Wiki</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
|
@ -8,14 +8,19 @@
|
|||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div class=".container-fluid">
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-danger" role="alert">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<div class=".container-fluid">
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-danger" role="alert">{{ message }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% block body %}{% endblock %}
|
||||
|
||||
<br> {# spacing for notice #}
|
||||
<footer class="page-footer" style="position: fixed; left: 0; bottom: 0; width: 100%; text-align: center">
|
||||
<div class="container">
|
||||
|
|
|
@ -15,8 +15,8 @@ accepted_zip_contents = {"patches": ".bmbp",
|
|||
banned_zip_contents = (".sfc",)
|
||||
|
||||
|
||||
@app.route('/', methods=['GET', 'POST'])
|
||||
def upload_game():
|
||||
@app.route('/uploads', methods=['GET', 'POST'])
|
||||
def uploads():
|
||||
if request.method == 'POST':
|
||||
# check if the post request has the file part
|
||||
if 'file' not in request.files:
|
||||
|
@ -70,4 +70,4 @@ def upload_game():
|
|||
else:
|
||||
flash("Not recognized file format. Awaiting a .multidata file.")
|
||||
rooms = select(room for room in Room if room.owner == session["_id"])
|
||||
return render_template("upload_game.html", rooms=rooms)
|
||||
return render_template("uploads.html", rooms=rooms)
|
||||
|
|
Loading…
Reference in New Issue