sign in system pretty much

This commit is contained in:
ralphi3
2026-06-18 13:48:25 +12:00
parent eda37b8ad1
commit 723c60fa22
6 changed files with 85 additions and 18 deletions
+6 -2
View File
@@ -9,11 +9,15 @@
<body>
<ul class="navbar">
<li><a href="{{ url_for('home') }}">Home</a></li>
<li><a href="{{ url_for('bivariate') }}">Bivariate Data</a></li>
<li><a href="{{ url_for('about') }}">About</a></li>
<li><a href="{{ url_for('all_users') }}">all_users</a></li>
{% if session.user_id %}
<li><a href="{{ url_for('bivariate') }}">Bivariate Data</a></li>
<li style="margin-left: auto; color: white; margin-top: 14px; margin-left: 900px;">Hi, {{ session.username }}</li>
<li style="margin-left: 20px;"><a href="{{ url_for('logout') }}">Sign Out</a></li>
{% else %}
<li style="margin-left: auto;"><a href="{{ url_for('signup') }}">Sign Up</a></li>
<li style="margin-left:0px"><a href="{{ url_for('signin') }}">Sign In</a></li>
{% endif %}
</ul>
<main>
{% block content %}{% endblock %}
+2
View File
@@ -5,6 +5,8 @@
<h1>homepage for math website wow</h1>
<h2>If you want to access the math topics on this website you must be signed into a account</h2>
</div>
+22 -8
View File
@@ -1,13 +1,27 @@
{% extends 'base.html' %}
{% block content %}
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Sign in page with sql database</h1>
</body>
<h1>Sign in</h1>
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class="flash-messages">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<form action="{{ url_for('signin') }}" method="POST">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>
<button type="submit">Sign In</button>
</form>
<p>Don't have an account? <a href="{{ url_for('signup') }}">Sign up</a></p>
{% endblock %}