Skip to content

Commit

Permalink
identity: start static site
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah committed Sep 1, 2024
1 parent 47f4dfe commit 5c61d61
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
22 changes: 22 additions & 0 deletions apps/identity_frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nexus Demo</title>
<script src="https://cdn.tailwindcss.com?version=3.4.5"></script>
<script src="./index.js"></script>
</head>
<body class="bg-slate-200">
<h1>Login</h1>
<!-- <form id="loginForm"> -->
<label for="userId">User ID</label>
<input type="text" id="userId" name="user_id" required placeholder="Enter User ID" />
<button type="button" onClick="onLoginPressed()">Submit</button>
<!-- </form> -->
<script>
document.getElementById("userId").value = userIdFromUrl();
</script

</body>
</html>
9 changes: 9 additions & 0 deletions apps/identity_frontend/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function userIdFromUrl() {
const params = new URLSearchParams(window.location.search);
return params.get("user_id");
}

function onLoginPressed() {
console.log("button pressed")

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CREATE TABLE "users"
(
user_id BLOB PRIMARY KEY NOT NULL,
user_id BLOB PRIMARY KEY NOT NULL,
pubkeys_jwks TEXT NOT NULL
) STRICT;

0 comments on commit 5c61d61

Please sign in to comment.