From ec78e5e1ae2258c6096b1be7a113de8df4dd2928 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Wed, 7 Dec 2022 22:12:46 -0500 Subject: [PATCH] Added titles; updated the items list view --- app/web/routes.go | 3 +++ views/item/list.html | 2 ++ 2 files changed, 5 insertions(+) diff --git a/app/web/routes.go b/app/web/routes.go index a9550b3..6d7acd3 100644 --- a/app/web/routes.go +++ b/app/web/routes.go @@ -10,16 +10,19 @@ import ( func RegisterRoutes(f *flamego.Flame) { // index route - landing page for the user f.Get("/", func(t template.Template, data template.Data) { + data["title"] = "Dashboard" t.HTML(http.StatusOK, "index") }) // item list route - lists all of the items in the database f.Group("/item", func() { f.Get("/list", func(t template.Template, data template.Data) { + data["title"] = "List of Inventory" t.HTML(http.StatusOK, "item/list") }) f.Get("/create", func(t template.Template, data template.Data) { + data["title"] = "Create New Item" t.HTML(http.StatusOK, "item/create") }) }) diff --git a/views/item/list.html b/views/item/list.html index b6d5bcb..0e0605d 100644 --- a/views/item/list.html +++ b/views/item/list.html @@ -5,6 +5,8 @@