Add signup page
This commit is contained in:
parent
5b8e8017ca
commit
8eb491fa97
1
main.go
1
main.go
@ -21,6 +21,7 @@ func main() {
|
|||||||
r.Get("/", ctrlrs.StaticTemplate("home.gohtml", "tailwind.gohtml"))
|
r.Get("/", ctrlrs.StaticTemplate("home.gohtml", "tailwind.gohtml"))
|
||||||
r.Get("/contact", ctrlrs.StaticTemplate("contact.gohtml", "tailwind.gohtml"))
|
r.Get("/contact", ctrlrs.StaticTemplate("contact.gohtml", "tailwind.gohtml"))
|
||||||
r.Get("/faq", ctrlrs.FAQ("faq.gohtml", "tailwind.gohtml"))
|
r.Get("/faq", ctrlrs.FAQ("faq.gohtml", "tailwind.gohtml"))
|
||||||
|
r.Get("/signup", ctrlrs.StaticTemplate("signup.gohtml", "tailwind.gohtml"))
|
||||||
r.NotFound(notFoundHandler)
|
r.NotFound(notFoundHandler)
|
||||||
fmt.Println("Starting the server on :3000...")
|
fmt.Println("Starting the server on :3000...")
|
||||||
http.ListenAndServe(":3000", r)
|
http.ListenAndServe(":3000", r)
|
||||||
|
|||||||
22
templates/signup.gohtml
Normal file
22
templates/signup.gohtml
Normal 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>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="space-x-4">
|
<div class="space-x-4">
|
||||||
<a href="#">Sign in</a>
|
<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>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user