added login
This commit is contained in:
1 parent
171657d616
commit
0cb2d25a62
3 files changed
+137
-26
No files matched your search
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>JS Reading App</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
|
||||
<script src="https://unpkg.com/htmx.org@1.9.9"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar" role="navigation" aria-label="main navigation">
|
||||
<div class="navbar-menu">
|
||||
<div class="navbar-start">
|
||||
<a class="navbar-item" href="#">
|
||||
<img src="images/js_logo.svg" alt="js logo" style="height: 100%">
|
||||
<h2 class="title is-3 ml-1">Reading Exercices</h2>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="columns is-centered">
|
||||
<div class="column is-half">
|
||||
<form hx-post="/api/v1/login" hx-swap="none">
|
||||
|
||||
<div class="field has-addons">
|
||||
<div class="control">
|
||||
<input class="input" id="username" type="text" placeholder="bob.l.eponge@ocean.com" name="username" required>
|
||||
</div>
|
||||
<div class="control">
|
||||
<input type="submit" class="button" value="Login">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.body.addEventListener('set-seed', function (evt) {
|
||||
const seed = document.getElementById("username").value;
|
||||
window.localStorage.setItem("seed", seed);
|
||||
document.location.href = "/";
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user