Create templates/base.html
Browse files- templates/base.html +32 -0
templates/base.html
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>{{ title if title else "Flask App" }}</title>
|
| 5 |
+
<link rel = "stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
| 6 |
+
</head>
|
| 7 |
+
<body>
|
| 8 |
+
|
| 9 |
+
<!-- Navbar -->
|
| 10 |
+
<header>
|
| 11 |
+
<h1>Flask Demo</h1>
|
| 12 |
+
<nav>
|
| 13 |
+
<a href="/">Home</a> |
|
| 14 |
+
<a href="/greet">Greet</a>
|
| 15 |
+
<a href="/time">Current Time</a>
|
| 16 |
+
</nav>
|
| 17 |
+
</header>
|
| 18 |
+
|
| 19 |
+
<!-- Content Block (to be overridden) -->
|
| 20 |
+
<main>
|
| 21 |
+
{% block content %}
|
| 22 |
+
<p>Default content goes here.</p>
|
| 23 |
+
{% endblock %}
|
| 24 |
+
</main>
|
| 25 |
+
|
| 26 |
+
<!-- Footer -->
|
| 27 |
+
<footer>
|
| 28 |
+
<p>© 2025 My Flask App</p>
|
| 29 |
+
</footer>
|
| 30 |
+
|
| 31 |
+
</body>
|
| 32 |
+
</html>
|