Advance on Spanish translation (still 13 rules to translate)
[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 include langNames.pug
10 case lang
11 when "en"
12 include translations/en.pug
13 include modal-lang/en.pug
14 include modal-help/en.pug
15 when "es"
16 include translations/es.pug
17 include modal-lang/es.pug
18 include modal-help/es.pug
19 when "fr"
20 include translations/fr.pug
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..."]
29 .row
30 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
31 label.drawer-toggle(for="drawer-control")
32 input#drawer-control.drawer(type="checkbox")
33 #menuBar
34 label.drawer-close(for="drawer-control")
35 a#homeLink(href="/")
36 i.material-icons home
37 .info-container
38 a(href="#rules" @click="setDisplay('rules')")
39 =translations["Rules"]
40 a(href="#play" @click="setDisplay('play')")
41 =translations["Play"]
42 a(href="#problems" @click="setDisplay('problems')")
43 =translations["Problems"]
44 #flagMenu.clickable(
45 onClick="document.getElementById('modalLang').checked=true")
46 img(src="/images/flags/" + lang + ".svg")
47 #helpMenu.clickable(
48 onClick="document.getElementById('modalHelp').checked=true")
49 .info-container
50 p= translations["Help"]
51 .row
52 my-rules(v-show="display=='rules'")
53 my-game(v-show="display=='play'" v-bind:problem="problem")
54 my-problems(v-show="display=='problems'" v-on:show-problem="showProblem($event)")
55
56 block javascripts
57 script(src="/javascripts/utils/misc.js")
58 script(src="/javascripts/utils/array.js")
59 script(src="/javascripts/utils/md5.js")
60 script(src="/javascripts/utils/printDiagram.js")
61 script(src="/javascripts/utils/ajax.js")
62 script(src="/javascripts/utils/datetime.js")
63 script(src="/javascripts/socket_url.js")
64 script(src="/javascripts/base_rules.js")
65 script(src="/javascripts/variants/" + variant + ".js")
66 script.
67 const V = VariantRules; //because this variable is often used
68 const variant = "#{variant}";
69 const problemArray = !{JSON.stringify(problemArray)};
70 const translations = !{JSON.stringify(translations)};
71 script(src="/javascripts/components/rules.js")
72 script(src="/javascripts/components/game.js")
73 script(src="/javascripts/components/problemSummary.js")
74 script(src="/javascripts/components/problems.js")
75 script(src="/javascripts/variant.js")