Add signup page

This commit is contained in:
Lucas Schumacher 2024-08-01 21:31:39 -04:00
parent 5b8e8017ca
commit 8eb491fa97
3 changed files with 24 additions and 1 deletions

View File

@ -21,6 +21,7 @@ func main() {
r.Get("/", ctrlrs.StaticTemplate("home.gohtml", "tailwind.gohtml"))
r.Get("/contact", ctrlrs.StaticTemplate("contact.gohtml", "tailwind.gohtml"))
r.Get("/faq", ctrlrs.FAQ("faq.gohtml", "tailwind.gohtml"))
r.Get("/signup", ctrlrs.StaticTemplate("signup.gohtml", "tailwind.gohtml"))
r.NotFound(notFoundHandler)
fmt.Println("Starting the server on :3000...")
http.ListenAndServe(":3000", r)

22
templates/signup.gohtml Normal file
View File

@ -0,0 +1,22 @@
<!doctype html>
<html>
<body>
{{template "header".}}
<main class="px-6">
<form action="/signup" method="post">
<div>
<label for="signupEmail">Email Address</label>
<input name="email" id="signupEmail" type="email" placeholder="Email address" required autocomplete="email"/>
</div>
<div>
<label for="signupPassword">Password</label>
<input name="password" id="signupPassword" type="password" placeholder="password" required/>
</div>
<div>
<button type="submit">Sign up</button>
</div>
</form>
</main>
{{template "footer" .}}
</body>
</html>

View File

@ -17,7 +17,7 @@
</div>
<div class="space-x-4">
<a href="#">Sign in</a>
<a href="#" clss="px-4 py-2 bg-blue-700 hover:bg-blue-600 rounded">Sign up</a>
<a href="/signup" clss="px-4 py-2 bg-blue-700 hover:bg-blue-600 rounded">Sign up</a>
</div>
</nav>
</header>