diff --git a/application/controllers/index.go b/application/controllers/index.go index b258dd7..3b31860 100644 --- a/application/controllers/index.go +++ b/application/controllers/index.go @@ -1,6 +1,8 @@ package controllers import ( + "fmt" + "html" "html/template" "log" "net/http" @@ -9,6 +11,13 @@ import ( ) func Index(w http.ResponseWriter, r *http.Request) { + + if r.URL.Path != "/" { + w.WriteHeader(http.StatusNotFound) + fmt.Fprintf(w, "Error: 404 %s not found.", html.EscapeString(r.URL.Path)) + return + } + lp := filepath.Join("application", "layouts", "main.html") fp := filepath.Join("application", "views", "index.html") diff --git a/application/controllers/advanced.go b/application/controllers/thankyou.go similarity index 90% rename from application/controllers/advanced.go rename to application/controllers/thankyou.go index 8da6ead..432f772 100644 --- a/application/controllers/advanced.go +++ b/application/controllers/thankyou.go @@ -10,7 +10,7 @@ import ( "risklet/db" ) -func Advanced(w http.ResponseWriter, r *http.Request) { +func ThankYou(w http.ResponseWriter, r *http.Request) { if r.Method == "GET" { handleAdvancedGet(w, r) } else if r.Method == "POST" { @@ -43,12 +43,11 @@ func handleAdvancedPost(w http.ResponseWriter, r *http.Request) { } func handleAdvancedGet(w http.ResponseWriter, r *http.Request) { - companyId := r.PathValue("companyId") lp := filepath.Join("application", "layouts", "main.html") - fp := filepath.Join("application", "views", "advanced.html") + fp := filepath.Join("application", "views", "thankyou.html") - log.Println("Hitting Advanced") + log.Println("Hitting ThankYou") // Return a 404 if the template doesn't exist info, err := os.Stat(fp) @@ -74,7 +73,7 @@ func handleAdvancedGet(w http.ResponseWriter, r *http.Request) { return } - err = tmpl.ExecuteTemplate(w, "main.html", companyId) + err = tmpl.ExecuteTemplate(w, "main.html", nil) if err != nil { log.Print(err.Error()) http.Error(w, http.StatusText(500), 500) diff --git a/application/server.go b/application/server.go index 2338a05..c95fd50 100644 --- a/application/server.go +++ b/application/server.go @@ -9,6 +9,6 @@ func SetupAppServer() { fs := http.FileServer(http.Dir("./application/static")) http.Handle("GET /static/", http.StripPrefix("/static/", fs)) http.HandleFunc("/signup/", controllers.Signup) - http.HandleFunc("/advanced/{companyString}", controllers.Advanced) + http.HandleFunc("/thankyou", controllers.ThankYou) http.HandleFunc("/", controllers.Index) } diff --git a/application/static/css/main.css b/application/static/css/main.css index 266a822..cf61923 100644 --- a/application/static/css/main.css +++ b/application/static/css/main.css @@ -1,4 +1,9 @@ body { font-family: 'Jost', sans-serif; + font-size: var(--bs-body-font-size); +} + +:root { + --bs-body-font-size: 1.5rem; } \ No newline at end of file diff --git a/application/static/img/steps-line.svg b/application/static/img/steps-line.svg new file mode 100644 index 0000000..8bfe665 --- /dev/null +++ b/application/static/img/steps-line.svg @@ -0,0 +1,43 @@ + diff --git a/application/views/advanced.html b/application/views/advanced.html deleted file mode 100644 index c7a56ec..0000000 --- a/application/views/advanced.html +++ /dev/null @@ -1,198 +0,0 @@ -{{define "content"}} -