mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-04 02:08:59 -04:00

* feat: implement imprint/impressum support Closes #362 Signed-off-by: Xe Iaso <me@xeiaso.net> * chore(docs/anubis): enable an imprint Signed-off-by: Xe Iaso <me@xeiaso.net> * chore: spelling Signed-off-by: Xe Iaso <me@xeiaso.net> * docs: fix the end of the sentence, comment out a default impressum Signed-off-by: Xe Iaso <me@xeiaso.net> * docs: link back to impressum page Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net>
34 lines
847 B
Go
34 lines
847 B
Go
package web
|
|
|
|
import (
|
|
"github.com/a-h/templ"
|
|
|
|
"github.com/TecharoHQ/anubis/lib/policy/config"
|
|
)
|
|
|
|
func Base(title string, body templ.Component, impressum *config.Impressum) templ.Component {
|
|
return base(title, body, impressum, nil, nil)
|
|
}
|
|
|
|
func BaseWithChallengeAndOGTags(title string, body templ.Component, impressum *config.Impressum, challenge string, rules *config.ChallengeRules, ogTags map[string]string) (templ.Component, error) {
|
|
return base(title, body, impressum, struct {
|
|
Rules *config.ChallengeRules `json:"rules"`
|
|
Challenge string `json:"challenge"`
|
|
}{
|
|
Challenge: challenge,
|
|
Rules: rules,
|
|
}, ogTags), nil
|
|
}
|
|
|
|
func Index() templ.Component {
|
|
return index()
|
|
}
|
|
|
|
func ErrorPage(msg string, mail string) templ.Component {
|
|
return errorPage(msg, mail)
|
|
}
|
|
|
|
func Bench() templ.Component {
|
|
return bench()
|
|
}
|