Fix preferences screen (pre-selected sound level)
[vchess.git] / views / index.pug
CommitLineData
1d184b4c
BA
1extends layout
2
3block css
4 link(rel="stylesheet", href="/stylesheets/index.css")
5
6block content
7 .container#indexPage
8 .row
9 .col-sm-12
92342261 10 h1.text-center.main-title Welcome to v[ariant] chess club !
b019d603 11 h2.text-center
92342261
BA
12 span.help(onClick="document.getElementById('modal-help').checked=true")
13 | Help ?
b019d603
BA
14 a(href="/demo.webm") Demo !
15 input#modal-help.modal(type="checkbox")
e7cfa68d 16 div(role="dialog")
38a412be 17 #help.card
b019d603 18 label.modal-close(for="modal-help")
38a412be 19 h3.blue.section Tips
794b8a98 20 p.section
92342261
BA
21 span.conditional-jump
22 | On a variant page, read the rules by clicking on the title
23 | "<Variant> rules".
24 span.conditional-jump
25 | Try playing against a human: click the leftmost "new game" button :)
26 | ...then, while waiting you can play against a (rather weak) bot
27 | or a friend.
5febb3f0 28 // TODO? On the index page, try typing the first letters of a variant.
e7cfa68d
BA
29 h3.blue.section Comments
30 p.section.
11c53645
BA
31 All games start with a random assymetric position. #[br]
32 Games are untimed, and played anonymously. #[br]
33 No chat, to rather focus on the moves :)
385166a4 34 h3.red.section Bug report
92342261
BA
35 p.section
36 | If you find a bug in a game, please follow this procedure: #[br]
37 | 1. stop playing: click on the resign button; #[br]
38 | 2. click on the PGN to download it; #[br]
39 | 3. send an email to
40 a(href="mailto:contact@vchess.club?subject=[vchess.club] bug report")
41 | contact@vchess.club
42 | with relevant comments and the PGN attached. Thank you!
2c99dab4
BA
43 input#modal-b4welcome.modal(type="checkbox")
44 div(role="dialog")
45 #b4welcome.card.text-center
46 label.modal-close(for="modal-b4welcome")
47 h3.blue.section First visit?
48 p Please
92342261 49 span.read-this(@click="showWelcomeMsg") read this
2c99dab4 50 span  before playing ☺
b019d603
BA
51 input#modal-welcome.modal(type="checkbox")
52 div(role="dialog")
53 #welcome.card.text-center
54 label.modal-close(for="modal-welcome")
55 h3.blue.section Welcome to vchess.club!
56 .section
57 p A fun place to play chess variants in real time!
58 p But wait... what is a chess variant?
59 img(src="/images/Hexagonal_chess.svg")
60 p.
61 As suggested by the picture, a variant setup generally
62 looks more or less like a chessboard with regular pieces
63 (otherwise it's no longer a variant but a whole new game!).
92342261 64 p.emphasis However...
b019d603 65 p Each variant has its own new rules, which can involve
ea6bb36e
BA
66 table.list-table
67 tbody
68 tr
69 td * different pieces movements
70 tr
71 td * different chessboard(s)
72 tr
73 td * new pieces
74 tr
75 td * moves side effects
76 tr
77 td ...and so on
b019d603
BA
78 .section
79 p.
92342261
BA
80 Example: imagine that a capture is an atomic explosion, wiping all
81 adjacent squares – except the pawns, which as cockroaches can
82 resist this kind of event.
b019d603
BA
83 p Also state a goal: make the opponent's king explode.
84 p → Congrats, you defined Atomic chess! (Playable here)
85 .section
92342261 86 p.emphasis OK, this all sounds interesting, but why would that be fun?
b019d603
BA
87 p.
88 Because all games here start with a random setup: no more boring
89 openings memorization, you have to rely on your chess skills only :)
90 p Moreover, I claim that the chosen variants here are fun to play :P
92342261
BA
91 -
92 var wikipediaUrl = "https://en.wikipedia.org/wiki/" +
93 "List_of_chess_variants#/media/File:Hexagonal_chess.svg";
b019d603
BA
94 p.
95 For informations about hundreds (if not thousands!) of variants, you
92342261
BA
96 can visit the excellent
97 #[a(href="https://www.chessvariants.com/") chessvariants] website.
98 p.disable-msg(@click="markAsVisited")
99 | Click here to not show this message next time
100 p.smallfont Image credit: #[a(href=wikipediaUrl) Wikipedia]
1d184b4c
BA
101 .row
102 my-variant-summary(
103 v-for="(v,idx) in sortedCounts",
104 v-show="v.name.startsWith(curPrefix)",
105 v-bind:vobj="v",
106 v-bind:key="v.name")
107
108block javascripts
109 script.
110 const variantArray = !{JSON.stringify(variantArray)};
111 //JSON.parse("!{variantArray}".replace(/\"/g,'"'));
b019d603 112 script(src="/javascripts/utils/misc.js")
1d184b4c
BA
113 script(src="/javascripts/utils/socket_url.js")
114 script(src="/javascripts/components/variantSummary.js")
115 script(src="/javascripts/index.js")