50 lines
1.1 KiB
Go
50 lines
1.1 KiB
Go
package handlers
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
layouts "github.com/haydenhargreaves/Potion/internal/templates/layouts"
|
|
pages "github.com/haydenhargreaves/Potion/internal/templates/pages"
|
|
)
|
|
|
|
func LoginPage(ctx *gin.Context) {
|
|
title := "Potion - Login"
|
|
page := pages.LoginPage()
|
|
|
|
ctx.HTML(200, "", layouts.AppLayout(title, page))
|
|
}
|
|
|
|
func HomePage(ctx *gin.Context) {
|
|
title := "Potion - Home"
|
|
page := pages.HomePage()
|
|
|
|
ctx.HTML(200, "", layouts.AppLayout(title, page))
|
|
}
|
|
|
|
func FavoritesPage(ctx *gin.Context) {
|
|
title := "Potion - Favorites"
|
|
page := pages.FavoritesPage()
|
|
|
|
ctx.HTML(200, "", layouts.AppLayout(title, page))
|
|
}
|
|
|
|
func CreatePage(ctx *gin.Context) {
|
|
title := "Potion - Create"
|
|
page := pages.CreatePage()
|
|
|
|
ctx.HTML(200, "", layouts.AppLayout(title, page))
|
|
}
|
|
|
|
func ProfilePage(ctx *gin.Context) {
|
|
title := "Potion - Profile"
|
|
page := pages.ProfilePage()
|
|
|
|
ctx.HTML(200, "", layouts.AppLayout(title, page))
|
|
}
|
|
|
|
func ListPage(ctx *gin.Context) {
|
|
title := "Potion - Shopping List"
|
|
page := pages.ListPage()
|
|
|
|
ctx.HTML(200, "", layouts.AppLayout(title, page))
|
|
}
|