feat: Add easy to change themes
All checks were successful
Build Docker / Build Image (push) Successful in 32s

This commit is contained in:
2024-02-01 23:41:22 +11:00
parent 50f3f07b63
commit 69e4d7f496
6 changed files with 17 additions and 1 deletions

View File

@@ -22,6 +22,8 @@ fees = 0.02
revokeCheck = random.randint(100000,999999)
theme = os.getenv("theme")
@app.route('/')
def index():
# Check if the user is logged in
@@ -982,6 +984,12 @@ def report():
def qr(data):
return send_file(qrcode(data, mode="raw"), mimetype="image/png")
# Theme
@app.route('/assets/css/styles.min.css')
def send_css():
print("Using theme: " + theme)
return send_from_directory('themes', f'{theme}.css')
@app.route('/assets/<path:path>')
def send_assets(path):
return send_from_directory('templates/assets', path)