On the way to problems: saving state [not functional yet]
[vchess.git] / views / variant.pug
1 extends layout
2
3 block css
4 link(rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons")
5 link(rel="stylesheet" href="/stylesheets/variant.css")
6
7 block content
8 .container#variantPage
9 .row
10 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
11 h4.variantpage-title.text-center(v-on:click="toggleDisplay('rules')")
12 | #{variant} Rules
13 my-rules(v-show="display=='rules'")
14 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
15 h4.variantpage-title.text-center(v-on:click="toggleDisplay('game')")
16 | #{variant} Game
17 my-game(v-show="display=='game'")
18 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
19 h4.variantpage-title.text-center(v-on:click="toggleDisplay('problems')")
20 | #{variant} Problems
21 my-problems(v-show="display=='problems'")
22
23 block javascripts
24 script(src="/javascripts/utils/misc.js")
25 script(src="/javascripts/utils/socket_url.js")
26 script(src="/javascripts/utils/array.js")
27 script(src="/javascripts/utils/md5.js")
28 script(src="/javascripts/utils/printDiagram.js")
29 script(src="/javascripts/utils/ajax.js")
30 script(src="/javascripts/base_rules.js")
31 script(src="/javascripts/variants/" + variant + ".js")
32 script.
33 const VariantRules = #{variant}Rules;
34 const V = VariantRules; //because this variable is often used
35 const variant = "#{variant}";
36 const problemArray = !{JSON.stringify(problemArray)};
37 script(src="/javascripts/components/rules.js")
38 script(src="/javascripts/components/game.js")
39 script(src="/javascripts/components/problemSummary.js")
40 script(src="/javascripts/components/problems.js")
41 script(src="/javascripts/variant.js")