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