Add first todos page

This commit is contained in:
Achim Rohn
2025-09-18 10:17:14 +02:00
parent 1c42c7dd7a
commit 17eb9ec97d
2 changed files with 181 additions and 1 deletions
+13 -1
View File
@@ -12,6 +12,7 @@ import (
"ersteller-lib/starter/index"
"ersteller-lib/starter/login"
"ersteller-lib/starter/page"
"ersteller-lib/starter/todos"
"net/http"
"github.com/gorilla/sessions"
@@ -62,8 +63,17 @@ func CreateApi(environment env.Environment, db *ent.Client) http.Handler {
De: contact.ContactPathDe,
})
// Todos navigation item
todosActivePath := NewActivePath(map[Language]string{
En: "Todos",
De: "Todos",
}, LanguagePaths{
En: todos.TodosPath,
De: todos.TodosPathDe,
})
// Main navigation items
activePaths := []ActivePath{indexActivePath, aboutActivePath, contactActivePath}
activePaths := []ActivePath{indexActivePath, aboutActivePath, contactActivePath, todosActivePath}
// Footer navigation items (placeholder - can be customized)
footerPaths := []ActivePath{}
@@ -75,6 +85,8 @@ func CreateApi(environment env.Environment, db *ent.Client) http.Handler {
// Create About and Contact pages using the new packages
_ = about.NewPage(createPageFunc, server, &aboutActivePath)
_ = contact.NewPage(createPageFunc, server, &contactActivePath)
// Create Todos page
_ = todos.NewPage(createPageFunc, server, &todosActivePath, db)
// Create Login page
loginPaths := LanguagePaths{