aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2025-04-03 07:54:24 -0400
committerGitHub <noreply@github.com>2025-04-03 07:54:24 -0400
commitb14aa6a0c33c525d1dcbbfc9233a22ffd4a17c32 (patch)
treed1779bfab2a0f690fce1fa8a160f0c00b7775ae7
parent21a9d77788653f30fef4f3b37e8163a833f1a5d9 (diff)
downloadanubis-b14aa6a0c33c525d1dcbbfc9233a22ffd4a17c32.tar.xz
anubis-b14aa6a0c33c525d1dcbbfc9233a22ffd4a17c32.zip
Add new Anubis mascot (#204)
* Add new Anubis mascot Signed-off-by: Xe Iaso <me@xeiaso.net> * web: add artist credit to footer Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net>
-rw-r--r--docs/docs/CHANGELOG.md1
-rw-r--r--docs/docusaurus.config.ts2
-rw-r--r--docs/static/img/android-chrome-512x512.pngbin227688 -> 108267 bytes
-rw-r--r--docs/static/img/favicon.icobin15086 -> 15406 bytes
-rw-r--r--docs/static/img/favicon.webpbin0 -> 6028 bytes
-rw-r--r--docs/static/img/happy.webpbin59250 -> 30584 bytes
-rw-r--r--web/index.templ8
-rw-r--r--web/index_templ.go14
-rw-r--r--web/js/main.mjs28
-rw-r--r--web/static/img/happy.webpbin59250 -> 30584 bytes
-rw-r--r--web/static/img/pensive.webpbin49148 -> 28904 bytes
-rw-r--r--web/static/img/reject.webpbin0 -> 26974 bytes
-rw-r--r--web/static/img/sad.webpbin50802 -> 0 bytes
13 files changed, 27 insertions, 26 deletions
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
--- a/docs/static/img/android-chrome-512x512.png
+++ b/docs/static/img/android-chrome-512x512.png
Binary files differ
diff --git a/docs/static/img/favicon.ico b/docs/static/img/favicon.ico
index 593253c..fba094c 100644
--- a/docs/static/img/favicon.ico
+++ b/docs/static/img/favicon.ico
Binary files differ
diff --git a/docs/static/img/favicon.webp b/docs/static/img/favicon.webp
new file mode 100644
index 0000000..394a93e
--- /dev/null
+++ b/docs/static/img/favicon.webp
Binary files differ
diff --git a/docs/static/img/happy.webp b/docs/static/img/happy.webp
index 31c78c8..40b979d 100644
--- a/docs/static/img/happy.webp
+++ b/docs/static/img/happy.webp
Binary files 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</a>. Made with ❤️ in 🇨🇦.
</p>
+ <p>Mascot design by <a href="https://bsky.app/profile/celphase.bsky.social">CELPHASE</a>.</p>
</center>
</footer>
</main>
@@ -114,7 +115,7 @@ templ errorPage(message string) {
<img
id="image"
style="width:100%;max-width:256px;"
- src={ "/.within.website/x/cmd/anubis/static/img/sad.webp?cacheBuster=" + anubis.Version }
+ src={ "/.within.website/x/cmd/anubis/static/img/reject.webp?cacheBuster=" + anubis.Version }
/>
<p>{ message }.</p>
<button onClick="window.location.reload();">Try again</button>
@@ -137,8 +138,7 @@ templ bench() {
<th style="width:4rem">Iters B</th>
</tr>
</thead>
- <tbody id="results" style="padding-top:0.25rem;display:grid;grid-template-columns:subgrid;grid-auto-rows:min-content;grid-column:1/-1;row-gap:0.25rem;overflow-y:auto;font-variant-numeric:tabular-nums">
- </tbody>
+ <tbody id="results" style="padding-top:0.25rem;display:grid;grid-template-columns:subgrid;grid-auto-rows:min-content;grid-column:1/-1;row-gap:0.25rem;overflow-y:auto;font-variant-numeric:tabular-nums"></tbody>
</table>
<div class="centered-div">
<img
@@ -167,7 +167,7 @@ templ bench() {
<div style="margin-top:0.25rem;display:flex;justify-content:end">
<label for="compare-select" style="margin-right:0.5rem">Compare:</label>
<select id="compare-select" name="compare">
- <option value="NONE">-</option>
+ <option value="NONE">-</option>
</select>
</div>
</form>
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, "<footer><center><p>Protected by <a href=\"https://github.com/TecharoHQ/anubis\">Anubis</a> from <a href=\"https://techaro.lol\">Techaro</a>. Made with ❤️ in 🇨🇦.</p></center></footer></main></body></html>")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<footer><center><p>Protected by <a href=\"https://github.com/TecharoHQ/anubis\">Anubis</a> from <a href=\"https://techaro.lol\">Techaro</a>. Made with ❤️ in 🇨🇦.</p><p>Mascot design by <a href=\"https://bsky.app/profile/celphase.bsky.social\">CELPHASE</a>.</p></center></footer></main></body></html>")
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 <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#when_is_a_context_considered_secure">MDN</a>.`,
- 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...<br/>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
--- a/web/static/img/happy.webp
+++ b/web/static/img/happy.webp
Binary files differ
diff --git a/web/static/img/pensive.webp b/web/static/img/pensive.webp
index dc3dff1..e26faef 100644
--- a/web/static/img/pensive.webp
+++ b/web/static/img/pensive.webp
Binary files differ
diff --git a/web/static/img/reject.webp b/web/static/img/reject.webp
new file mode 100644
index 0000000..17bc939
--- /dev/null
+++ b/web/static/img/reject.webp
Binary files differ
diff --git a/web/static/img/sad.webp b/web/static/img/sad.webp
deleted file mode 100644
index 95bebb6..0000000
--- a/web/static/img/sad.webp
+++ /dev/null
Binary files differ