From 64f345c56447fb01e73c99827c028f6507a1514b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 6 May 2025 19:58:28 +0200 Subject: Docs improvements. --- docs/server/toolbox.md | 13 +++++++++++-- public/common/markdown.css | 21 +++++++++++++++++++++ public/docs/style.css | 28 ---------------------------- server.js | 2 +- 4 files changed, 33 insertions(+), 31 deletions(-) create mode 100644 public/common/markdown.css delete mode 100644 public/docs/style.css diff --git a/docs/server/toolbox.md b/docs/server/toolbox.md index f589901..eeb778f 100644 --- a/docs/server/toolbox.md +++ b/docs/server/toolbox.md @@ -9,7 +9,7 @@ These programs can be invoked from the command line by running the "rtt" command that is found in the "bin" directory. I suggest creating a symlink to the "rtt" command somewhere in your PATH. - ln -s ~/server/bin/rtt ~/.local/bin + ln -s ~/server/bin/rtt ~/.local/bin/rtt Alternatively, you can edit your .profile to add the server bin directory to your PATH. @@ -21,6 +21,8 @@ Check that the command works by running the command to create the database: ## Commands + usage: rtt [ arguments... ] + database management init -- create database @@ -42,15 +44,22 @@ module development game debugging + show -- show game state show-chat -- show game chat (for moderation) - show-game -- show game state object show-replay -- show game replay log + show-snap -- show game rewind snapshot miscellaneous tools update-covers -- generate cover thumbnails update-elo -- recalculate Elo ratings +archive database + + archive-backup -- backup replay data into archive + archive-prune -- prune replay data from live database + archive-restore -- restore replay data from archive + ## Miscellaneous The "tools" directory holds various useful bits and bobs. diff --git a/public/common/markdown.css b/public/common/markdown.css new file mode 100644 index 0000000..15b40cf --- /dev/null +++ b/public/common/markdown.css @@ -0,0 +1,21 @@ +h1, h2 { border-bottom: 2px dotted brown } +html { background-color: white; color: black; } +pre { background-color: #fafafa; } +pre { border: 1px solid gray; } +h1, h2, h3 { color: brown; } +html { margin: 0; padding: 0; line-height: 1.5; } +body { padding: 0rem 1rem; margin: 0 auto; max-width: 45rem; } +pre { min-width: fit-content; } +h1, h2, h3 { margin: 2rem 0 1rem 0; padding: 0; font-weight: normal; font-family: sans-serif; } +h1 { font-size: 1.8rem; } +h2 { font-size: 1.4rem; } +h3 { font-size: 1.2rem; } +p, ul, ol, dl, figure, pre, table { margin: 1rem 0; font-size: 1rem; } +ul ul, ul ol, ol ol, ol ul { margin: 0 } +blockquote { margins: 1rem 2rem; font-style: italic; } +pre, tt, code, kbd { font-size: 0.8rem; } +pre { padding: 1rem; } +kbd { background-color: whitesmoke; padding: 0px 4px; border: 1px solid #444; } +dd { margin-bottom: 0.5rem; } +hr { margin: 2rem 0; border: none; border-top: 2px dotted brown; } +article::after { display: block; margin: 2rem 0; color: brown; font-size: 1.8rem; text-align: center; content: "\2766"; } diff --git a/public/docs/style.css b/public/docs/style.css deleted file mode 100644 index 49c72c9..0000000 --- a/public/docs/style.css +++ /dev/null @@ -1,28 +0,0 @@ -h1, h2 { border-bottom: 2px dotted brown } -html { background-color: white; color: black; } -pre { background-color: #fafafa; } -pre { border: 1px solid gray; } -h1, h2, h3 { color: brown; } -html { margin: 0; padding: 0; line-height: 1.5; } -body { padding: 0rem 1rem; margin: 0 auto; max-width: 45rem; } -pre { min-width: fit-content; } -h1, h2, h3 { margin: 2rem 0 1rem 0; padding: 0; font-weight: normal; font-family: sans-serif; } -h1 { font-size: 1.8rem; } -h2 { font-size: 1.4rem; } -h3 { font-size: 1.2rem; } -p, ul, ol, dl, figure, pre, table { margin: 1rem 0; font-size: 1rem; } -ul ul, ul ol, ol ol, ol ul { margin: 0 } -blockquote { margins: 1rem 2rem; font-style: italic; } -pre, tt, code, kbd { font-size: 0.8rem; } -pre { padding: 1rem; } -kbd { background-color: whitesmoke; padding: 0px 4px; border: 1px solid #444; } -dd { margin-bottom: 0.5rem; } -hr { margin: 2rem 0; border: none; border-top: 2px dotted brown; } -article::after { - display: block; - margin: 2rem 0; - color: brown; - font-size: 1.8rem; - text-align: center; - content: "\2766"; -} diff --git a/server.js b/server.js index 7070442..00e4d4a 100644 --- a/server.js +++ b/server.js @@ -4088,7 +4088,7 @@ wss.on("connection", (socket, req) => { const docs_prolog = ` - + TITLE
` -- cgit v1.2.3