diff options
-rw-r--r-- | jimbrella/static/QR_giveback.png | bin | 0 -> 2434 bytes | |||
-rw-r--r-- | jimbrella/static/QR_takeaway.png | bin | 0 -> 2529 bytes | |||
-rw-r--r-- | jimbrella/templates/index.html | 31 | ||||
-rw-r--r-- | jimbrella/web.py | 7 |
4 files changed, 37 insertions, 1 deletions
diff --git a/jimbrella/static/QR_giveback.png b/jimbrella/static/QR_giveback.png Binary files differnew file mode 100644 index 0000000..96f2d37 --- /dev/null +++ b/jimbrella/static/QR_giveback.png diff --git a/jimbrella/static/QR_takeaway.png b/jimbrella/static/QR_takeaway.png Binary files differnew file mode 100644 index 0000000..308cf33 --- /dev/null +++ b/jimbrella/static/QR_takeaway.png 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 @@ +<!DOCTYPE html> +<html> + <head> + <title>JI Umbrella</title> + <link rel="stylesheet" href="/static/jimbrella.css" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + </head> + <body> + <h1>JI Umbrella</h1> + + <div id="container"> + <h3>Click or scan the QR codes below</h3> + <div class="tile-container"> + <div class="tile blue"> + <h2 class="banner-heading">Borrow</h2> + <a href="https://wj.sjtu.edu.cn/q/aYfDXrqG"> + <img src="/static/QR_takeaway.png" + alt="QR code for borrowing umbrella" class="transparent" /> + </a> + </div> + <div class="tile green"> + <h2 class="banner-heading">Return</h2> + <a href="https://wj.sjtu.edu.cn/q/Ai9Hb2XR"> + <img src="/static/QR_giveback.png" + alt="QR code for returning umbrella" class="transparent" /> + </a> + </div> + </div> + </div> + </body> +</html> 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) |