Add first todos page
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user