Create a login page
parent
ce257c3cc1
commit
48eb6bf72d
|
@ -0,0 +1,107 @@
|
|||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin: 0.66em 0;
|
||||
}
|
||||
|
||||
.form-group:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.form-group:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.form-and-details {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.form-and-details > * {
|
||||
max-width: 50%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form-and-details > *:first-child {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.form-and-details > *:last-child {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
input + label,
|
||||
input + input {
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
input[type="password"],
|
||||
input[type="text"] {
|
||||
background: #fff;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid rgba(0, 0, 0, 0.12);
|
||||
border-radius: 6px;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
display: block;
|
||||
|
||||
margin: 0.5em 0.25em;
|
||||
padding: 0.5em 1em;
|
||||
line-height: 1.5;
|
||||
|
||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
input[type="password"]:focus,
|
||||
input[type="text"]:focus {
|
||||
background-color: #fff;
|
||||
border-color: #80bdff;
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
|
||||
}
|
||||
|
||||
input[type="password"]:focus:invalid,
|
||||
input[type="text"]:focus:invalid {
|
||||
background-color: #fff;
|
||||
border-color: #ff8080;
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.2rem rgba(255, 0, 13, 0.25);
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
background-color: rgb(21, 124, 214);
|
||||
border: rgb(2, 97, 180);
|
||||
border-radius: 6px;
|
||||
color: #fff;
|
||||
padding: 0.25em 0.5em;
|
||||
display: inline-block;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
|
||||
user-select: none;
|
||||
border: 1px solid rgba(0, 0, 0, 0);
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
|
||||
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
|
||||
border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
||||
}
|
||||
|
||||
input[type="submit"]:active {
|
||||
background-color: rgb(47, 123, 190);
|
||||
border-color: rgb(23, 78, 126);
|
||||
color: #ffffff;
|
||||
}
|
|
@ -23,8 +23,14 @@ main {
|
|||
flex: 1;
|
||||
}
|
||||
|
||||
nav {
|
||||
padding: 1em 0;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
display: block;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<ul>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/login/">Login</a></li>
|
||||
<li><a href="/register/">Register</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Chat</title>
|
||||
|
||||
<link rel="stylesheet" href="/css/styles.css">
|
||||
<link rel="stylesheet" href="/css/forms.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/login/">Login</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<h1>Log in</h1>
|
||||
|
||||
<section class="form-and-details">
|
||||
<form method="POST" action="/login">
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" name="username" placeholder="Username" minlength="3" pattern="[\w0-9][\w0-9_-]" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" placeholder="Password" minlength="6" required>
|
||||
</div>
|
||||
|
||||
<input type="submit" value="Log in">
|
||||
</form>
|
||||
|
||||
<aside>
|
||||
<p>Username:</p>
|
||||
<ul>
|
||||
<li>must be at least 3 characters long.</li>
|
||||
<li>can contain alphanumeric characters, <kbd>_</kbd>, or <kbd>-</kbd>.</li>
|
||||
<li>can't start with <kbd>_</kbd> or <kbd>-</kbd>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Password:</p>
|
||||
<ul>
|
||||
<li>must be at least 6 characters long.</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
<p>Don't have an account? <a href="/register/">Register!</a></p>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
by <a href="https://lavender.software">Lavender Software</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue