feat: Add easy to change themes
All checks were successful
Build Docker / Build Image (push) Successful in 32s
All checks were successful
Build Docker / Build Image (push) Successful in 32s
This commit is contained in:
8
main.py
8
main.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user