CSS verbessert für Login&Register. javscsript code für magnetic button effect noch in entwicklung.

This commit is contained in:
2026-03-16 12:53:57 +01:00
parent 986629f0a5
commit 723bc835ec
4 changed files with 189 additions and 42 deletions
+20 -22
View File
@@ -5,37 +5,35 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<style>
h1 {
color: green;
}
.error {
color: red;
}
</style>
<link rel="stylesheet" href="../static/css/login.css">
<link rel="stylesheet" href="../static/css/login.css">
</link>
</head>
<body>
<nav>
<ul>
<li><a href="{{ url_for('login.login') }}">Login</a></li>
<li><a href="{{ url_for('login.register') }}">Create account</a></li>
<li><a href="{{ url_for('login.login') }}"><span>Login</span></a></li>
<li><a href="{{ url_for('login.register') }}"><span></span>Create account</span></a></li>
</ul>
</nav>
<h1>Login to your account</h1>
{% if error %}
<p class="error">{{ error }}</p>
{% endif %}
<main>
<h1>Login to your account</h1>
<form action="{{ url_for('login.login') }}" method="post">
<label for="username">Username:</label>
<input type="text" name="username" required />
<label for="password">Password:</label>
<input type="password" name="password" required />
<button type="submit">Login</button>
</form>
{% if error %}
<p class="error">{{ error }}</p>
{% endif %}
<form action="{{ url_for('login.login') }}" method="post">
<label for="username">Username:</label>
<input type="text" name="username" required />
<label for="password">Password:</label>
<input type="password" name="password" required />
<button class="magnetic" type="submit">Login</button>
</form>
</main>
<script src="../static/js/login.js" defer></script>
</body>
</html>
+14 -20
View File
@@ -5,15 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign Up</title>
<style>
h1 {
color: green;
}
.error {
color: red;
}
</style>
<link rel="stylesheet" href="../static/css/login.css">
</head>
<body>
@@ -23,19 +15,21 @@
<li><a href="{{ url_for('login.register') }}">Create account</a></li>
</ul>
</nav>
<h1>Create an account</h1>
<main>
<h1>Create an account</h1>
{% if error %}
<p class="error">{{ error }}</p>
{% endif %}
{% if error %}
<p class="error">{{ error }}</p>
{% endif %}
<form action="{{ url_for('login.register') }}" method="post">
<label for="username">Username:</label>
<input type="text" name="username" required />
<label for="password">Password:</label>
<input type="password" name="password" required />
<button type="submit">Sign Up</button>
</form>
<form action="{{ url_for('login.register') }}" method="post">
<label for="username">Username:</label>
<input type="text" name="username" required />
<label for="password">Password:</label>
<input type="password" name="password" required />
<button type="submit">Sign Up</button>
</form>
</main>
</body>
</html>