This commit is contained in:
parent
d2205b11a7
commit
02b9aebbe5
341 changed files with 1571 additions and 32574 deletions
|
|
@ -2,10 +2,10 @@ package web
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/TecharoHQ/anubis"
|
||||
"github.com/TecharoHQ/anubis/lib/config"
|
||||
"github.com/TecharoHQ/anubis/lib/localization"
|
||||
"github.com/TecharoHQ/anubis/xess"
|
||||
"git.sad.ovh/sophie/nuke"
|
||||
"git.sad.ovh/sophie/nuke/lib/config"
|
||||
"git.sad.ovh/sophie/nuke/lib/localization"
|
||||
"git.sad.ovh/sophie/nuke/xess"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ templ base(title string, body templ.Component, impressum *config.Impressum, chal
|
|||
<html lang={ localizer.GetLang() }>
|
||||
<head>
|
||||
<title>{ title }</title>
|
||||
<link rel="stylesheet" href={ anubis.BasePrefix + xess.URL }/>
|
||||
<link rel="stylesheet" href={ nuke.BasePrefix + xess.URL }/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="robots" content="noindex,nofollow"/>
|
||||
for key, value := range ogTags {
|
||||
|
|
@ -58,31 +58,31 @@ templ base(title string, body templ.Component, impressum *config.Impressum, chal
|
|||
transition: width 0.25s ease-in;
|
||||
}
|
||||
</style>
|
||||
@templ.JSONScript("anubis_version", anubis.Version)
|
||||
@templ.JSONScript("anubis_challenge", challenge)
|
||||
@templ.JSONScript("anubis_base_prefix", anubis.BasePrefix)
|
||||
@templ.JSONScript("anubis_public_url", anubis.PublicUrl)
|
||||
@templ.JSONScript("nuke_version", nuke.Version)
|
||||
@templ.JSONScript("nuke_challenge", challenge)
|
||||
@templ.JSONScript("nuke_base_prefix", nuke.BasePrefix)
|
||||
@templ.JSONScript("nuke_public_url", nuke.PublicUrl)
|
||||
</head>
|
||||
<body id="top">
|
||||
@honeypotLink(anubis.BasePrefix + fmt.Sprintf("%shoneypot/%s/init", anubis.APIPrefix, uuid.NewString()))
|
||||
@honeypotLink(nuke.BasePrefix + fmt.Sprintf("%shoneypot/%s/init", nuke.APIPrefix, uuid.NewString()))
|
||||
<main>
|
||||
<h1 id="title" class="centered-div">{ title }</h1>
|
||||
@body
|
||||
<footer>
|
||||
<div class="centered-div">
|
||||
<p>
|
||||
{ localizer.T("protected_by") } <a href="https://github.com/TecharoHQ/anubis">Anubis</a> { localizer.T("protected_from") } <a
|
||||
href="https://techaro.lol"
|
||||
>Techaro</a>. { localizer.T("made_with") }.
|
||||
{ localizer.T("protected_by") } <a href="https://git.sad.ovh/sophie/nuke">Nuke</a> { localizer.T("protected_from") } <a
|
||||
href="sad.ovh"
|
||||
>sad.ovh</a>. { localizer.T("made_with") }.
|
||||
</p>
|
||||
<p>{ localizer.T("mascot_design") } <a href="https://bsky.app/profile/celphase.bsky.social">{ localizer.T("celphase") }</a>.</p>
|
||||
if impressum != nil {
|
||||
<p>
|
||||
@templ.Raw(impressum.Footer)
|
||||
-- <a href={ templ.SafeURL(anubis.BasePrefix + fmt.Sprintf("%simprint", anubis.APIPrefix)) }>Imprint</a>
|
||||
-- <a href={ templ.SafeURL(nuke.BasePrefix + fmt.Sprintf("%simprint", nuke.APIPrefix)) }>Imprint</a>
|
||||
</p>
|
||||
}
|
||||
<p>{ localizer.T("version_info") } <code>{ anubis.Version }</code>.</p>
|
||||
<p>{ localizer.T("version_info") } <code>{ nuke.Version }</code>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -92,7 +92,7 @@ templ base(title string, body templ.Component, impressum *config.Impressum, chal
|
|||
|
||||
templ errorPage(message, mail, code string, localizer *localization.SimpleLocalizer) {
|
||||
<div class="centered-div">
|
||||
<img id="image" alt="Sad Anubis" style="width:100%;max-width:256px;" src={ anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/reject.webp?cacheBuster=" + anubis.Version }/>
|
||||
<img id="image" alt="Sad Nuke" style="width:100%;max-width:256px;" src={ nuke.BasePrefix + "/.within.website/x/cmd/nuke/static/img/reject.webp?cacheBuster=" + nuke.Version }/>
|
||||
<p>{ message }.</p>
|
||||
if code != "" {
|
||||
<code><pre>{ code }</pre></code>
|
||||
|
|
@ -115,8 +115,8 @@ templ StaticHappy(localizer *localization.SimpleLocalizer) {
|
|||
<img
|
||||
style="display:none;"
|
||||
style="width:100%;max-width:256px;"
|
||||
src={ "/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" +
|
||||
anubis.Version }
|
||||
src={ "/.within.website/x/cmd/nuke/static/img/happy.webp?cacheBuster=" +
|
||||
nuke.Version }
|
||||
/>
|
||||
<p>{ localizer.T("static_check_endpoint") }</p>
|
||||
</div>
|
||||
|
|
@ -145,9 +145,9 @@ templ bench(localizer *localization.SimpleLocalizer) {
|
|||
></tbody>
|
||||
</table>
|
||||
<div class="centered-div">
|
||||
<img id="image" style="width:100%;max-width:256px;" src={ anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" + anubis.Version }/>
|
||||
<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" style="max-width:256px">{ localizer.T("loading") }</p>
|
||||
<script async type="module" src={ anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/js/bench.mjs?cacheBuster=" + anubis.Version }></script>
|
||||
<script async type="module" src={ nuke.BasePrefix + "/.within.website/x/cmd/nuke/static/js/bench.mjs?cacheBuster=" + nuke.Version }></script>
|
||||
<div id="sparkline"></div>
|
||||
<noscript>
|
||||
<p>{ localizer.T("benchmark_requires_js") }</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue