Do not abuse smileys
[vchess.git] / views / index.pug
... / ...
CommitLineData
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
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 h3.blue.section Tips
20 p.section
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.
28 // TODO? On the index page, try typing the first letters of a variant.
29 h3.blue.section Comments
30 p.section.
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 :)
34 h3.red.section Bug report
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!
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
49 span.read-this(@click="showWelcomeMsg") read this
50 span  before playing ☺
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!).
64 p.emphasis However...
65 p Each variant has its own new rules, which can involve
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
78 .section
79 p.
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.
83 p Also state a goal: make the opponent's king explode.
84 p → Congrats, you defined Atomic chess! (Playable here)
85 .section
86 p.emphasis OK, this all sounds interesting, but why would that be fun?
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 :)
91 -
92 var wikipediaUrl = "https://en.wikipedia.org/wiki/" +
93 "List_of_chess_variants#/media/File:Hexagonal_chess.svg";
94 p.
95 For informations about hundreds (if not thousands!) of variants, you
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]
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,'"'));
112 script(src="/javascripts/utils/misc.js")
113 script(src="/javascripts/utils/socket_url.js")
114 script(src="/javascripts/components/variantSummary.js")
115 script(src="/javascripts/index.js")