Add basic signup page outline
This commit is contained in:
parent
56eaa4ed1c
commit
8203c50b08
4 changed files with 124 additions and 1 deletions
|
|
@ -15,3 +15,9 @@ func getRoot(w http.ResponseWriter, r *http.Request) {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
func getSignup(w http.ResponseWriter, r *http.Request) {
|
||||||
|
err := htmlSignup(w, r.URL.Path)
|
||||||
|
if err != nil {
|
||||||
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
11
html.go
11
html.go
|
|
@ -9,8 +9,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
root = newBuiltTemplate("root", "base")
|
|
||||||
dashboard = newBuiltTemplate("dashboard", "base")
|
dashboard = newBuiltTemplate("dashboard", "base")
|
||||||
|
root = newBuiltTemplate("root", "base")
|
||||||
|
signup = newBuiltTemplate("signup", "base")
|
||||||
)
|
)
|
||||||
|
|
||||||
type BuiltTemplate struct {
|
type BuiltTemplate struct {
|
||||||
|
|
@ -29,6 +30,8 @@ type ContentDashboard struct {
|
||||||
type ContentRoot struct {
|
type ContentRoot struct {
|
||||||
BabbleLinks []Link
|
BabbleLinks []Link
|
||||||
}
|
}
|
||||||
|
type ContentSignup struct {
|
||||||
|
}
|
||||||
|
|
||||||
func (bt *BuiltTemplate) ExecuteTemplate(w io.Writer, data any) error {
|
func (bt *BuiltTemplate) ExecuteTemplate(w io.Writer, data any) error {
|
||||||
name := bt.files[0] + ".html"
|
name := bt.files[0] + ".html"
|
||||||
|
|
@ -57,6 +60,12 @@ func htmlRoot(w io.Writer, path string) error {
|
||||||
return root.ExecuteTemplate(w, data)
|
return root.ExecuteTemplate(w, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func htmlSignup(w io.Writer, path string) error {
|
||||||
|
data := ContentSignup{
|
||||||
|
}
|
||||||
|
return signup.ExecuteTemplate(w, data)
|
||||||
|
}
|
||||||
|
|
||||||
func makeFuncMap() template.FuncMap {
|
func makeFuncMap() template.FuncMap {
|
||||||
funcMap := template.FuncMap{}
|
funcMap := template.FuncMap{}
|
||||||
return funcMap
|
return funcMap
|
||||||
|
|
|
||||||
1
main.go
1
main.go
|
|
@ -45,6 +45,7 @@ func main() {
|
||||||
r.Use(sessionManager.LoadAndSave)
|
r.Use(sessionManager.LoadAndSave)
|
||||||
|
|
||||||
r.Get("/", getRoot)
|
r.Get("/", getRoot)
|
||||||
|
r.Get("/signup", getSignup)
|
||||||
r.Get("/favicon.ico", getFavicon)
|
r.Get("/favicon.ico", getFavicon)
|
||||||
|
|
||||||
localFS := http.Dir("./static")
|
localFS := http.Dir("./static")
|
||||||
|
|
|
||||||
107
templates/signup.html
Normal file
107
templates/signup.html
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
{{template "base.html" .}}
|
||||||
|
|
||||||
|
{{define "title"}}Login{{end}}
|
||||||
|
{{define "style"}}
|
||||||
|
.register-container {
|
||||||
|
max-width: 900px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.register-box {
|
||||||
|
box-shadow: 0 0 15px rgba(0,0,0,0.1);
|
||||||
|
border-radius: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.register-form-section {
|
||||||
|
padding: 40px;
|
||||||
|
}
|
||||||
|
.register-info-section {
|
||||||
|
padding: 40px;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
.register-header {
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
.logo-area {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
.logo-placeholder {
|
||||||
|
width: 120px;
|
||||||
|
height: 60px;
|
||||||
|
background-color: #e9ecef;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
{{end}}
|
||||||
|
{{define "content"}}
|
||||||
|
<div class="container min-vh-100 d-flex align-items-center justify-content-center py-5">
|
||||||
|
<div class="register-container">
|
||||||
|
<!-- Logo Area -->
|
||||||
|
<div class="logo-area">
|
||||||
|
<div class="logo-placeholder">
|
||||||
|
<span class="text-muted">Your Logo</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row register-box g-0">
|
||||||
|
<!-- Left side: Registration Form -->
|
||||||
|
<div class="col-md-6 register-form-section">
|
||||||
|
<div class="register-header">
|
||||||
|
<h2>Create an Account</h2>
|
||||||
|
<p class="text-muted">Join us today to get started</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="name" class="form-label">Full Name</label>
|
||||||
|
<input type="text" class="form-control" id="name" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="email" class="form-label">Email Address</label>
|
||||||
|
<input type="email" class="form-control" id="email" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3 form-check">
|
||||||
|
<input type="checkbox" class="form-check-input" id="terms" required>
|
||||||
|
<label class="form-check-label" for="terms">I agree to the <a href="#">Terms of Service</a> and <a href="#">Privacy Policy</a></label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-grid gap-2">
|
||||||
|
<button type="submit" class="btn btn-primary">Register</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-3 text-center">
|
||||||
|
<p>Already have an account? <a href="login.html">Sign in</a></p>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Right side: Account Information -->
|
||||||
|
<div class="col-md-6 register-info-section">
|
||||||
|
<div>
|
||||||
|
<h2>Account Information</h2>
|
||||||
|
<p class="lead mb-4">What you need to know</p>
|
||||||
|
|
||||||
|
<div class="mb-4">
|
||||||
|
<h5>Who should register?</h5>
|
||||||
|
<p>This platform is designed for professionals who need to manage projects and collaborate with team members. Whether you're a freelancer, small business owner, or part of a larger organization, our tools can help streamline your workflow.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-4">
|
||||||
|
<h5>What happens after registration?</h5>
|
||||||
|
<p>After you register with your email, you'll receive a confirmation message with instructions to complete your account setup. You'll then have access to all features and can customize your workspace based on your specific needs.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<small class="text-muted">For any questions about account types or registration, please contact our support team at support@yourproduct.com</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue