aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-03-07 15:09:42 +0530
committerBobby <[email protected]>2026-03-07 15:09:42 +0530
commit8f8d41413ff775b6d721059783a0e2de4f90f50c (patch)
tree40923d049ee7df8b0bc90d74373c94cdd4d8b230 /pages
parent41926c10ea2e8496ce4b528262f5047ccbe6f155 (diff)
downloaddove-8f8d41413ff775b6d721059783a0e2de4f90f50c.tar.xz
dove-8f8d41413ff775b6d721059783a0e2de4f90f50c.zip
feat: add configuration management and server setup
- Implemented configuration file creation and loading in config.go. - Added default configuration content embedded in embed.go. - Introduced logging middleware for HTTP requests. - Created Makefile for build and setup automation. - Integrated Tailwind CSS and HTMX for frontend styling and interactivity. - Developed basic authentication flow with login and dashboard pages. - Enhanced error handling and user feedback in templates. - Updated dependencies in go.mod and go.sum.
Diffstat (limited to 'pages')
-rw-r--r--pages/dashboard.go2
-rw-r--r--pages/home.go4
2 files changed, 5 insertions, 1 deletions
diff --git a/pages/dashboard.go b/pages/dashboard.go
index 323cd1f..2fd1f1d 100644
--- a/pages/dashboard.go
+++ b/pages/dashboard.go
@@ -1,11 +1,13 @@
package pages
import (
+ "dove/utils/meta"
"dove/utils/shortcuts"
"github.com/gofiber/fiber/v2"
)
func Dashboard(context *fiber.Ctx) error {
+ meta.SetPageTitle(context, "Dashboard")
return shortcuts.Render(context, "dashboard", nil)
}
diff --git a/pages/home.go b/pages/home.go
index cbf5a5d..06f836e 100644
--- a/pages/home.go
+++ b/pages/home.go
@@ -2,6 +2,7 @@ package pages
import (
"dove/config"
+ "dove/utils/meta"
"dove/utils/shortcuts"
"github.com/gofiber/fiber/v2"
@@ -10,8 +11,9 @@ import (
func Home(context *fiber.Ctx) error {
switch config.AuthEnabled {
case true:
+ meta.SetPageTitle(context, "Login")
return shortcuts.Render(context, "auth/login", nil)
default:
- return shortcuts.Render(context, "dashboard", nil)
+ return shortcuts.Redirect(context, "dashboard.index")
}
}