From cb73d0710b0eb84d4f788ff9b1d36ed0b02bf970 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 20 Aug 2024 11:19:18 +0200 Subject: Use xmp tag for more docs. --- public/docs/install.html | 12 ++++++------ public/docs/module.html | 12 +++++++++--- public/docs/production.html | 6 +++--- public/docs/style.css | 5 +++-- 4 files changed, 21 insertions(+), 14 deletions(-) (limited to 'public') diff --git a/public/docs/install.html b/public/docs/install.html index a448db8..1b227ba 100644 --- a/public/docs/install.html +++ b/public/docs/install.html @@ -40,9 +40,9 @@ npm install

Initialize the database: -

-sqlite3 db < schema.sql
-
+ +sqlite3 db < schema.sql +

Install the modules @@ -62,9 +62,9 @@ git clone https://git.rally-the-troops.com/modules/field-cloth-gold public/field

Register it in the database: -

-sqlite3 db < public/field-cloth-gold/title.sql
-
+ +sqlite3 db < public/field-cloth-gold/title.sql +

Start the server diff --git a/public/docs/module.html b/public/docs/module.html index d392b3e..c75020f 100644 --- a/public/docs/module.html +++ b/public/docs/module.html @@ -67,7 +67,8 @@ The game landing page on the server has a bit of text introducing the game, and

Put the about text in the about.html file. -

<p> +<xmp> +<p> Dolorum fugiat dolor temporibus. Debitis ea non illo sed debitis cupiditate ipsum illo. Eos eos molestias illo quisquam dicta. @@ -87,7 +88,8 @@ However, if your game uses custom options these need to be added as form fields. <p> Add a create.html file to inject form fields into the create game page. -<xmp><p> +<xmp> +<p> Player count: <br> <select name="players"> @@ -113,7 +115,8 @@ Client HTML <p> The game needs a play.html file using the following template: -<xmp><!doctype html> +<xmp> +<!doctype html> <html lang="en"> <head> <meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, interactive-widget=resizes-content, viewport-fit=cover"> @@ -267,6 +270,9 @@ Either a list of roles, or a function returning a list of roles. <p> Create the initial game object with a random number seed, scenario, and options object. +<p> +The "setup" function takes three parameters provided by the server: the random seed (generated by the server when starting the game), the scenario (a string with the scenario name) and options (a plain javascript object with key/value pairs for the options chosen by the user when creating the game). + <p> The options object is filled in with values from the create.html form fields. diff --git a/public/docs/production.html b/public/docs/production.html index abb0b7c..2cb82a0 100644 --- a/public/docs/production.html +++ b/public/docs/production.html @@ -50,7 +50,7 @@ Customize settings <p> The server reads its settings from the .env file. -<pre> +<xmp> NODE_ENV=production SITE_NAME=Example @@ -61,7 +61,7 @@ HTTP_HOST=localhost HTTP_PORT=8080 # Enable mail notifications -MAIL_FROM=Example Notifications &lt;notifications@example.com&gt; +MAIL_FROM=Example Notifications <notifications@example.com> MAIL_HOST=localhost MAIL_PORT=25 @@ -70,7 +70,7 @@ WEBHOOKS=1 # Enable forum FORUM=1 -</pre> +

Expose the server to the internet diff --git a/public/docs/style.css b/public/docs/style.css index a7bc776..845f9e3 100644 --- a/public/docs/style.css +++ b/public/docs/style.css @@ -13,8 +13,9 @@ h1 { font-size: 1.8rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.2rem; } p, ul, ol, dl, figure, blockquote, xmp, pre, table { margin: 1rem 0; font-size: 1rem; } -xmp, pre { font-size: 0.8rem; padding: 1rem 1rem; } -tt, code, kbd { font-size: 0.8rem; } +xmp, pre, tt, code, kbd { font-size: 0.8rem; } +pre { padding: 1rem; } +xmp { padding: 0rem 1rem 1rem 1rem; } kbd { background-color: whitesmoke; padding: 0px 4px; border: 1px solid #444; } dd { margin-bottom: 0.5rem; } -- cgit v1.2.3