nuke/lib/challenge/preact/preact.templ
fucksophie 02b9aebbe5
Some checks failed
Docker image builds / build (push) Failing after 4m22s
NUKE
2026-02-07 14:27:38 +02:00

28 lines
1 KiB
Text

package preact
import (
"git.sad.ovh/sophie/nuke"
"git.sad.ovh/sophie/nuke/lib/localization"
)
templ page(redir, challenge string, difficulty int, loc *localization.SimpleLocalizer) {
<div class="centered-div">
<div id="app">
<img id="image" style="width:100%;max-width:256px;" src={ nuke.BasePrefix + "/.within.website/x/cmd/nuke/static/img/pensive.webp?cacheBuster=" + nuke.Version }/>
<p id="status">{ loc.T("loading") }</p>
<p>{ loc.T("connection_security") }</p>
</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": nuke.BasePrefix + "/.within.website/x/cmd/nuke/static/img/pensive.webp?cacheBuster=" + nuke.Version,
})
@templ.ComponentFunc(renderAppJS)
<noscript>
{ loc.T("javascript_required") }
</noscript>
</div>
}