Files
burrow-server/public/commands.html
T

260 lines
12 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Chat commands</title>
<link rel="icon" type="image/png" href="/logo-square.png">
<style>
/* black and white throughout, in the game's own text font: the look of
the client (its app/index.html). Nothing is said by colour: what
went wrong is white with a "!" before it, and what cannot be undone
has a dashed edge. */
@font-face { font-family: "DigitalDelivery"; font-weight: 400; src: url("/fonts/CCDigitalDelivery-Regular.otf") format("opentype"); }
@font-face { font-family: "DigitalDelivery"; font-weight: 700; src: url("/fonts/CCDigitalDelivery-Bold.otf") format("opentype"); }
:root {
color-scheme: dark;
--bg: #000;
--panel: #0d0d0d;
--raised: #1a1a1a;
--line: #2e2e2e;
--text: #fff;
--muted: #8c8c8c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { background: #fff; color: #000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 3px solid var(--bg); }
body {
margin: 0;
padding: 32px 16px 48px;
background: var(--bg);
color: var(--text);
font: 15px/1.4 "DigitalDelivery", system-ui, "Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: 0.01em; }
h2 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
p { margin: 0 0 12px; color: var(--muted); }
label { display: block; margin: 12px 0 5px; color: var(--muted); font-size: 13px; }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }
input, select, textarea {
font: inherit;
color: var(--text);
background: var(--panel);
border: 1px solid var(--line);
border-radius: 14px;
padding: 9px 14px 10px;
transition: border-color 0.12s;
}
input::placeholder, textarea::placeholder { color: #555; }
input:hover, select:hover, textarea:hover { border-color: #555; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text); }
input:disabled, select:disabled, textarea:disabled { opacity: 0.4; }
select:not([multiple]) {
-webkit-appearance: none;
appearance: none;
padding-right: 34px;
background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
background-position: calc(100% - 19px) 55%, calc(100% - 14px) 55%;
background-size: 5px 5px;
background-repeat: no-repeat;
}
input[type="checkbox"] {
-webkit-appearance: none;
appearance: none;
flex: none;
width: 18px;
height: 18px;
margin: 0 6px 0 0;
padding: 0;
vertical-align: -4px;
border: 1px solid #666;
border-radius: 6px;
background: var(--panel);
cursor: pointer;
}
input[type="checkbox"]:hover { border-color: var(--text); }
input[type="checkbox"]:checked {
border-color: var(--text);
background: var(--text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.5l3 3 6-7' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
button {
font: inherit;
color: var(--text);
background: none;
border: 1px solid var(--line);
border-radius: 999px;
padding: 7px 16px 8px;
cursor: pointer;
white-space: nowrap;
transition: background 0.12s, border-color 0.12s, color 0.12s;
}
button:hover { background: var(--raised); border-color: #555; }
button:disabled { opacity: 0.45; cursor: default; }
button:focus-visible, a:focus-visible, input[type="checkbox"]:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
button.primary { font-weight: 700; color: #000; background: var(--text); border-color: var(--text); }
button.primary:hover { background: #d9d9d9; border-color: #d9d9d9; }
button.primary:disabled, button.primary:disabled:hover { background: #3a3a3a; border-color: #3a3a3a; color: #000; }
button.danger { border-style: dashed; border-color: #666; }
button.danger:hover { border-style: solid; border-color: var(--text); }
.status, #status { min-height: 20px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.status.bad, #status.bad { color: var(--text); }
.status.bad::before, #status.bad::before, .notice::before {
content: "!";
display: inline-block;
width: 17px;
height: 17px;
margin-right: 7px;
border-radius: 50%;
background: var(--text);
color: #000;
font-weight: 700;
line-height: 17px;
text-align: center;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.wrap { max-width: 820px; margin: 0 auto; }
header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
header h1 { flex: 1; }
section { padding: 20px; margin-bottom: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; }
td { padding: 8px 8px 8px 0; border-top: 1px solid var(--line); vertical-align: top; color: var(--muted); }
tr:first-child td { border-top: 0; }
td:first-child { width: 42%; }
/* what to type keeps a fixed-width face, as it is typed letter by letter. */
code { font: 13px/1.5 ui-monospace, Consolas, monospace; color: var(--text); background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 1px 7px; white-space: nowrap; }
td code { cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s; }
td code:hover, td code:focus { outline: none; border-color: var(--text); }
td code.copied { color: #000; background: var(--text); border-color: var(--text); }
code i { font-style: normal; color: var(--muted); }
td code.copied i { color: #000; }
#copied { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); margin: 0; padding: 6px 18px 7px; border-radius: 999px; background: var(--text); color: #000; font-size: 13px; font-weight: 700; }
@media (max-width: 560px) { td, td:first-child { display: block; width: auto; padding: 4px 0; border-top: 0; } tr td:first-child { border-top: 1px solid var(--line); padding-top: 10px; } tr:first-child td:first-child { border-top: 0; } code { white-space: normal; } }
.logo { display: block; height: 72px; margin: 0 0 12px; }
.mark { height: 34px; flex: none; }
</style>
</head>
<body>
<div class="wrap">
<header>
<img class="mark" src="/logo.png" alt="">
<h1>Chat commands</h1>
<a href="/account">Your account</a>
</header>
<section>
<h2>Getting around</h2>
<table>
<tr><td><code>!go <i>PLACE</i></code></td><td>Go to a land or room.</td></tr>
<tr><td><code>!go list</code></td><td>Places you can go.</td></tr>
</table>
</section>
<section>
<h2>Other players</h2>
<table>
<tr><td><code>!online</code></td><td>Who is online.</td></tr>
<tr><td><code>!where <i>BUDDY</i></code></td><td>Where a buddy is.</td></tr>
<tr><td><code>!w <i>BUDDY</i> <i>MESSAGE</i></code></td><td>Whisper to a buddy.</td></tr>
<tr><td><code>!hideblocked on</code></td><td>Hide blocked players.</td></tr>
<tr><td><code>!hideblocked off</code></td><td>Show them again.</td></tr>
</table>
</section>
<section>
<h2>Outfits</h2>
<table>
<tr><td><code>!outfit save <i>NAME</i></code></td><td>Save your outfit.</td></tr>
<tr><td><code>!outfit wear <i>NAME</i></code></td><td>Wear a saved outfit.</td></tr>
<tr><td><code>!outfit list</code></td><td>Your saved outfits.</td></tr>
<tr><td><code>!outfit delete <i>NAME</i></code></td><td>Delete an outfit.</td></tr>
<tr><td><code>!outfit off</code></td><td>Take everything off.</td></tr>
<tr><td><code>!outfit undo</code></td><td>Undo the last change.</td></tr>
</table>
</section>
<section>
<h2>Dens</h2>
<table>
<tr><td><code>!den save <i>NAME</i></code></td><td>Save your den layout.</td></tr>
<tr><td><code>!den load <i>NAME</i></code></td><td>Load a saved layout.</td></tr>
<tr><td><code>!den list</code></td><td>Your saved layouts.</td></tr>
<tr><td><code>!den delete <i>NAME</i></code></td><td>Delete a layout.</td></tr>
<tr><td><code>!den copy</code></td><td>Copy the den you are in.</td></tr>
<tr><td><code>!den undo</code></td><td>Undo Clear Den.</td></tr>
<tr><td><code>!den name <i>NAME</i></code></td><td>Name your den.</td></tr>
<tr><td><code>!den name off</code></td><td>Remove the name.</td></tr>
<tr><td><code>!music all</code></td><td>Get every music track.</td></tr>
</table>
</section>
<section>
<h2>Themes</h2>
<table>
<tr><td><code>!theme list</code></td><td>All themes.</td></tr>
<tr><td><code>!theme here <i>NAME</i></code></td><td>Theme this room.</td></tr>
<tr><td><code>!theme here off</code></td><td>Remove it.</td></tr>
<tr><td><code>!theme random on</code></td><td>A random theme each login.</td></tr>
<tr><td><code>!theme random off</code></td><td>Stop that.</td></tr>
</table>
</section>
<section>
<h2>Other</h2>
<table>
<tr><td><code>!again <i>N</i></code></td><td>Buy your last purchase N more times.</td></tr>
<tr><td><code>!mail clear</code></td><td>Delete read Jam-A-Grams.</td></tr>
<tr><td><code>!become <i>NAME</i></code></td><td>Look like an alpha.</td></tr>
<tr><td><code>!become list</code></td><td>Who you can become.</td></tr>
<tr><td><code>!become off</code></td><td>Back to your animal.</td></tr>
</table>
</section>
</div>
<p id="copied" role="status" hidden>Copied</p>
<script>
"use strict";
// a click copies the command up to its first placeholder
const said = document.getElementById("copied");
let hide = 0;
const copy = text => (navigator.clipboard && window.isSecureContext
? navigator.clipboard.writeText(text)
: new Promise((done, failed) => {
const box = document.createElement("textarea");
box.value = text;
box.style.position = "fixed";
box.style.opacity = "0";
document.body.appendChild(box);
box.select();
const copied = document.execCommand("copy");
box.remove();
(copied ? done : failed)();
}));
for (const command of document.querySelectorAll("td code")) {
command.tabIndex = 0;
command.setAttribute("role", "button");
command.title = "Copy";
const blank = command.querySelector("i");
const text = blank ? command.textContent.slice(0, command.textContent.indexOf(blank.textContent)) : command.textContent;
const act = () => copy(text).then(() => {
command.classList.add("copied");
said.hidden = false;
clearTimeout(hide);
hide = setTimeout(() => { said.hidden = true; }, 1200);
setTimeout(() => command.classList.remove("copied"), 600);
}, () => {});
command.addEventListener("click", act);
command.addEventListener("keydown", event => {
if (event.key === "Enter" || event.key === " ") {
event.preventDefault();
act();
}
});
}
</script>
</body>
</html>