From 869fa82f14d9f09ee8d4ef6fd32b9b52fdbefd5e Mon Sep 17 00:00:00 2001 From: mikestefanello Date: Fri, 3 Dec 2021 08:49:07 -0500 Subject: [PATCH] Switch to Bulma. --- controllers/about.go | 1 + controllers/contact.go | 1 + funcmap/funcmap.go | 2 +- views/components/messages.gohtml | 4 ++- views/layouts/main.gohtml | 56 +++++++++++++------------------- views/pages/contact.gohtml | 16 +++++++-- 6 files changed, 41 insertions(+), 39 deletions(-) diff --git a/controllers/about.go b/controllers/about.go index 1bd3b68..2b3e8dc 100644 --- a/controllers/about.go +++ b/controllers/about.go @@ -12,6 +12,7 @@ func (a *About) Get(c echo.Context) error { p := NewPage(c) p.Layout = "main" p.Name = "about" + p.Title = "About" p.Data = "This is the about page" return a.RenderPage(c, p) diff --git a/controllers/contact.go b/controllers/contact.go index 75e4fc0..d53da89 100644 --- a/controllers/contact.go +++ b/controllers/contact.go @@ -14,6 +14,7 @@ func (a *Contact) Get(c echo.Context) error { p := NewPage(c) p.Layout = "main" p.Name = "contact" + p.Title = "Contact us" p.Data = "This is the contact page" return a.RenderPage(c, p) } diff --git a/funcmap/funcmap.go b/funcmap/funcmap.go index ff136d4..18bc302 100644 --- a/funcmap/funcmap.go +++ b/funcmap/funcmap.go @@ -50,7 +50,7 @@ func File(filepath string) string { func Link(url, text, currentPath string, classes ...string) template.HTML { if currentPath == url { - classes = append(classes, "active") + classes = append(classes, "is-active") } html := fmt.Sprintf(`%s`, strings.Join(classes, " "), url, text) diff --git a/views/components/messages.gohtml b/views/components/messages.gohtml index 82f5d7d..70c99c8 100644 --- a/views/components/messages.gohtml +++ b/views/components/messages.gohtml @@ -14,5 +14,7 @@ {{end}} {{define "message"}} -
{{.Text}}
+
+
{{.Text}}
+
{{end}} \ No newline at end of file diff --git a/views/layouts/main.gohtml b/views/layouts/main.gohtml index b6c16e8..5d7ea45 100644 --- a/views/layouts/main.gohtml +++ b/views/layouts/main.gohtml @@ -5,45 +5,33 @@ {{ .AppName }}{{ if .Title }} | {{ .Title }}{{ end }} - + -