Files
nexium-web/app/pages/static.py
T
2026-08-02 17:55:21 +00:00

40 lines
1.1 KiB
Python

# Pages which has no function but to display static content
from flask import Blueprint, render_template, redirect
from app.util import auth
import random
static = Blueprint("static", __name__, template_folder="pages")
FLUTTERSHY_IMAGES = [
"https://media1.tenor.com/m/FLUQuIi2vTUAAAAd/mlp-my-little-pony.gif",
"https://media1.tenor.com/m/G-xhgUfTmMkAAAAd/my-little-pony-friendship-is-magic-fluttershy.gif",
"https://media1.tenor.com/m/CDaXzhvweIsAAAAd/my-little-pony-mlp.gif",
]
@static.route("/fluttershy")
def fluttershy():
return render_template("fluttershy.html", fluttershy_image=random.choice(FLUTTERSHY_IMAGES))
@static.route("/terms")
def terms():
return render_template("terms.html")
@static.route("/privacy")
def privacy():
return render_template("privacy.html")
@static.route("/download")
@auth.authenticated_required
def download():
return render_template("downloads.html")
@static.route("/Games.aspx")
@auth.authenticated_required
def gamesaspx():
return redirect("/games")
@static.route("/drivers")
@auth.authenticated_required
def drivers():
return render_template("drivers.html")