Initial commit

This commit is contained in:
bvandeusen
2025-07-28 21:57:49 +00:00
commit d200550b35
41 changed files with 591 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
{% extends "layout.html" %}
{% block title %}Home{% endblock %}
{% block content %}
<h1>Welcome to the Flask Template App!</h1>
<p>This is the index page.</p>
{% endblock %}
+37
View File
@@ -0,0 +1,37 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Flask Template App</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<header>
{% if current_user.is_authenticated %}
Hello {{ current_user.username }} |
<a href="{{ url_for('auth.logout') }}">Logout</a>
{% else %}
<a href="{{ url_for('auth.login') }}">Login</a> |
<a href="{{ url_for('auth.register') }}">Register</a>
{% endif %}
</header>
<!-- FLASH MESSAGES -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="flash {{ category }}">
{{ message }}
</div>
{% endfor %}
{% endif %}
{% endwith %}
<hr>
<!-- MAIN CONTENT -->
{% block content %}{% endblock %}
</body>
</html>
+10
View File
@@ -0,0 +1,10 @@
{% extends "layout.html" %}
{% block content %}
<h2>Login</h2>
<form method="POST">
{{ form.hidden_tag() }}
{{ form.email(size=32, placeholder=form.email.label.text) }}<br>
{{ form.password(size=32, placeholder=form.password.label.text) }}<br>
{{ form.submit() }}
</form>
{% endblock %}
+39
View File
@@ -0,0 +1,39 @@
{% extends "layout.html" %}
{% block content %}
<h2>Register</h2>
<form method="POST">
{{ form.hidden_tag() }}
<p>
{{ form.username(size=32, placeholder=form.username.label.text) }}
{% for error in form.username.errors %}
<span class="error">{{ error }}</span>
{% endfor %}
</p>
<p>
{{ form.email(size=32, placeholder=form.email.label.text) }}
{% for error in form.email.errors %}
<span class="error">{{ error }}</span>
{% endfor %}
</p>
<p>
{{ form.password(size=32, placeholder=form.password.label.text) }}
{% for error in form.password.errors %}
<span class="error">{{ error }}</span>
{% endfor %}
</p>
<p>
{{ form.confirm_password(size=32, placeholder=form.confirm_password.label.text) }}
{% for error in form.confirm_password.errors %}
<span class="error">{{ error }}</span>
{% endfor %}
</p>
<p>
{{ form.submit() }}
</p>
</form>
{% endblock %}