bases html pages

This commit is contained in:
DaanoGames
2025-04-01 11:55:33 +02:00
parent f660a33425
commit a0742c07ad
5 changed files with 20 additions and 26 deletions

5
run.py
View File

@@ -12,6 +12,11 @@ def index():
# Return HTML content # Return HTML content
return "<h1>This is the default page</h1>" return "<h1>This is the default page</h1>"
@app.route("/dashboard")
def dashboard():
# Return Dashboard.html
return render_template("dashboard.html")
@app.route("/forms") @app.route("/forms")
def forms(): def forms():

View File

@@ -9,6 +9,9 @@
</head> </head>
<body> <body>
{% block content %} {% block content %}
{% include "navbar_base.html" %}
{% block navbar %}
{% endblock %}
{% endblock %} {% endblock %}
</body> </body>
</html> </html>

View File

@@ -1,14 +1,7 @@
<!DOCTYPE html> {% extends "base_template.html" %}
<html lang="en">
<head> {%block title%}Dashboard{%endblock%}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard</title>
</head>
<body> {%block content%}
</body> {%endblock%}
</html>

View File

View File

@@ -1,14 +1,7 @@
<!DOCTYPE html> {%block navbar%}
<html lang="en"> <nav class="navbar navbar-expand-lg bg-body-tertiary" data-bs-theme="dark">
<div class="container-fluid">
<head> <a class="navbar-brand" href="\dashboard">Dashboard</a>
<meta charset="UTF-8"> </div>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> </nav>
<title>Default</title> {%endblock%}
</head>
<body>
</body>
</html>