Improve style on variant page; TODO: problems, Crazyhouse
[vchess.git] / views / variant.pug
CommitLineData
1d184b4c
BA
1extends layout
2
3block css
92342261
BA
4 link(rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons")
5 link(rel="stylesheet" href="/stylesheets/variant.css")
1d184b4c
BA
6
7block content
8 .container#variantPage
e6dcb115 9 .row
d449ae46 10 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
9a3c9f79
BA
11 label.drawer-toggle(for="drawer-control")
12 input#drawer-control.drawer(type="checkbox")
13 #menuBar
14 label.drawer-close(for="drawer-control")
d449ae46 15 a#homeLink.conditional-jump(href="/")
e6dcb115 16 i.material-icons home
d449ae46
BA
17 .info-container
18 a.conditional-jump(href="#rules" @click="setDisplay('rules')")
19 | Rules
20 a.conditional-jump(href="#play" @click="setDisplay('game')")
21 | Play!
22 a.conditional-jump(href="#problems" @click="setDisplay('problems')")
23 | Problems
24 #flagMenu.conditional-jump(
25 onClick="document.getElementById('modalLang').checked=true")
e6dcb115 26 img(src="/images/flags/" + lang + ".svg")
d449ae46
BA
27 #helpMenu.conditional-jump(
28 onClick="document.getElementById('modalHelp').checked=true")
e6dcb115
BA
29 .info-container
30 p Help
1d184b4c 31 .row
e6dcb115
BA
32 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2(
33 v-show="display=='rules'")
34 my-rules
35 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2(
36 v-show="display=='game'")
37 my-game(v-bind:problem="problem")
38 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2(
39 v-show="display=='problems'")
40 my-problems(v-on:show-problem="showProblem($event)")
41 // (Some) Modals:
42 include modal-help.pug
43 include modal-lang.pug
44 input#modal-newgame.modal(type="checkbox")
45 div(role="dialog" aria-labelledby="newGameTxt")
46 .card.smallpad.small-modal
47 label#close-newgame.modal-close(for="modal-newgame")
48 h3#newGameTxt New game
49 p Waiting for opponent...
1d184b4c
BA
50
51block javascripts
b019d603 52 script(src="/javascripts/utils/misc.js")
1d184b4c
BA
53 script(src="/javascripts/utils/socket_url.js")
54 script(src="/javascripts/utils/array.js")
331fc58c 55 script(src="/javascripts/utils/md5.js")
da06a6eb
BA
56 script(src="/javascripts/utils/printDiagram.js")
57 script(src="/javascripts/utils/ajax.js")
c794dbb8 58 script(src="/javascripts/utils/datetime.js")
1d184b4c
BA
59 script(src="/javascripts/base_rules.js")
60 script(src="/javascripts/variants/" + variant + ".js")
61 script.
0b7d99ec 62 const V = VariantRules; //because this variable is often used
1d184b4c 63 const variant = "#{variant}";
da06a6eb 64 const problemArray = !{JSON.stringify(problemArray)};
1d184b4c
BA
65 script(src="/javascripts/components/rules.js")
66 script(src="/javascripts/components/game.js")
da06a6eb 67 script(src="/javascripts/components/problemSummary.js")
f5d3e4f5 68 script(src="/javascripts/components/problems.js")
4ecf423b 69 script(src="/javascripts/variant.js")