From: Benjamin Auder Date: Tue, 13 Nov 2018 16:44:49 +0000 (+0100) Subject: Add help modal on index. Adjustments in Checkered rules X-Git-Url: https://git.auder.net/variants/Bario/current/doc/html/pieces/cr.svg?a=commitdiff_plain;h=e7cfa68d5587f42be01974035c992317410268fe;p=vchess.git Add help modal on index. Adjustments in Checkered rules --- diff --git a/package-lock.json b/package-lock.json index 6a8e44c4..73b10dba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1918,12 +1918,14 @@ "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" @@ -1938,17 +1940,20 @@ "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", @@ -2065,7 +2070,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2077,6 +2083,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2091,6 +2098,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2098,12 +2106,14 @@ "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" @@ -2122,6 +2132,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2202,7 +2213,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2214,6 +2226,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2335,6 +2348,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/public/stylesheets/index.sass b/public/stylesheets/index.sass index 5d2033f9..24875234 100644 --- a/public/stylesheets/index.sass +++ b/public/stylesheets/index.sass @@ -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 diff --git a/public/stylesheets/variant.sass b/public/stylesheets/variant.sass index 51484109..2c892b5b 100644 --- a/public/stylesheets/variant.sass +++ b/public/stylesheets/variant.sass @@ -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 diff --git a/views/index.pug b/views/index.pug index 392e27a3..9ec27a39 100644 --- a/views/index.pug +++ b/views/index.pug @@ -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", diff --git a/views/rules/Checkered.pug b/views/rules/Checkered.pug index 600c3d55..23ea0f0e 100644 --- a/views/rules/Checkered.pug +++ b/views/rules/Checkered.pug @@ -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.