Progression in styles + initiate translation process
[vchess.git] / views / index.pug
1 extends layout
2
3 block css
4 link(rel="stylesheet", href="/stylesheets/index.css")
5
6 block content
7 .container#indexPage
8 .row
9 #header.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
10 #mainTitle
11 img(src="/images/index/unicorn.svg")
12 .info-container
13 p vchess.club
14 img(src="/images/index/wildebeest.svg")
15 // TODO: flags, translations
16 #flagMenu(onClick="document.getElementById('modalLang').checked=true")
17 img(src="/images/flags/" + lang + ".svg")
18 #helpMenu(onClick="document.getElementById('modalHelp').checked=true")
19 .info-container
20 p Help
21 .row
22 my-variant-summary(v-for="(v,idx) in sortedCounts"
23 v-bind:vobj="v" v-bind:index="idx" v-bind:key="v.name")
24 // Modals:
25 input#modalHelp.modal(type="checkbox")
26 div(role="dialog")
27 #help.card
28 label.modal-close(for="modalHelp")
29 .section
30 p.emphasis.bigfont First: watch #[a(href="/demo.webm") demo video] !
31 p Then click on a variant... Reminder:
32 ul
33 li All games start with a random assymetric position.
34 li Games are untimed, and played anonymously.
35 li No chat while playing, to focus on the moves.
36 .section
37 h3.red Bug report
38 p
39 | Please send an email to
40 a(href="mailto:contact@vchess.club?subject=[vchess.club] bug report")
41 | contact@vchess.club
42 | .
43 input#modalLang.modal(type="checkbox")
44 div(role="dialog")
45 #language.card
46 label.modal-close(for="modalLang")
47 .section
48 fieldset
49 -
50 var langName = {
51 "fr": "French",
52 "en": "English",
53 }
54 label(for="langSelect") Preferred language?
55 select#langSelect(@change="setLanguage")
56 each langCode in languages
57 option(value=langCode selected=(lang==langCode))
58 =langName[langCode]
59 .section
60 h3.blue Contribute
61 p
62 | Browse the
63 a(href="https://github.com/yagu0/vchess/tree/master/views")
64 | github repository
65 | : welcome/en.pug and all files rules/*/en.pug
66 | should be translated. When it's done, send me the files:
67 a(href="mailto:contact@vchess.club?subject=[vchess.club] translation")
68 | contact@vchess.club
69 | . Thanks!
70 input#modalB4welcome.modal(type="checkbox")
71 div(role="dialog")
72 #b4welcome.card.text-center
73 h3.blue First visit?
74 p#readThis(@click="showWelcomeMsg") >>> Please read this <<<
75 case lang
76 when "en"
77 include welcome/en.pug
78 when "fr"
79 include welcome/fr.pug
80
81 block javascripts
82 script.
83 const variantArray = !{JSON.stringify(variantArray)};
84 script(src="/javascripts/utils/misc.js")
85 script(src="/javascripts/utils/socket_url.js")
86 script(src="/javascripts/components/variantSummary.js")
87 script(src="/javascripts/index.js")