48 lines
2.0 KiB
HTML
48 lines
2.0 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="referrer" content="no-referrer">
|
|
<meta name="robots" content="noindex, nofollow">
|
|
<title>An invite to a private chat</title>
|
|
<style>
|
|
:root { color-scheme: dark light; }
|
|
body { margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
|
|
background: #0d0a0c; color: #f2ece8; font: 17px/1.5 system-ui, sans-serif; }
|
|
main { max-width: 420px; padding: 32px 24px; text-align: center; }
|
|
h1 { font-weight: 600; font-size: 26px; line-height: 1.2; margin: 0 0 12px; }
|
|
p { margin: 0 0 20px; color: #cfc4bf; }
|
|
.button { display: block; padding: 14px 20px; margin: 8px 0 24px; border-radius: 12px;
|
|
background: #b3223a; color: #fff; text-decoration: none; font-weight: 600; font-size: 18px; }
|
|
.small { font-size: 14px; color: #a99d98; }
|
|
[hidden] { display: none; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<h1>You're invited to a private chat</h1>
|
|
<p>Someone who knows you invited you to chat in Amicitia, end to end encrypted.</p>
|
|
<a id="open" class="button" href="#">Open Amicitia</a>
|
|
<p id="missing" class="small">Don't have Amicitia yet? Ask the person who invited you how to get it, then tap their message again.</p>
|
|
<p id="bad" class="small" hidden>This invite link is incomplete. Ask for a new one.</p>
|
|
<!-- The CPAL-1.0 Exhibit B credit (LICENSE, section 14). Text only: this page loads and links nothing. -->
|
|
<p id="credit" class="small">Built on Domi · aula.marek-novak.cz<br>Copyright (c) 2026 Marek Novák</p>
|
|
</main>
|
|
<script>
|
|
(function () {
|
|
// The invite is in the fragment, which the browser never sends to this server.
|
|
var invite = location.hash.slice(1);
|
|
var open = document.getElementById("open");
|
|
if (!/^[A-Za-z0-9_-]{22}\.[A-Za-z0-9_-]{43}$/.test(invite)) {
|
|
open.hidden = true;
|
|
document.getElementById("missing").hidden = true;
|
|
document.getElementById("bad").hidden = false;
|
|
return;
|
|
}
|
|
open.href = "amicitia://invite?relay=" + location.origin + "#" + invite;
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|