Download signup.html from GopalKrushnaMahapatra/TrueWrite-Scan: direct link, hf CLI and curl.
- Browser
- Download file 3.15 kB
-
https://huggingface.co/spaces/GopalKrushnaMahapatra/TrueWrite-Scan/resolve/main/signup.html
- Command line
-
hf download hf://spaces/GopalKrushnaMahapatra/TrueWrite-Scan/signup.html
-
curl -L -o signup.html https://huggingface.co/spaces/GopalKrushnaMahapatra/TrueWrite-Scan/resolve/main/signup.html
3.15 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>Sign Up – TrueWrite Scan</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| </head> | |
| <body class="bg-slate-950 text-white min-h-screen flex items-center justify-center"> | |
| <div class="max-w-md w-full mx-4 bg-slate-900/70 border border-slate-800 rounded-2xl p-6 shadow-xl"> | |
| <h1 class="text-2xl font-bold mb-1">Create your account</h1> | |
| <p class="text-xs text-slate-400 mb-4">Sign up to use Grammar, Plagiarism, and AI checks.</p> | |
| <form id="signupForm" class="space-y-4"> | |
| <div> | |
| <label class="block text-xs mb-1">Full name</label> | |
| <input id="name" type="text" required | |
| class="w-full px-3 py-2 rounded-lg bg-slate-950 border border-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500" /> | |
| </div> | |
| <div> | |
| <label class="block text-xs mb-1">Email</label> | |
| <input id="email" type="email" required | |
| class="w-full px-3 py-2 rounded-lg bg-slate-950 border border-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500" /> | |
| </div> | |
| <div> | |
| <label class="block text-xs mb-1">Password</label> | |
| <input id="password" type="password" required minlength="6" | |
| class="w-full px-3 py-2 rounded-lg bg-slate-950 border border-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500" /> | |
| </div> | |
| <p id="signupError" class="text-xs text-red-400 h-4"></p> | |
| <button type="submit" | |
| class="w-full py-2 rounded-lg bg-indigo-500 hover:bg-indigo-600 text-sm font-semibold"> | |
| Sign up | |
| </button> | |
| </form> | |
| <p class="mt-4 text-xs text-slate-400 text-center"> | |
| Already have an account? | |
| <a href="login.html" class="text-indigo-300 underline underline-offset-2">Login</a> | |
| </p> | |
| </div> | |
| <script> | |
| const BACKEND_URL = "https://gopalkrushnamahapatra-truewrite-scan-backend.hf.space"; | |
| const form = document.getElementById("signupForm"); | |
| const err = document.getElementById("signupError"); | |
| form.addEventListener("submit", async (e) => { | |
| e.preventDefault(); | |
| err.textContent = ""; | |
| const name = document.getElementById("name").value.trim(); | |
| const email = document.getElementById("email").value.trim(); | |
| const password = document.getElementById("password").value; | |
| try { | |
| const res = await fetch(`${BACKEND_URL}/api/signup`, { | |
| method: "POST", | |
| headers: { "Content-Type": "application/json" }, | |
| body: JSON.stringify({ name, email, password }) | |
| }); | |
| const data = await res.json(); | |
| if (!res.ok) { | |
| err.textContent = data.detail || "Signup failed"; | |
| return; | |
| } | |
| localStorage.setItem("truewriteToken", data.token); | |
| localStorage.setItem("truewriteUser", JSON.stringify({ | |
| name: data.name, | |
| email: data.email | |
| })); | |
| window.location.href = "dashboard.html"; | |
| } catch (e2) { | |
| err.textContent = "Server error. Is backend running?"; | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> | |