Initial commit.

This commit is contained in:
mikestefanello 2021-12-03 06:11:01 -05:00
commit 63f43e568c
23 changed files with 1199 additions and 0 deletions

25
controllers/contact.go Normal file
View file

@ -0,0 +1,25 @@
package controllers
import (
"goweb/msg"
"github.com/labstack/echo/v4"
)
type Contact struct {
Controller
}
func (a *Contact) Get(c echo.Context) error {
p := NewPage(c)
p.Layout = "main"
p.Name = "contact"
p.Data = "This is the contact page"
return a.RenderPage(c, p)
}
func (a *Contact) Post(c echo.Context) error {
msg.Set(c, msg.Success, "Thank you for contacting us!")
msg.Set(c, msg.Info, "We will respond to you shortly.")
return a.Redirect(c, "home")
}