Updating WebHost structure

This commit is contained in:
Chris Wilson 2021-06-14 22:27:43 -04:00
parent cd45116dce
commit 883ebbf267
8 changed files with 38 additions and 11 deletions

View File

@ -102,17 +102,43 @@ games_list = {
victory!""") victory!""")
} }
# Player settings pages
@app.route('/games/<game>/player-settings')
def player_settings(game):
return render_template(f"/games/{game}/playerSettings.html")
# Zelda3 pages
@app.route('/games/zelda3/<string:page>')
def zelda3_pages(page):
return render_template(f"/games/zelda3/{page}.html")
# Factorio pages
@app.route('/games/factorio/<string:page>')
def factorio_pages(page):
return render_template(f"/games/factorio/{page}.html")
# Minecraft pages
@app.route('/games/minecraft/<string:page>')
def minecraft_pages(page):
return render_template(f"/games/factorio/{page}.html")
# Game landing pages
@app.route('/games/<game>')
def game_page(game):
return render_template(f"/games/{game}/{game}.html")
# List of supported games
@app.route('/games') @app.route('/games')
def games(): def games():
return render_template("games/games.html", games_list=games_list) return render_template("games/games.html", games_list=games_list)
@app.route('/games/<game>')
def game_page(game):
return render_template(f"/games/{game}"+".html")
@app.route('/tutorial/<string:game>/<string:file>/<string:lang>') @app.route('/tutorial/<string:game>/<string:file>/<string:lang>')
def tutorial(game, file, 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)
@ -124,7 +150,7 @@ def tutorial_landing():
@app.route('/weighted-settings') @app.route('/weighted-settings')
def player_settings(): def weighted_settings():
return render_template("weightedSettings.html") return render_template("weightedSettings.html")

View File

@ -1,5 +1,5 @@
html{ html{
background-image: url('../static/backgrounds/grass/grass-0007-large.png'); background-image: url('../../static/backgrounds/grass/grass-0007-large.png');
background-repeat: repeat; background-repeat: repeat;
background-size: 650px 650px; background-size: 650px 650px;
} }

View File

@ -2,10 +2,10 @@
{% block head %} {% block head %}
<title>Player Settings</title> <title>Player Settings</title>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename="styles/playerSettings.css") }}" /> <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename="styles/zelda3/playerSettings.css") }}" />
<script type="application/ecmascript" src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> <script type="application/ecmascript" src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script type="application/ecmascript" src="{{ url_for('static', filename="assets/js-yaml.min.js") }}"></script> <script type="application/ecmascript" src="{{ url_for('static', filename="assets/js-yaml.min.js") }}"></script>
<script type="application/ecmascript" src="{{ url_for('static', filename="assets/playerSettings.js") }}"></script> <script type="application/ecmascript" src="{{ url_for('static', filename="assets/zelda3/playerSettings.js") }}"></script>
{% endblock %} {% endblock %}
{% block body %} {% block body %}

View File

@ -4,6 +4,7 @@
<title>Link to the Past</title> <title>Link to the Past</title>
</head> </head>
<body> <body>
Link to the Past Link to the Past<br />
<a href="/games/zelda3/player-settings">Player Settings</a>
</body> </body>
</html> </html>