custom: Add new footer template and context

This commit is contained in:
Tom Wiesing 2023-01-06 19:56:13 +01:00
parent 009d649ea6
commit bda763725e
No known key found for this signature in database
18 changed files with 197 additions and 33 deletions

View file

@ -3,9 +3,11 @@ package home
import (
"context"
"fmt"
"html/template"
"net/http"
"github.com/FAU-CDI/wisski-distillery/internal/dis/component"
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/control/static/custom"
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/instances"
"github.com/FAU-CDI/wisski-distillery/pkg/lazy"
)
@ -14,11 +16,13 @@ type Home struct {
component.Base
Dependencies struct {
Instances *instances.Instances
Custom *custom.Custom
}
redirect lazy.Lazy[*Redirect]
instanceNames lazy.Lazy[map[string]struct{}]
homeBytes lazy.Lazy[[]byte]
homeTemplate lazy.Lazy[*template.Template]
}
var (