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