--- /dev/null
+//TODO: list problems as FEN (quickly rendered), by date, with possible filtering per variant(?)
+//click on a problem ==> land on variant page with mode==friend, FEN prefilled... ok
+
+// get 10 first problems, and buttons next<>previous send date + "before" or "after"
+// need database: sqlite !
+
+// form "new problem" fen(position/turn/flags[guess]), instructions, solution (mandatory)
+// ==> upload on server in sandbox
+//
+// Atomic rules, atomic game, atomic problems(list drawn position
+// + summary(first chars of instructions) + timedate)... one big Vue ? with components
+//
+// click on problem ==> masque problems, affiche game tab, launch new game Friend with
+// FEN + turn + flags + rappel instructions / solution on click sous l'échiquier
--- /dev/null
+new Vue({
+ el: "#variantPage",
+ data: { display: "" }, //do not show anything...
+ // TODO: listen event "show problem", avec le probleme stringifié en arg
+ // Alors: display=game, mode=friend, newGame(fen, turn, ...),
+ // et set Instructions+Soluce
+});
div(role="dialog")
#help.card
label.modal-close(for="modal-help")
- h3.blue.section Tips
- p.section
- span.conditional-jump
- | On a variant page, read the rules by clicking on the title
- | "<Variant> rules".
- span.conditional-jump
- | Try playing against a human: click the leftmost "new game" button.
- | ...Then, while waiting you can play against a (rather weak) bot
- | or a friend.
- // TODO? On the index page, try typing the first letters of a variant.
+ p.section First: watch #[a(href="/demo.webm") demo video] :)
h3.blue.section Comments
p.section.
All games start with a random assymetric position. #[br]
.container#variantPage
.row
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
- h4.rulesTitle.text-center(v-on:click="displayRules=!displayRules")
+ h4.rulesTitle.text-center(v-on:click="display='rules'")
| #{variant} Rules
- my-rules(v-show="displayRules")
+ my-rules(v-show="display=='rules'")
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
- my-game
+ h4.rulesTitle.text-center(v-on:click="display='game'")
+ | #{variant} Game
+ my-game(v-show="display=='game'")
+ .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
+ h4.rulesTitle.text-center(v-on:click="display='problems'")
+ | #{variant} Problems
+ my-game(v-show="display=='problems'")
block javascripts
script(src="/javascripts/utils/misc.js")
const variant = "#{variant}";
script(src="/javascripts/components/rules.js")
script(src="/javascripts/components/game.js")
- script.
- new Vue({
- el: "#variantPage",
- data: { displayRules: false },
- });
+ script(src="/javascripts/components/problems.js")