aboutsummaryrefslogtreecommitdiff
path: root/web/index.templ
diff options
context:
space:
mode:
authorRyan Cao <70191398+ryanccn@users.noreply.github.com>2025-04-18 04:06:37 +0000
committerGitHub <noreply@github.com>2025-04-18 00:06:37 -0400
commitf844dba3dcfc0c51bcc72bfe9707ceec0c09b7ed (patch)
treedda8006379d358741d0d679c860cb0627b3b6090 /web/index.templ
parent736c3ade0944532690098c4f8a7fab0d92420a09 (diff)
downloadanubis-f844dba3dcfc0c51bcc72bfe9707ceec0c09b7ed.tar.xz
anubis-f844dba3dcfc0c51bcc72bfe9707ceec0c09b7ed.zip
perf: embed challenge data in HTML (#279)
Diffstat (limited to 'web/index.templ')
-rw-r--r--web/index.templ5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/index.templ b/web/index.templ
index 01d12b6..4eb1d45 100644
--- a/web/index.templ
+++ b/web/index.templ
@@ -5,7 +5,7 @@ import (
"github.com/TecharoHQ/anubis/xess"
)
-templ base(title string, body templ.Component, ogTags map[string]string) {
+templ base(title string, body templ.Component, challenge any, ogTags map[string]string) {
<!DOCTYPE html>
<html lang="en">
<head>
@@ -56,6 +56,9 @@ templ base(title string, body templ.Component, ogTags map[string]string) {
}
</style>
@templ.JSONScript("anubis_version", anubis.Version)
+ if challenge != nil {
+ @templ.JSONScript("anubis_challenge", challenge)
+ }
</head>
<body id="top">