-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
231 lines (207 loc) · 8.11 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:title" content="Mini jeu: Moret, Maudet et Cassis à l’assaut de Berne" />
<meta name="description" content="Récoltez des voix et tentez d’atteindre le palais fédéral" />
<meta name='og:image' content='https://files.newsnetz.ch/upload//1/3/137559.png?2' />
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>Mini jeu: Moret, Maudet et Cassis à l’assaut de Berne</title>
<link href='https://fonts.googleapis.com/css?family=Cherry+Swash' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<style>
body { background: #111; }
#tower { position: relative; margin: 4em auto; width: 512px; height: 384px; border: 1px solid #ccc; }
#hud { position: absolute; bottom: 0em; width: 9em; background-color: red; opacity: 0.6; border: 2px solid black; }
.scorecontainer { text-align: right; }
#score { color: #fff; padding-left: 1em; font-size: 2em; font-family: 'Cherry Swash', cursive; }
#canvas { display: inline-block; width: 100%; height: 100%; }
#instructions { color: #999; font-size: 9pt; margin-left: 1em; margin-top: 0.5em; }
#instructions b { color: #DDD; }
@media screen and (min-width: 0px) and (min-height: 0px) { .prompt-container, #tower { width: 320px; height: 240px; font-size: 9pt; } } /* pr edit - block = 10 */
@media screen and (min-width: 408px) and (min-height: 288px) { .prompt-container, #tower { width: 408px; height: 288px; font-size: 9pt; } } /* pr edit - block = 12 */
@media screen and (min-width: 512px) and (min-height: 384px) { .prompt-container, #tower { width: 512px; height: 384px; font-size: 9pt; } } /* pr edit - block = 16 */
@media screen and (min-width: 640px) and (min-height: 480px) { .prompt-container, #tower { width: 640px; height: 480px; font-size: 9pt; } } /* block = 20 */
@media screen and (min-width: 968px) and (min-height: 626px) { .prompt-container, #tower { width: 768px; height: 576px; font-size: 11pt; } } /* block = 24 */
@media screen and (min-width: 1096px) and (min-height: 722px) { .prompt-container, #tower { width: 896px; height: 672px; font-size: 13pt; } } /* block = 28 */
@media screen and (min-width: 1224px) and (min-height: 818px) { .prompt-container, #tower { width: 1024px; height: 768px; font-size: 15pt; } } /* block = 32 */
#mobilebuttons{ display: none; }
@media only screen and (max-device-width: 1200px){
#mobilebuttons{ display: block; }
/* disable selection on mobile to prevent bugs */
*{
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none;
}
}
.prompt-container{
position: relative;
margin: 4em auto;
height: 0;
}
.name-prompt{
width: 100%;
position: absolute;
padding: 2em 1em;
background-color: #eee;
z-index: 3;
}
.player-selection{
display: inline-block;
width: 100%;
padding: 0;
list-style-type: none;
margin: 20px auto 0 auto;
}
.checkbox{
margin: 2em 2em;
}
.player-select label{
display: inline-block;
margin: 10px 0;
width: 100%;
text-align: center;
}
.player-selection li{
display: inline-block;
float: left;
width: 33%;
text-align: center;
cursor: pointer;
border: 2px solid #eee;
padding: 10px 0;
}
.player-selection li.selected{
border: 2px solid #158cba;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
border-radius: 5px;
}
#mobilebuttons{
position: absolute;
width: 100%;
height: 100%;
z-index: 2;
}
#overlay{
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.5);
z-index: 1;
}
#mobilebuttons button{
font-size: 2em;
position: absolute;
}
#mobilebuttons .left{
left: 3%;
top: 50%;
}
#mobilebuttons .right{
right: 3%;
top: 50%;
}
#mobilebuttons .up{
top: 3%;
left: 45%;
}
#mobilebuttons .down{
top: auto;
bottom: 3%;
left: 20%;
}
#mobilebuttons .jump{
top: auto;
bottom: 3%;
right: 20%;
}
</style>
</head>
<body>
<div class="prompt-container">
<div id="prompt" class="name-prompt">
<div class="player-select col-md-12">
<h2>Choisissez votre candidat:</h2>
<ul class="player-selection col-md-12">
<li class="selected" data-player="moret">
<img src="images/prompt/moret_front.png"><br />
Isabelle Moret
</li>
<li data-player="maudet">
<img src="images/prompt/maudet_front.png"><br />
Pierre Maudet
</li>
<li data-player="cassis">
<img src="images/prompt/cassis_front.png"><br />
Ignazio Cassis
</li>
</ul>
</div>
<div class="checkbox col-md-12">
<label class="fullwidth"><input id="music" type="checkbox">Musique 🎵</label>
</div>
<div class="center-block">
<input class="btn btn-primary center-block col-md-12" type="submit" id="playButton" value="C’est parti !" />
</div>
</div>
</div>
<div id="overlay"></div>
<div id="tower" class="mobilebuttons">
<div id="mobilebuttons">
<button data-mv="left" class="left glyphicon glyphicon-arrow-left"></button>
<button data-mv="right" class="right glyphicon glyphicon-arrow-right"></button>
<button data-mv="up" class="up glyphicon glyphicon-arrow-up"></button>
<button data-mv="down" class="down glyphicon glyphicon-arrow-down"></button>
<button data-mv="jump" class="jump glyphicon glyphicon-open"></button>
</div>
<div id="hud">
<table>
<tr><td><img id="coin" src=""></td><td class="scorecontainer"><span id="score"></span></td></tr>
</table>
</div>
<canvas id="canvas">
<div class="unsupported">
Votre navigateur ne prend malheureusement pas en charge la technologie nécessaire au jeu.
</div>
</canvas>
<div id="instructions">
<p><b>Touches fléchées</b> pour bouger, <b>espace</b> pour sauter. Recueillez au moins <b>124 voix</b> pour pouvoir entrer au palais fédéral!</p>
<p>Animations: Pascal Wassmer et Philippe Forney, adaptation du code: Paul Ronga, photos: Keystone, musique: <a href="http://freemusicarchive.org/music/Visager/Songs_From_An_Unmade_World_2/Visager_-_Songs_From_An_Unmade_World_2_-_04_Factory_Time">Factory Time</a> par Visager.
Basé sur le jeu <a href="https://github.com/jakesgordon/javascript-tower-platformer">Javascript Tower Platformer</a> par Jakes Gordon, inspiré par <a href="https://fr.wikipedia.org/wiki/Nebulus">Nebulus (Tower Toppler)</a>. Musique: 8 Bit Raceway par Wizwars.</p>
<p>Sources (licence MIT) sur <a target="_blank" href="https://github.com/palrogg/minijeu-course-conseil-federal">GitHub</a></p>
<span id="debug"></span>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="js/fpsmeter.min.js"></script>
<script src="js/common.js"></script>
<!--<script>
window.fbAsyncInit = function() {
FB.init({
appId : '480377685650907',
xfbml : true,
version : 'v2.10'
});
FB.AppEvents.logPageView();
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>-->
<script src="js/tower.js?200"></script>
</body>
</html>