mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-15 12:58:45 +00:00
feat: add 'proof of React' challenge
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
21
lib/challenge/preact/preact.templ
Normal file
21
lib/challenge/preact/preact.templ
Normal file
@@ -0,0 +1,21 @@
|
||||
package preact
|
||||
|
||||
import (
|
||||
"github.com/TecharoHQ/anubis"
|
||||
"github.com/TecharoHQ/anubis/lib/localization"
|
||||
)
|
||||
|
||||
templ page(redir, challenge string, difficulty int, loc *localization.SimpleLocalizer) {
|
||||
<div class="centered-div">
|
||||
<div id="app"></div>
|
||||
@templ.JSONScript("preact_info", map[string]any{
|
||||
"redir": redir,
|
||||
"challenge": challenge,
|
||||
"difficulty": difficulty,
|
||||
"connection_security_message": loc.T("connection_security"),
|
||||
"loading_message": loc.T("loading"),
|
||||
"pensive_url": anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" + anubis.Version,
|
||||
})
|
||||
@templ.ComponentFunc(renderAppJS)
|
||||
</div>
|
||||
}
|
||||
Reference in New Issue
Block a user