Prepare some more variants (unfinished)
[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
e081ffe3 9 include langNames.pug
247356cd
BA
10 case lang
11 when "en"
12 include translations/en.pug
247356cd
BA
13 include modal-lang/en.pug
14 include modal-help/en.pug
e081ffe3
BA
15 when "es"
16 include translations/es.pug
17 include modal-lang/es.pug
18 include modal-help/es.pug
247356cd
BA
19 when "fr"
20 include translations/fr.pug
247356cd
BA
21 include modal-lang/fr.pug
22 include modal-help/fr.pug
23 input#modal-newgame.modal(type="checkbox")
24 div(role="dialog" aria-labelledby="newGameTxt")
25 .card.smallpad.small-modal
26 label#close-newgame.modal-close(for="modal-newgame")
27 h3#newGameTxt= translations["New game"]
28 p= translations["Waiting for opponent..."]
e6dcb115 29 .row
d449ae46 30 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
9a3c9f79
BA
31 label.drawer-toggle(for="drawer-control")
32 input#drawer-control.drawer(type="checkbox")
33 #menuBar
34 label.drawer-close(for="drawer-control")
a5d56686 35 a#homeLink(href="/")
e6dcb115 36 i.material-icons home
d449ae46 37 .info-container
a5d56686 38 a(href="#rules" @click="setDisplay('rules')")
247356cd 39 =translations["Rules"]
a5d56686 40 a(href="#play" @click="setDisplay('play')")
e081ffe3 41 =translations["Play"]
375ecdd1 42 a(href="#problems" v-if="notDark()" @click="setDisplay('problems')")
247356cd 43 =translations["Problems"]
a5d56686 44 #flagMenu.clickable(
d449ae46 45 onClick="document.getElementById('modalLang').checked=true")
e6dcb115 46 img(src="/images/flags/" + lang + ".svg")
a5d56686 47 #helpMenu.clickable(
d449ae46 48 onClick="document.getElementById('modalHelp').checked=true")
e6dcb115 49 .info-container
247356cd 50 p= translations["Help"]
1d184b4c 51 .row
a5d56686
BA
52 my-rules(v-show="display=='rules'")
53 my-game(v-show="display=='play'" v-bind:problem="problem")
375ecdd1
BA
54 my-problems(v-if="notDark()" v-show="display=='problems'"
55 v-on:show-problem="showProblem($event)")
1d184b4c
BA
56
57block javascripts
b019d603 58 script(src="/javascripts/utils/misc.js")
1d184b4c 59 script(src="/javascripts/utils/array.js")
331fc58c 60 script(src="/javascripts/utils/md5.js")
da06a6eb
BA
61 script(src="/javascripts/utils/printDiagram.js")
62 script(src="/javascripts/utils/ajax.js")
c794dbb8 63 script(src="/javascripts/utils/datetime.js")
a48ee8b8 64 script(src="/javascripts/socket_url.js")
1d184b4c
BA
65 script(src="/javascripts/base_rules.js")
66 script(src="/javascripts/variants/" + variant + ".js")
67 script.
0b7d99ec 68 const V = VariantRules; //because this variable is often used
1d184b4c 69 const variant = "#{variant}";
da06a6eb 70 const problemArray = !{JSON.stringify(problemArray)};
247356cd 71 const translations = !{JSON.stringify(translations)};
1d184b4c
BA
72 script(src="/javascripts/components/rules.js")
73 script(src="/javascripts/components/game.js")
da06a6eb 74 script(src="/javascripts/components/problemSummary.js")
f5d3e4f5 75 script(src="/javascripts/components/problems.js")
4ecf423b 76 script(src="/javascripts/variant.js")