mirror of
https://github.com/kevinveenbirkenbach/homepage.veen.world.git
synced 2026-02-23 03:02:44 +00:00
Refactored card logic
This commit is contained in:
13
app/app.py
13
app/app.py
@@ -5,6 +5,7 @@ import hashlib
|
||||
import yaml
|
||||
from utils.configuration_resolver import ConfigurationResolver
|
||||
from utils.cache_manager import CacheManager
|
||||
from utils.compute_card_classes import compute_card_classes
|
||||
|
||||
# Initialize the CacheManager
|
||||
cache_manager = CacheManager()
|
||||
@@ -47,7 +48,17 @@ def reload_config_in_dev():
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return render_template("pages/index.html.j2", cards=app.config["cards"], company=app.config["company"], navigation=app.config["navigation"], platform=app.config["platform"])
|
||||
cards = app.config["cards"]
|
||||
lg_classes, md_classes = compute_card_classes(cards)
|
||||
return render_template(
|
||||
"pages/index.html.j2",
|
||||
cards=cards,
|
||||
company=app.config["company"],
|
||||
navigation=app.config["navigation"],
|
||||
platform=app.config["platform"],
|
||||
lg_classes=lg_classes,
|
||||
md_classes=md_classes
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=(FLASK_ENV == "development"), host="0.0.0.0", port=5000)
|
||||
|
||||
Reference in New Issue
Block a user