Saving state (unfinished styling on variant page)
[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 #menuContainer.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
11 label.drawer-toggle(for="drawer-control")
12 input#drawer-control.drawer(type="checkbox")
13 #menuBar
14 label.drawer-close(for="drawer-control")
15 a(href="/")
16 i.material-icons home
17 a(href="#rules" @click="setDisplay('rules')") Rules
18 a(href="#play" @click="setDisplay('game')") Play!
19 a(href="#problems" @click="setDisplay('problems')") Problems
20 #flagMenu(onClick="document.getElementById('modalLang').checked=true")
21 img(src="/images/flags/" + lang + ".svg")
22 #helpMenu(onClick="document.getElementById('modalHelp').checked=true")
23 .info-container
24 p Help
25 .row
26 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2(
27 v-show="display=='rules'")
28 my-rules
29 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2(
30 v-show="display=='game'")
31 my-game(v-bind:problem="problem")
32 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2(
33 v-show="display=='problems'")
34 my-problems(v-on:show-problem="showProblem($event)")
35 // (Some) Modals:
36 include modal-help.pug
37 include modal-lang.pug
38 input#modal-newgame.modal(type="checkbox")
39 div(role="dialog" aria-labelledby="newGameTxt")
40 .card.smallpad.small-modal
41 label#close-newgame.modal-close(for="modal-newgame")
42 h3#newGameTxt New game
43 p Waiting for opponent...
44
45 block javascripts
46 script(src="/javascripts/utils/misc.js")
47 script(src="/javascripts/utils/socket_url.js")
48 script(src="/javascripts/utils/array.js")
49 script(src="/javascripts/utils/md5.js")
50 script(src="/javascripts/utils/printDiagram.js")
51 script(src="/javascripts/utils/ajax.js")
52 script(src="/javascripts/utils/datetime.js")
53 script(src="/javascripts/base_rules.js")
54 script(src="/javascripts/variants/" + variant + ".js")
55 script.
56 const V = VariantRules; //because this variable is often used
57 const variant = "#{variant}";
58 const problemArray = !{JSON.stringify(problemArray)};
59 script(src="/javascripts/components/rules.js")
60 script(src="/javascripts/components/game.js")
61 script(src="/javascripts/components/problemSummary.js")
62 script(src="/javascripts/components/problems.js")
63 script(src="/javascripts/variant.js")