diff --git a/docs/docs/CHANGELOG.md b/docs/docs/CHANGELOG.md index 273d8d9..2527946 100644 --- a/docs/docs/CHANGELOG.md +++ b/docs/docs/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- The placeholder Anubis mascot has been replaced with a design by [CELPHASE](https://bsky.app/profile/celphase.bsky.social). - Allow iMessage's link preview fetcher through Anubis by default. - Added a periodic cleanup routine for the decaymap that removes expired entries, ensuring stale data is properly pruned. - Added a no-store Cache-Control header to the challenge page diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 42eaa98..4320504 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -76,7 +76,7 @@ const config: Config = { title: 'Anubis', logo: { alt: 'A happy jackal woman with brown hair and red eyes', - src: 'img/happy.webp', + src: 'img/favicon.webp', }, items: [ { diff --git a/docs/static/img/android-chrome-512x512.png b/docs/static/img/android-chrome-512x512.png index dddd387..cef21c5 100644 Binary files a/docs/static/img/android-chrome-512x512.png and b/docs/static/img/android-chrome-512x512.png differ diff --git a/docs/static/img/favicon.ico b/docs/static/img/favicon.ico index 593253c..fba094c 100644 Binary files a/docs/static/img/favicon.ico and b/docs/static/img/favicon.ico differ diff --git a/docs/static/img/favicon.webp b/docs/static/img/favicon.webp new file mode 100644 index 0000000..394a93e Binary files /dev/null and b/docs/static/img/favicon.webp differ diff --git a/docs/static/img/happy.webp b/docs/static/img/happy.webp index 31c78c8..40b979d 100644 Binary files a/docs/static/img/happy.webp and b/docs/static/img/happy.webp differ diff --git a/web/index.templ b/web/index.templ index b43e82c..ff3994f 100644 --- a/web/index.templ +++ b/web/index.templ @@ -66,6 +66,7 @@ templ base(title string, body templ.Component) { href="https://techaro.lol" >Techaro. Made with ❤️ in 🇨🇦.

+

Mascot design by CELPHASE.

@@ -114,7 +115,7 @@ templ errorPage(message string) { Try again @@ -137,8 +138,7 @@ templ bench() { Iters B - - +
diff --git a/web/index_templ.go b/web/index_templ.go index eb99b3a..69a1eaa 100644 --- a/web/index_templ.go +++ b/web/index_templ.go @@ -89,7 +89,7 @@ func base(title string, body templ.Component) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -126,7 +126,7 @@ func index() templ.Component { templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" + anubis.Version) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 82, Col: 18} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 83, Col: 18} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -140,7 +140,7 @@ func index() templ.Component { templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" + anubis.Version) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 88, Col: 18} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 89, Col: 18} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -153,7 +153,7 @@ func index() templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/js/main.mjs?cacheBuster=" + anubis.Version) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 91, Col: 116} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 92, Col: 116} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -193,9 +193,9 @@ func errorPage(message string) templ.Component { return templ_7745c5c3_Err } var templ_7745c5c3_Var10 string - templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/sad.webp?cacheBuster=" + anubis.Version) + templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/reject.webp?cacheBuster=" + anubis.Version) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 117, Col: 90} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 118, Col: 93} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) if templ_7745c5c3_Err != nil { @@ -208,7 +208,7 @@ func errorPage(message string) templ.Component { var templ_7745c5c3_Var11 string templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(message) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 119, Col: 14} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 120, Col: 14} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) if templ_7745c5c3_Err != nil { diff --git a/web/js/main.mjs b/web/js/main.mjs index 7a86504..a093c74 100644 --- a/web/js/main.mjs +++ b/web/js/main.mjs @@ -91,7 +91,7 @@ function showContinueBar(hash, nonce, t0, t1) { } }); } - + const ohNoes = ({ titleMsg, statusMsg, imageSrc }) => { title.innerHTML = titleMsg; status.innerHTML = statusMsg; @@ -103,7 +103,7 @@ function showContinueBar(hash, nonce, t0, t1) { ohNoes({ titleMsg: "Your context is not secure!", statusMsg: `Try connecting over HTTPS or let the admin know to set up HTTPS. For more information, see MDN.`, - imageSrc: imageURL("sad", anubisVersion), + imageSrc: imageURL("reject", anubisVersion), }); return; } @@ -116,7 +116,7 @@ function showContinueBar(hash, nonce, t0, t1) { // if (!videoWorks) { // title.innerHTML = "Oh no!"; // status.innerHTML = "Checks failed. Please check your browser's settings and try again."; - // image.src = imageURL("sad"); + // image.src = imageURL("reject"); // progress.style.display = "none"; // return; // } @@ -128,7 +128,7 @@ function showContinueBar(hash, nonce, t0, t1) { ohNoes({ titleMsg: `Missing feature ${name}`, statusMsg: msg, - imageSrc: imageURL("sad", anubisVersion), + imageSrc: imageURL("reject", anubisVersion), }); } } @@ -142,7 +142,7 @@ function showContinueBar(hash, nonce, t0, t1) { ohNoes({ titleMsg: "Internal error!", statusMsg: `Failed to fetch challenge config: ${err.message}`, - imageSrc: imageURL("sad", anubisVersion), + imageSrc: imageURL("reject", anubisVersion), }); throw err; }); @@ -152,14 +152,14 @@ function showContinueBar(hash, nonce, t0, t1) { ohNoes({ titleMsg: "Challenge error!", statusMsg: `Failed to resolve check algorithm. You may want to reload the page.`, - imageSrc: imageURL("sad", anubisVersion), + imageSrc: imageURL("reject", anubisVersion), }); return; } status.innerHTML = `Calculating...
Difficulty: ${rules.report_as}, `; progress.style.display = "inline-block"; - + // the whole text, including "Speed:", as a single node, because some browsers // (Firefox mobile) present screen readers with each node as a separate piece // of text. @@ -188,7 +188,7 @@ function showContinueBar(hash, nonce, t0, t1) { // apply a polynomial ease-out function to move faster in the beginning // and then slow down as things get increasingly unlikely. quadratic felt // the best in testing, but this may need adjustment in the future. - + const probability = Math.pow(1 - likelihood, iters); const distance = (1 - Math.pow(probability, 2)) * 100; progress["aria-valuenow"] = distance; @@ -215,7 +215,7 @@ function showContinueBar(hash, nonce, t0, t1) { if (userReadDetails) { const container = document.getElementById("progress"); - + // Style progress bar as a continue button container.style.display = "flex"; container.style.alignItems = "center"; @@ -231,7 +231,7 @@ function showContinueBar(hash, nonce, t0, t1) { container.style.width = "min(20rem, 90%)"; container.style.margin = "1rem auto 2rem"; container.innerHTML = "I've finished reading, continue →"; - + function onDetailsExpand() { const redir = window.location.href; window.location.replace( @@ -243,10 +243,10 @@ function showContinueBar(hash, nonce, t0, t1) { }), ); } - + container.onclick = onDetailsExpand; setTimeout(onDetailsExpand, 30000); - + } else { setTimeout(() => { const redir = window.location.href; @@ -260,12 +260,12 @@ function showContinueBar(hash, nonce, t0, t1) { ); }, 250); } - + } catch (err) { ohNoes({ titleMsg: "Calculation error!", statusMsg: `Failed to calculate challenge: ${err.message}`, - imageSrc: imageURL("sad", anubisVersion), + imageSrc: imageURL("reject", anubisVersion), }); } })(); \ No newline at end of file diff --git a/web/static/img/happy.webp b/web/static/img/happy.webp index 31c78c8..40b979d 100644 Binary files a/web/static/img/happy.webp and b/web/static/img/happy.webp differ diff --git a/web/static/img/pensive.webp b/web/static/img/pensive.webp index dc3dff1..e26faef 100644 Binary files a/web/static/img/pensive.webp and b/web/static/img/pensive.webp differ diff --git a/web/static/img/reject.webp b/web/static/img/reject.webp new file mode 100644 index 0000000..17bc939 Binary files /dev/null and b/web/static/img/reject.webp differ diff --git a/web/static/img/sad.webp b/web/static/img/sad.webp deleted file mode 100644 index 95bebb6..0000000 Binary files a/web/static/img/sad.webp and /dev/null differ