diff --git a/templates/download.html b/templates/download.html new file mode 100644 index 0000000..9bf83b8 --- /dev/null +++ b/templates/download.html @@ -0,0 +1,9 @@ +{% extends "layout.html" %} +{% block body %} +test
test
test
test
test
test
test
test
+test
test
test
test
test
test
test
test
+test
test
test
test
test
test
test
test
+test
test
test
test
test
test
test
test
+test
test
test
test
test
test
test
test
+test
test
test
test
test
test
test
test
+{% endblock %} \ No newline at end of file diff --git a/templates/layout.html b/templates/layout.html index 74303af..b079986 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -1,3 +1,17 @@ +{% set header_links = + { + "Home": + { + "endpoint": "home_index", + "href": "/home" + }, + "Download": + { + "endpoint": "download_index", + "href": "/download" + } + } +%} osu!wayback @@ -51,13 +65,15 @@ - diff --git a/web.py b/web.py index d05edb7..074c86e 100644 --- a/web.py +++ b/web.py @@ -1,7 +1,7 @@ import json import MySQLdb import MySQLdb.cursors -from flask import Flask, make_response, request, render_template +from flask import Flask, make_response, request, render_template, jsonify app = Flask(__name__) @@ -9,8 +9,13 @@ with open("config.json", "r") as f: config = json.load(f) @app.route("/") +@app.route("/home") def home_index(): return render_template("index.html") +@app.route("/download") +def download_index(): + return render_template("download.html") + if __name__ == "__main__": app.run(**config["web"]) \ No newline at end of file