Fix challenge creation (TODO: decide a challenge structure)
[vchess.git] / views / variant.pug
CommitLineData
1d184b4c
BA
1extends layout
2
3block css
92342261 4 link(rel="stylesheet" href="/stylesheets/variant.css")
1d184b4c
BA
5
6block content
59d58d7d 7 include modalSettings
b57dbd12 8 .container
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")
b6487fb9 15 a.icon-link(href="/")
e6dcb115 16 i.material-icons home
4608eed9 17 a(href="#room")
b6487fb9 18 =translations["Hall"]
60d9063f 19 a(href="#tabGames")
298c42e6 20 =translations["My games"]
4608eed9 21 a(href="#rules")
b6487fb9 22 =translations["Rules"]
4608eed9 23 a(href="#problems")
b6487fb9 24 =translations["Problems"]
4608eed9
BA
25 #flagMenu.clickable(onClick="doClick('modalLang')")
26 img(src="/images/flags/" + lang + ".svg")
26b8e4f7 27 #settings.clickable(onClick="doClick('modalSettings')")
b6487fb9 28 i.material-icons settings
26b8e4f7 29 include userMenu
1d184b4c 30 .row
60d9063f
BA
31 my-room(v-show="display=='room'" :conn="conn" :settings="settings")
32 my-tab-games(v-show="display=='tabGames'")
582df349 33 my-rules(v-show="display=='rules'" :settings="settings")
97da8720
BA
34 my-problems(v-show="display=='problems'" :prob-id="probId" :settings="settings")
35 my-game(v-show="display=='game'" :game-ref="gameRef" :conn="conn"
d44df0b0 36 :allow-chat="allowChat" :allow-movelist="allowMovelist"
97da8720 37 :mode="mode" :settings="settings" @game-over="archiveGame")
1d184b4c
BA
38
39block javascripts
da06a6eb 40 script(src="/javascripts/utils/printDiagram.js")
c794dbb8 41 script(src="/javascripts/utils/datetime.js")
582df349 42 script(src="/javascripts/utils/squareId.js")
a48ee8b8 43 script(src="/javascripts/socket_url.js")
8d7e2786 44 script(src="/javascripts/variants/" + variant.name + ".js")
1d184b4c 45 script.
8d7e2786 46 const variant = !{JSON.stringify(variant)};
ab4f4bf2
BA
47 // Just 'V' because this variable is often used:
48 const V = eval(variant.name + "Rules");
baba6070 49 script(src="/javascripts/components/board.js")
60d9063f
BA
50 script(src="/javascripts/components/chat.js")
51 script(src="/javascripts/components/gameList.js")
52 script(src="/javascripts/components/challengeList.js")
7d9e99bc 53 script(src="/javascripts/components/moveList.js")
d44df0b0 54 script(src="/javascripts/components/game.js")
60d9063f
BA
55 script(src="/javascripts/components/rules.js")
56 script(src="/javascripts/components/room.js")
57 script(src="/javascripts/components/tabGames.js")
58 script(src="/javascripts/components/problemSummary.js")
59 script(src="/javascripts/components/problems.js")
4ecf423b 60 script(src="/javascripts/variant.js")