summaryrefslogtreecommitdiff
path: root/internal/router/root.go
diff options
from:
to:
context:
space:
mode:
authorGravatar Saya Andy <145215889+SayaAndy@users.noreply.github.com> 2025-08-19 16:05:37 +0700
committerGravatar GitHub <noreply@github.com> 2025-08-19 16:05:37 +0700
commit0d8aa40ce197b10e32f2e6cc378188b71a83689f (patch)
tree0b3ed0e352836ede51e82ceaff8c9386e934802c /internal/router/root.go
parent6401cf603f598a8008c69a14fe58f460009180a7 (diff)
parent53923cf49f46041c82bbb0cbc155e4bdcc9e1a5d (diff)
downloadweb-0d8aa40ce197b10e32f2e6cc378188b71a83689f.tar.gz
web-0d8aa40ce197b10e32f2e6cc378188b71a83689f.zip
v0.6.1v0.6.1
feat(map): enable marker clustering via plugin refactor: move template manager definition to router package
Diffstat (limited to 'internal/router/root.go')
-rw-r--r--internal/router/root.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/router/root.go b/internal/router/root.go
index f5be6cb..f4a0692 100644
--- a/internal/router/root.go
+++ b/internal/router/root.go
@@ -4,11 +4,14 @@ import (
"log/slog"
"github.com/SayaAndy/saya-today-web/config"
- "github.com/SayaAndy/saya-today-web/internal/templatemanager"
"github.com/gofiber/fiber/v2"
)
-func Root(tm *templatemanager.TemplateManager, localeCfg []config.AvailableLanguageConfig) func(c *fiber.Ctx) error {
+func init() {
+ tm.Add("index", "views/index.html")
+}
+
+func Root(localeCfg []config.AvailableLanguageConfig) func(c *fiber.Ctx) error {
return func(c *fiber.Ctx) error {
content, err := tm.Render("index", fiber.Map{
"AvailableLanguages": localeCfg,