User management logic half-debugged
[vchess.git] / views / variant.pug
1 extends layout
2
3 block css
4 link(rel="stylesheet" href="/stylesheets/variant.css")
5
6 block content
7 include settings
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" @click="setDisplay('room')")
18 =translations["Hall"]
19 a(href="#gameList" @click="setDisplay('gameList')")
20 =translations["My games"]
21 a(href="#rules" @click="setDisplay('rules')")
22 =translations["Rules"]
23 a(href="#problems" @click="setDisplay('problems')")
24 =translations["Problems"]
25 #settings.clickable(
26 onClick="document.getElementById('modalSettings').checked=true")
27 i.material-icons settings
28 #userMenu.clickable(
29 onClick="document.getElementById('modalUser').checked=true")
30 .info-container
31 i.material-icons person
32 if !user.email
33 p Login
34 else
35 p Update
36 .row
37 my-room(v-show="display=='room'")
38 my-game-list(v-show="display=='gameList'")
39 my-rules(v-show="display=='rules'")
40 my-problems(v-show="display=='problems'")
41 my-game(v-show="display=='game'" :gameId="gameid")
42
43 block javascripts
44 script(src="/javascripts/utils/misc.js")
45 script(src="/javascripts/utils/array.js")
46 script(src="/javascripts/utils/printDiagram.js")
47 script(src="/javascripts/utils/datetime.js")
48 script(src="/javascripts/socket_url.js")
49 script(src="/javascripts/base_rules.js")
50 script(src="/javascripts/variants/" + variant.name + ".js")
51 script.
52 const V = VariantRules; //because this variable is often used
53 const variant = !{JSON.stringify(variant)};
54 script(src="/javascripts/components/room.js")
55 script(src="/javascripts/components/gameList.js")
56 script(src="/javascripts/components/rules.js")
57 script(src="/javascripts/components/problemSummary.js")
58 script(src="/javascripts/components/problems.js")
59 script(src="/javascripts/components/game.js")
60 script(src="/javascripts/variant.js")