templates: Add ingredients page

This commit is contained in:
Tom Wiesing 2022-10-21 18:12:23 +02:00
parent d64e6f8ec3
commit 7a53703aaa
No known key found for this signature in database
17 changed files with 109 additions and 43 deletions

View file

@ -39,20 +39,26 @@ func (info *Info) Handler(route string, context context.Context, io stream.IOStr
})
// add a handler for the index page
mux.Handle(route+"index", httpx.HTMLHandler[indexPageContext]{
Handler: info.indexPageAPI,
mux.Handle(route+"index", httpx.HTMLHandler[indexContext]{
Handler: info.index,
Template: indexTemplate,
})
// add a handler for the component page
mux.Handle(route+"components", httpx.HTMLHandler[componentsPageContext]{
Handler: info.componentsPageAPI,
mux.Handle(route+"components", httpx.HTMLHandler[componentContext]{
Handler: info.components,
Template: componentsTemplate,
})
// add a handler for the component page
mux.Handle(route+"ingredients/", httpx.HTMLHandler[ingredientsContext]{
Handler: info.ingredients,
Template: ingredientsTemplate,
})
// add a handler for the instance page
mux.Handle(route+"instance/", httpx.HTMLHandler[instancePageContext]{
Handler: info.instancePageAPI,
mux.Handle(route+"instance/", httpx.HTMLHandler[instanceContext]{
Handler: info.instance,
Template: instanceTemplate,
})