Refactor: Menu
This commit is contained in:
parent
a7309d5268
commit
7f820224ec
16 changed files with 103 additions and 92 deletions
|
|
@ -38,6 +38,10 @@ func (*Home) Routes() component.Routes {
|
|||
}
|
||||
}
|
||||
|
||||
var (
|
||||
menuHome = component.MenuItem{Title: "WissKI Distillery", Path: "/"}
|
||||
)
|
||||
|
||||
func (home *Home) HandleRoute(ctx context.Context, route string) (http.Handler, error) {
|
||||
// generate a default handler
|
||||
dflt, err := home.loadRedirect(ctx)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import (
|
|||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/server/assets"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/server/templating"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/status"
|
||||
|
|
@ -47,7 +46,7 @@ func (home *Home) publicHandler(ctx context.Context) http.Handler {
|
|||
tpl := publicTemplate.Prepare(
|
||||
home.Dependencies.Templating,
|
||||
templating.Crumbs(
|
||||
component.MenuItem{Title: "WissKI Distillery", Path: "/"},
|
||||
menuHome,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue