Add help modal on index. Adjustments in Checkered rules
authorBenjamin Auder <benjamin.auder@somewhere>
Tue, 13 Nov 2018 16:44:49 +0000 (17:44 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Tue, 13 Nov 2018 16:44:49 +0000 (17:44 +0100)
package-lock.json
public/stylesheets/index.sass
public/stylesheets/variant.sass
views/index.pug
views/rules/Checkered.pug

index 6a8e44c..73b10db 100644 (file)
         "balanced-match": {
           "version": "1.0.0",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
         "code-point-at": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "concat-map": {
           "version": "0.0.1",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "console-control-strings": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "core-util-is": {
           "version": "1.0.2",
         "inherits": {
           "version": "2.0.3",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "ini": {
           "version": "1.3.5",
           "version": "1.0.0",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
           "version": "3.0.4",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
         "minimist": {
           "version": "0.0.8",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "minipass": {
           "version": "2.2.4",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.1",
             "yallist": "^3.0.0"
           "version": "0.5.1",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
         "number-is-nan": {
           "version": "1.0.1",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "object-assign": {
           "version": "4.1.1",
           "version": "1.4.0",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "wrappy": "1"
           }
           "version": "1.0.2",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",
index 5d2033f..2487523 100644 (file)
@@ -6,3 +6,13 @@
   margin-top: 20px
   a
     color: #663300
+
+@media screen and (min-width: 800px)
+  .card
+    max-width: 600px
+
+.help
+  cursor: pointer
+
+.card > h3.section
+  color: blue
index 5148410..2c892b5 100644 (file)
@@ -1,6 +1,12 @@
 .container#variantPage
   padding: 0
 
+.warn
+  padding: 3px
+  color: red
+  background-color: lightgrey
+  font-weight: bold
+
 // https://stackoverflow.com/questions/5445491/height-equal-to-dynamic-width-css-fluid-layout
 figure.diagram-container > .diagram
   display: block
index 392e27a..9ec27a3 100644 (file)
@@ -8,6 +8,26 @@ block content
                .row
                        .col-sm-12
                                h1.text-center Welcome to v[ariant] chess club !
+                               h2.help.text-center(onClick="document.getElementById('modal-control').checked=true") Help ?
+                               input#modal-control.modal(type="checkbox")
+                               div(role="dialog")
+                                       .card
+                                               label.modal-close(for="modal-control")
+                                               h3.blue.section Modes
+                                               p.section.
+                                                       Each variant page offers two modes: against a human or computer opponent.
+                                                       The latter is not designed to play well: it is here to help learning the rules.
+                                                       When you beat the bot easily consider playing human opponents!
+                                               h3.blue.section Initial position
+                                               p.section.
+                                                       Whenever possible, all games start with a random assymetric position.
+                                                       This might be unapplicable for some variants: Moscow Chess at least (coming soon),
+                                                       Racing Kings probably too.
+                                               h3.blue.section Comments
+                                               p.section.
+                                                       Games are untimed, and played anonymously. This website lacks a user/challenge/chat/... system,
+                                                       both for technical reasons (difficult to maintain all that alone) and also a bit for
+                                                       focusing on the essential: the moves! :)
                .row
                        my-variant-summary(
                                v-for="(v,idx) in sortedCounts",
index 600c3d5..23ea0f0 100644 (file)
@@ -50,6 +50,8 @@ ul
 
 h2.stageDelimiter Stage 2
 
+p.warn This stage is unimplemented for now.
+
 p.
        During the game one of the two players can decide to take control of the checkered pieces.
        They thus become autonomous and vulnerable to being captured - stage 2 begins.
@@ -68,5 +70,4 @@ h3 Credits
 
 ul
        li The rules of Checkered Chess were thought up by Patrick Bernier and developed with the help of Benjamin Auder.
-       li Thanks to Bevis Martin for the initial english translation.
-       li Thanks also to Christian Poisson, Laurent Nouhaud and Frédéric Fradet.
+       li Thanks also to Olive Martin, Christian Poisson, Bevis Martin, Laurent Nouhaud and Frédéric Fradet.