diff --git a/sites/www.toby.codes/main.go b/sites/www.toby.codes/main.go index 7ae7261..2511ef0 100644 --- a/sites/www.toby.codes/main.go +++ b/sites/www.toby.codes/main.go @@ -113,6 +113,10 @@ func main() { _ = renderer.HTML(w, http.StatusOK, "post", rendered) }) + mux.HandleFunc("/work", func(w http.ResponseWriter, req *http.Request) { + _ = renderer.HTML(w, http.StatusOK, "work", nil) + }) + mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { if req.URL.Path != "" && req.URL.Path != "/" { _ = renderer.HTML(w, http.StatusNotFound, "404", nil) diff --git a/sites/www.toby.codes/main_test.go b/sites/www.toby.codes/main_test.go index af3ad78..e95e6b1 100644 --- a/sites/www.toby.codes/main_test.go +++ b/sites/www.toby.codes/main_test.go @@ -96,6 +96,15 @@ var _ = Describe("Server", Ordered, func() { }) }) + Describe("/work", func() { + It("should return something", func() { + err, code, body := GetPage("/work") + Expect(err).NotTo(HaveOccurred()) + Expect(code).To(Equal(200)) + Expect(body).To(ContainSubstring(`Work with me`)) + }) + }) + Describe("/posts", func() { Context("when listing all posts", func() { It("should list posts", func() { diff --git a/sites/www.toby.codes/templates/layout.tmpl b/sites/www.toby.codes/templates/layout.tmpl index ccff167..6132dc7 100644 --- a/sites/www.toby.codes/templates/layout.tmpl +++ b/sites/www.toby.codes/templates/layout.tmpl @@ -17,6 +17,7 @@ About Posts + Work diff --git a/sites/www.toby.codes/templates/work.tmpl b/sites/www.toby.codes/templates/work.tmpl new file mode 100644 index 0000000..df24802 --- /dev/null +++ b/sites/www.toby.codes/templates/work.tmpl @@ -0,0 +1,7 @@ + + Work + + Work with me on individual projects/solutions. + Details coming soon + +
+ Work with me on individual projects/solutions. + Details coming soon +