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