Uniformize path to database
[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")
a5d56686 15 a#homeLink(href="/")
e6dcb115 16 i.material-icons home
d449ae46 17 .info-container
a5d56686 18 a(href="#rules" @click="setDisplay('rules')")
d449ae46 19 | Rules
a5d56686 20 a(href="#play" @click="setDisplay('play')")
d449ae46 21 | Play!
a5d56686 22 a(href="#problems" @click="setDisplay('problems')")
d449ae46 23 | Problems
a5d56686 24 #flagMenu.clickable(
d449ae46 25 onClick="document.getElementById('modalLang').checked=true")
e6dcb115 26 img(src="/images/flags/" + lang + ".svg")
a5d56686 27 #helpMenu.clickable(
d449ae46 28 onClick="document.getElementById('modalHelp').checked=true")
e6dcb115
BA
29 .info-container
30 p Help
1d184b4c 31 .row
a5d56686
BA
32 my-rules(v-show="display=='rules'")
33 my-game(v-show="display=='play'" v-bind:problem="problem")
34 my-problems(v-show="display=='problems'" v-on:show-problem="showProblem($event)")
e6dcb115
BA
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...
1d184b4c
BA
44
45block javascripts
b019d603 46 script(src="/javascripts/utils/misc.js")
1d184b4c 47 script(src="/javascripts/utils/array.js")
331fc58c 48 script(src="/javascripts/utils/md5.js")
da06a6eb
BA
49 script(src="/javascripts/utils/printDiagram.js")
50 script(src="/javascripts/utils/ajax.js")
c794dbb8 51 script(src="/javascripts/utils/datetime.js")
a48ee8b8 52 script(src="/javascripts/socket_url.js")
1d184b4c
BA
53 script(src="/javascripts/base_rules.js")
54 script(src="/javascripts/variants/" + variant + ".js")
55 script.
0b7d99ec 56 const V = VariantRules; //because this variable is often used
1d184b4c 57 const variant = "#{variant}";
da06a6eb 58 const problemArray = !{JSON.stringify(problemArray)};
1d184b4c
BA
59 script(src="/javascripts/components/rules.js")
60 script(src="/javascripts/components/game.js")
da06a6eb 61 script(src="/javascripts/components/problemSummary.js")
f5d3e4f5 62 script(src="/javascripts/components/problems.js")
4ecf423b 63 script(src="/javascripts/variant.js")