Fix challenge creation (TODO: decide a challenge structure)
[vchess.git] / views / variant.pug
... / ...
CommitLineData
1extends layout
2
3block css
4 link(rel="stylesheet" href="/stylesheets/variant.css")
5
6block content
7 include modalSettings
8 .container
9 .row
10 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
11 label.drawer-toggle(for="drawer-control")
12 input#drawer-control.drawer(type="checkbox")
13 #menuBar
14 label.drawer-close(for="drawer-control")
15 a.icon-link(href="/")
16 i.material-icons home
17 a(href="#room")
18 =translations["Hall"]
19 a(href="#tabGames")
20 =translations["My games"]
21 a(href="#rules")
22 =translations["Rules"]
23 a(href="#problems")
24 =translations["Problems"]
25 #flagMenu.clickable(onClick="doClick('modalLang')")
26 img(src="/images/flags/" + lang + ".svg")
27 #settings.clickable(onClick="doClick('modalSettings')")
28 i.material-icons settings
29 include userMenu
30 .row
31 my-room(v-show="display=='room'" :conn="conn" :settings="settings")
32 my-tab-games(v-show="display=='tabGames'")
33 my-rules(v-show="display=='rules'" :settings="settings")
34 my-problems(v-show="display=='problems'" :prob-id="probId" :settings="settings")
35 my-game(v-show="display=='game'" :game-ref="gameRef" :conn="conn"
36 :allow-chat="allowChat" :allow-movelist="allowMovelist"
37 :mode="mode" :settings="settings" @game-over="archiveGame")
38
39block javascripts
40 script(src="/javascripts/utils/printDiagram.js")
41 script(src="/javascripts/utils/datetime.js")
42 script(src="/javascripts/utils/squareId.js")
43 script(src="/javascripts/socket_url.js")
44 script(src="/javascripts/variants/" + variant.name + ".js")
45 script.
46 const variant = !{JSON.stringify(variant)};
47 // Just 'V' because this variable is often used:
48 const V = eval(variant.name + "Rules");
49 script(src="/javascripts/components/board.js")
50 script(src="/javascripts/components/chat.js")
51 script(src="/javascripts/components/gameList.js")
52 script(src="/javascripts/components/challengeList.js")
53 script(src="/javascripts/components/moveList.js")
54 script(src="/javascripts/components/game.js")
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")
60 script(src="/javascripts/variant.js")