handle hotspots legend parameter

This commit is contained in:
2024-04-14 11:35:32 -05:00
parent 7ae923d58f
commit d022436a6e
2 changed files with 5 additions and 2 deletions

View File

@@ -56,13 +56,16 @@ def resume():
@app.route("/hotspots") @app.route("/hotspots")
def hotspotsRIT(): def hotspotsRIT():
url = HotspotsURL
if flask.request.args.get("legend") == "true":
url += "?legend=true"
pagevars = { pagevars = {
"template": "iframe.html", "template": "iframe.html",
"title": f"Hotspots @ RIT", "title": f"Hotspots @ RIT",
"description": "Hotspots @ RIT by Andrew Simonson", "description": "Hotspots @ RIT by Andrew Simonson",
"canonical": "/hotspots", "canonical": "/hotspots",
} }
return flask.render_template("iframe.html", url=HotspotsURL, var=pagevars) return flask.render_template("iframe.html", url=url, var=pagevars)
@app.route("/hotspots/<path>") @app.route("/hotspots/<path>")
def hotspotsProxy(path): def hotspotsProxy(path):

View File

@@ -9,7 +9,7 @@
"github", "https://github.com/asimonson1125/hotspotsrit", "git repo" "github", "https://github.com/asimonson1125/hotspotsrit", "git repo"
], ],
[ [
"globe", "https://asimonson.com/hotspots", "demo" "globe", "https://asimonson.com/hotspots?legend=true", "demo"
] ]
] ]
}, },