From 8203c50b08e54c7621601fa6c3bbb5f0cced0576 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 4 Nov 2025 00:02:51 +0000 Subject: [PATCH] Add basic signup page outline --- endpoint.go | 6 +++ html.go | 11 ++++- main.go | 1 + templates/signup.html | 107 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 templates/signup.html diff --git a/endpoint.go b/endpoint.go index bef3d035..53924a47 100644 --- a/endpoint.go +++ b/endpoint.go @@ -15,3 +15,9 @@ func getRoot(w http.ResponseWriter, r *http.Request) { 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) + } +} diff --git a/html.go b/html.go index 8474f286..4ea3c8d0 100644 --- a/html.go +++ b/html.go @@ -9,8 +9,9 @@ import ( ) var ( - root = newBuiltTemplate("root", "base") dashboard = newBuiltTemplate("dashboard", "base") + root = newBuiltTemplate("root", "base") + signup = newBuiltTemplate("signup", "base") ) type BuiltTemplate struct { @@ -29,6 +30,8 @@ type ContentDashboard struct { type ContentRoot struct { BabbleLinks []Link } +type ContentSignup struct { +} func (bt *BuiltTemplate) ExecuteTemplate(w io.Writer, data any) error { name := bt.files[0] + ".html" @@ -57,6 +60,12 @@ func htmlRoot(w io.Writer, path string) error { return root.ExecuteTemplate(w, data) } +func htmlSignup(w io.Writer, path string) error { + data := ContentSignup{ + } + return signup.ExecuteTemplate(w, data) +} + func makeFuncMap() template.FuncMap { funcMap := template.FuncMap{} return funcMap diff --git a/main.go b/main.go index 69e31ef0..a9d5bea7 100644 --- a/main.go +++ b/main.go @@ -45,6 +45,7 @@ func main() { r.Use(sessionManager.LoadAndSave) r.Get("/", getRoot) + r.Get("/signup", getSignup) r.Get("/favicon.ico", getFavicon) localFS := http.Dir("./static") diff --git a/templates/signup.html b/templates/signup.html new file mode 100644 index 00000000..ddde8d00 --- /dev/null +++ b/templates/signup.html @@ -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"}} +
+
+ +
+
+ Your Logo +
+
+ +
+ +
+
+

Create an Account

+

Join us today to get started

+
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+

Already have an account? Sign in

+
+
+
+ + +
+
+

Account Information

+

What you need to know

+ +
+
Who should register?
+

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.

+
+ +
+
What happens after registration?
+

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.

+
+ +
+ For any questions about account types or registration, please contact our support team at support@yourproduct.com +
+
+
+
+
+
+{{end}}