From 94860d0e59d5238e989c8f0ba0dbd94462eec4ef Mon Sep 17 00:00:00 2001 From: Pacman Ghost Date: Thu, 27 Oct 2022 18:48:36 +1100 Subject: [PATCH] Updated documentation. --- README.md | 2 +- doc/features/global.css | 29 ++++++++++++++++++++++++++++- doc/features/index.html | 32 +++++++++++++++++++------------- 3 files changed, 48 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2b8e1aa..8a21df1 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ With [some work](doc/extend.md), you can also: After cloning the repo, you can either: - run it using Docker (recommended, run `./run-container.sh --port 5020`) -- run it from source (requires Python 3.8.7, install the module, run `asl_rulebook2/webapp/run_server.py`) +- run it from source (install the module, run `asl_rulebook2/webapp/run_server.py`) *NOTE: Run either command with `--help` to get help.* diff --git a/doc/features/global.css b/doc/features/global.css index a211d8c..b5b8a04 100644 --- a/doc/features/global.css +++ b/doc/features/global.css @@ -1,3 +1,31 @@ +body { margin: 0 ; padding:1em ; } + +#header { + position: fixed ; top: 1em ; height: 3em ; + width: calc(100% - 2em) ; +} +#header .caption { + display: inline-block ; + border: 1px solid black ; border-radius: 5px ; + padding: 4px 12px ; + font-size: 150% ; font-weight: bold ; + background: #ddd ; +} + +#content { + position: fixed ; top: 4.25em ; bottom: 1em ; + width: calc(100% - 2em) ; + overflow: auto ; +} + +h3 { + display: inline-block ; + margin: 0 ; + border: 1px solid #888 ; border-radius: 5px ; + padding: 2px 8px ; + color: #444 ; background: #f8f8f8 ; +} + .ruleid { font-family: monospace ; } .info { @@ -5,4 +33,3 @@ padding-left: 30px ; background: no-repeat url(info.png) ; font-size: 90% ; font-style: italic ; color: #444 ; } - diff --git a/doc/features/index.html b/doc/features/index.html index e5a449b..e8de6b2 100644 --- a/doc/features/index.html +++ b/doc/features/index.html @@ -10,11 +10,15 @@ -

-

ASL Rulebook 2 - -

-

Out-of-the-box, this program gives you full-text search over the ASLRB index. +

+ +
+ + +Out of the box, this program gives you full-text search over the ASLRB index.

It will jump to the exact position in the eASLRB PDF for a rule when you click on a search result.

And if the rule has any associated footnotes, these will be shown in a popup. @@ -24,8 +28,8 @@

-

Adding rules for other modules

+

Once you've got the program up and running, you can then think about extending it. It's a lot of work, but the results are insanely cool!

To the right, I've searched for "cellar", and the program has found results from Red Barricades. The rules for this are referenced in the ASLRB index, but the content is not yet in the MMP eASLRB.

However, I've installed a PDF scan of the rules, plus information about where each rule is within that PDF (a "targets file"), and so when I click on a search result, it seamlessly opens the Red Barricades PDF and jumps to that rule. @@ -38,12 +42,12 @@ You can also include third-party modules that are not referenced in the ASLRB in

I've also added information about chapters in the PDF, so that I can browse through them in the usual way:
-

+
-

Showing Q+A and errata

-Q+A and errata can also be included. This is a lot of work, but the results are amazing. If you click on a rule that has Q+A and/or errata associated with it, they will be shown, alongside the rule you're looking for. + +

Q+A and errata can also be included. This is a lot of work, but the results are amazing. If you click on a rule that has Q+A and/or errata associated with it, they will be shown, alongside the rule you're looking for.

Here, I've searched for "encircled", and the program has automatically shown Q+A and errata for rule A7.7.

Note that this errata is actually obsolete, since it's already been incorporated into the current MMP eASLRB, but it's shown here as an example.

@@ -54,19 +58,21 @@ Going back to the search results, you can see these Q+A entries included in ther
-

User annotations

-You can also add your own notes to the search engine. + +

You can also add your own notes to the search engine.

Here, I've added a note about what Majority Squad Type means, and a link back to the Game Squad post that talks about it.
-

Advanced Sequence Of Play

-Finally, the ASOP can also be included, with clickable links to each of the referenced rules. + +

Finally, the ASOP can also be included, with clickable links to each of the referenced rules.

ASOP entries are also included in search results:
+

+