From 70b5dae19f8a91d13f05f3b39582d50718104d56 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Tue, 23 Nov 2021 19:20:23 +0800 Subject: Index page with QR codes --- jimbrella/static/QR_giveback.png | Bin 0 -> 2434 bytes jimbrella/static/QR_takeaway.png | Bin 0 -> 2529 bytes jimbrella/templates/index.html | 31 +++++++++++++++++++++++++++++++ jimbrella/web.py | 7 ++++++- 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 jimbrella/static/QR_giveback.png create mode 100644 jimbrella/static/QR_takeaway.png create mode 100644 jimbrella/templates/index.html diff --git a/jimbrella/static/QR_giveback.png b/jimbrella/static/QR_giveback.png new file mode 100644 index 0000000..96f2d37 Binary files /dev/null and b/jimbrella/static/QR_giveback.png differ diff --git a/jimbrella/static/QR_takeaway.png b/jimbrella/static/QR_takeaway.png new file mode 100644 index 0000000..308cf33 Binary files /dev/null and b/jimbrella/static/QR_takeaway.png differ diff --git a/jimbrella/templates/index.html b/jimbrella/templates/index.html new file mode 100644 index 0000000..9e88117 --- /dev/null +++ b/jimbrella/templates/index.html @@ -0,0 +1,31 @@ + + + + JI Umbrella + + + + +

JI Umbrella

+ +
+

Click or scan the QR codes below

+
+
+ + + QR code for borrowing umbrella + +
+
+ + + QR code for returning umbrella + +
+
+
+ + diff --git a/jimbrella/web.py b/jimbrella/web.py index 8a625ac..33e059a 100644 --- a/jimbrella/web.py +++ b/jimbrella/web.py @@ -1,5 +1,5 @@ import logging -from flask import Flask +from flask import Flask, render_template from .admin import bp as admin_bp from .auth import bp as auth_bp from .config import * @@ -9,6 +9,11 @@ logging.basicConfig(filename=LOG_PATH, level=logging.DEBUG) app = Flask("jimbrella") app.secret_key = FLASK_SECRET_KEY + +@app.route("/") +def index(): + return render_template("index.html") + app.register_blueprint(admin_bp) app.register_blueprint(auth_bp) -- cgit v1.2.3