-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html~
389 lines (295 loc) · 14 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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="./design/pc/disposition.css" />
<link rel="shortcut icon" href="./design/logo_gala.ico" />
<title>MineNight in Paris - Le Gala des Mines de Paris</title>
</head>
<body>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-37635054-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Mettre les liens ici aussi pour pouvoir faire une interface classique pour mobile -->
<!-- Le header -->
<header id="the_header">
<img src = "./design/pc/images/titre.png" alt="MineNight in Paris - Le Gala des Mines de Paris" >
</header>
<!-- Date/lieu -->
<img id = "date" src = "./design/pc/images/date.png">
<img id = "lieuimg" src = "./design/pc/images/lieu.png">
<!-- Les spots lumineux -->
<img src="./design/pc/images/light-left.png" style="position:fixed;top:0;left:0">
<img src="./design/pc/images/light-right.png" style="position:fixed;top:0;right:0">
<div id = "lieu"></div>
<nav id="meuf">
<!-- L'image du mec dont la source va changer lors des animations -->
<img id="imeuf0" alt="Meuf" src="./animations/meuf/1.png"/>
<!-- La "devanture" du sac" -->
<img class="js_controlled" id="devant_sac" alt="devant_sac" src="./animations/meuf/devant_sac.png" />
<!-- La caméra -->
<img class="js_controlled" id="camera_meuf" alt="camera_meuf" src="./animations/meuf/camera.png" />
<!-- Le portefeuille -->
<img class="js_controlled" id="portefeuille_meuf" alt="portefeuille_meuf" src="./animations/meuf/portefeuille.png" />
<!-- Le lien de la cocotte lorsque le sac est devant/ouvert -->
<div id="lien_preventes_sac_devant"></div>
</nav>
<nav id="mec">
<!-- L'image du mec dont la source va changer lors des animations -->
<img id="imec0" alt="Mec" src="./animations/mec/1.png"/>
<!-- Le téléphone portable -->
<img class="js_controlled" id="portable_mec" alt="portable_mec" src="./animations/mec/portable.png" />
<!-- La poche qui cache le téléphone portable -->
<img class="js_controlled" id="poche_basse_mec" alt="poche_basse_mec" src="./animations/mec/poche_portable.png" />
<!-- Le iPod -->
<img class="js_controlled" id="ipod_mec" alt="ipod_mec" src="./animations/mec/ipod.png" />
<!-- La poche qui le cache -->
<img class="js_controlled" id="poche_pantalon" alt="poche_pantalon" src="./animations/mec/poche_iphone.png" />
<!-- Le mouchoir -->
<img class="js_controlled" id="mouchoir_mec" alt="mouchoir_mec" src="./animations/mec/mouchoir.png" />
<!-- La poche qui le cache -->
<img class="js_controlled" id="poche_mouchoir_mec" alt="poche_mouchoir_mec" src="./animations/mec/poche_mouchoir.png" />
</nav>
<section id="content">
<div id="croix_contenu"></div>
<div id="html_content">
<h1>MineNight in Paris</h1>
<p id="bienvenue"> Bienvenue sur le site du gala des Mines de Paris !
</p>
</div>
</section>
<!-- Affichage du lien FaceBook et du lien pour les préventes -->
<nav id="lien_facebook">
<a href="http://www.facebook.com/events/111682155685603/"><img alt="Facebook" src="./design/pc/images/facebook_big.png"/></a>
</nav>
<!-- Affichage du lecteur (parallèlement avec le CSS) -->
<section id="fond_splayer">
<div id="ecran_splayer">
<div id="splayer_playing_artist">Artiste</div>
<div id="splayer_playing_title">Titre</div>
<div id="splayer_playing_album">Album</div>
<div id="splayer_bottom_bar">
<div id="splayer_time_elapsed">0:00</div>
<div id="splayer_time_remaining">-0:00</div>
<div id="splayer_progressbar">
<div id="splayer_backbar"></div>
</div>
</div>
</div>
<div id="prev_splayer" class="bplayer"></div>
<div id="next_splayer" class="bplayer"></div>
<div id="playpause_splayer" class="bplayer"></div>
</div>
<!-- Le cerveau du lecteur -->
<audio class="song_playlist" id="song_cytise">
<source src="./contenus/player_songs/cytise.mp3" type="audio/mpeg" preload="metadata"></source>
<source src="./contenus/player_songs/cytise.ogg" type="audio/ogg" preload="metadata"></source>
</audio>
<audio class="song_playlist" id="song_disque_oh">
<source src="./contenus/player_songs/disque_oh.mp3" type="audio/mpeg" preload="metadata"></source>
<source src="./contenus/player_songs/disque_oh.ogg" type="audio/ogg" preload="metadata"></source>
</audio>
<audio class="song_playlist" id="song_do_it_again">
<source src="./contenus/player_songs/do_it_again.mp3" type="audio/mpeg" preload="metadata"></source>
<source src="./contenus/player_songs/do_it_again.ogg" type="audio/ogg" preload="metadata"></source>
</audio>
<audio class="song_playlist" id="song_essential">
<source src="./contenus/player_songs/essential.ogg" type="audio/ogg" preload="metadata"></source>
<source src="./contenus/player_songs/essential.mp3" type="audio/mpeg" preload="metadata"></source>
</audio>
<audio class="song_playlist" id="song_falcon_punch">
<source src="./contenus/player_songs/falcon_punch.mp3" type="audio/mpeg" preload="metadata"></source>
<source src="./contenus/player_songs/falcon_punch.ogg" type="audio/ogg" preload="metadata"></source>
</audio>
<audio class="song_playlist" id="song_mambo_jet">
<source src="./contenus/player_songs/mambo_jet.mp3" type="audio/mpeg" preload="metadata"></source>
<source src="./contenus/player_songs/mambo_jet.ogg" type="audio/ogg" preload="metadata"></source>
</audio>
<audio class="song_playlist" id="song_slow_down">
<source src="./contenus/player_songs/slow_down.mp3" type="audio/mpeg" preload="metadata"></source>
<source src="./contenus/player_songs/slow_down.ogg" type="audio/ogg" preload="metadata"></source>
</audio>
<audio class="song_playlist" id="song_take_care_of_you">
<source src="./contenus/player_songs/take_care_of_you.mp3" type="audio/mpeg" preload="metadata"></source>
<source src="./contenus/player_songs/take_care_of_you.ogg" type="audio/ogg" preload="metadata"></source>
</audio>
<audio class="song_playlist" id="song_tearing">
<source src="./contenus/player_songs/tearing.mp3" type="audio/mpeg" preload="metadata"></source>
<source src="./contenus/player_songs/tearing.ogg" type="audio/ogg" preload="metadata"></source>
</audio>
<audio class="song_playlist" id="song_teion">
<source src="./contenus/player_songs/teion.mp3" type="audio/mpeg" preload="metadata"></source>
<source src="./contenus/player_songs/teion.ogg" type="audio/ogg" preload="metadata"></source>
</audio>
<audio class="song_playlist" id="song_the_bait">
<source src="./contenus/player_songs/the_bait.mp3" type="audio/mpeg" preload="metadata"></source>
<source src="./contenus/player_songs/the_bait.ogg" type="audio/ogg" preload="metadata"></source>
</audio>
<audio class="song_playlist" id="song_wild_child">
<source src="./contenus/player_songs/wild_child.mp3" type="audio/mpeg" preload="metadata"></source>
<source src="./contenus/player_songs/wild_child.ogg" type="audio/ogg" preload="metadata"></source>
</audio>
<script>
document.querySelector("#next_splayer").addEventListener('click', pNext, false);
document.querySelector("#prev_splayer").addEventListener('click', pPrev, false);
document.querySelector("#playpause_splayer").addEventListener('click', pPlaypause, false);
var tPlayers = document.querySelectorAll('.song_playlist');
for(var i = 0; i < tPlayers.length; i++){
tPlayers[i].addEventListener('timeupdate', function(){pUpdate();},false);
tPlayers[i].addEventListener('progress', function(){pProgress();},false);
tPlayers[i].addEventListener('ended', function(){pNext();},false);
}
tSongs = new Array(
{id:'cytise', titre:'Cytise', artist:'BeatauCue', album:'BeatauCue'},
{id:'disque_oh', titre:'Disque Oh', artist:'BeatauCue', album:'BeatauCue'},
{id:'do_it_again', titre:'Do It Again', artist:'Cherokee', album:'Cherokee'} ,
{id:'essential', titre:'Essential', artist:'WEKEED', album:'WEKEED'} ,
{id:'falcon_punch', titre:'Falcon Punch', artist:'BeatauCue', album:'BeatauCue'},
{id:'mambo_jet', titre:'Mambo Jet', artist:'Cherokee', album:'Single'},
{id:'slow_down', titre:'Slow Down', artist:'BeatauCue', album:'BeatauCue'},
{id:'take_care_of_you', titre:'Take Care', artist:'Cherokee', album:'of you'} ,
{id:'tearing', titre:'Tearing', artist:'BeatauCue', album:'BeatauCue'} ,
{id:'teion', titre:'Teion', artist:'BeatauCue', album:'Kitsuné Parisien III'} ,
{id:'the_bait', titre:'The Bait', artist:'WEKEED & Electric Guest', album:'Remix'} ,
{id:'wild_child', titre:'Wild Child', artist:'WEKEED', album:'WEKEED'}
);
//On mélange la playlist
for(var i = tSongs.length - 1; i>=0; i--){
var j = Math.floor(Math.random() * (i + 1));
var tmp = tSongs[i];
tSongs[i] = tSongs[j];
tSongs[j] = tmp;
}
var currentSong = tSongs[0];
function setCurrentSong(i){
currentSong = tSongs[i];
document.querySelector("#splayer_playing_artist").innerHTML = currentSong.artist;
document.querySelector("#splayer_playing_title").innerHTML = currentSong.titre;
document.querySelector("#splayer_playing_album").innerHTML = currentSong.album;
}
setCurrentSong(0);
function pIsPlaying(){
var player = document.querySelector('#song_'+currentSong.id);
return !player.paused;
}
function pPlaypause(){
var player = document.querySelector('#song_'+currentSong.id);
if (player.paused) {
player.play();
} else {
player.pause();
}
}
function pResume(){
var player = document.querySelector('#song_'+currentSong.id);
player.currentTime=0;
player.pause();
}
function pPrev(){
currentNb = -1;
for(var i=0; i < tSongs.length; i++){
if(currentSong.id == tSongs[i].id)
currentNb = i;
}
//Arrêt de la chanson courante
pResume();
//Changement de currentSong et play
if(currentNb==0)
currentNb=tSongs.length;
currentNb--;
setCurrentSong(currentNb);
pPlaypause();
}
function pNext(){
currentNb = -1;
for(var i =0; i < tSongs.length; i++){
if(currentSong.id == tSongs[i].id)
currentNb = i;
}
//Arrêt de la chanson courante
pResume();
//Changement de currentSong et play
if(currentNb==(tSongs.length-1))
currentNb=-1;
currentNb++;
setCurrentSong(currentNb);
pPlaypause();
}
//Mis à jour de la progress bar et des timers
function pUpdate(){
var player = document.querySelector('#song_'+currentSong.id);
var duration = player.duration; // Durée totale
var time = player.currentTime; // Temps écoulé
var fraction = time / duration;
var percent = Math.ceil(fraction * 100);
minec = Math.floor(time/60);
sec = Math.floor(time-minec*60);
minre = Math.floor((duration-time)/60);
sre = Math.floor(duration-time-minre*60);
zerosec = sec/10 < 1 ? '0' : '';
zerosre = sre/10 < 1 ? '0' : '';
document.querySelector('#splayer_time_elapsed').innerHTML = minec + ':' + zerosec + sec;
document.querySelector('#splayer_time_remaining').innerHTML = minre + ':' + zerosre + sre;
var progress = document.querySelector('#splayer_backbar');
progress.style.width = percent + '%';
}
//Fonctions relatives au clic sur la barre de progression
document.querySelector("#splayer_progressbar").addEventListener('click', {handleEvent : function(event){
var player = document.querySelector('#song_'+currentSong.id);
var x = getMousePosition(event).x - getPosition(document.querySelector("#splayer_progressbar")).x;
var wrapperWidth = document.querySelector('#splayer_progressbar').offsetWidth;
var percent = (x / wrapperWidth) * 100;
var duration = player.duration;
if (player.paused)
player.play();
player.currentTime = (duration * percent) / 100;
}});
function pProgress(){
var player = document.querySelector('#song_'+currentSong.id);
var bufferedZones = player.buffered;
//Ajout des buffered zones aux bons endroits de la barre de progression
//On dégages toutes les zones grisées présentes
$('.splayer_loadbar').remove();
//On met les nouvelles
for(var i = 0; i < bufferedZones.length; i++){
$('<div class="splayer_loadbar"></div>').css({'left':bufferedZones.start(i)/player.duration*$('#splayer_progressbar').width(),'width':(bufferedZones.end(i) - bufferedZones.start(i))/player.duration*$('#splayer_progressbar').width()}).appendTo($('#splayer_progressbar'));
}
}
/* Fonctions Javascript utiles pour la détection de si on est ou pas dans un bloc */
function getMousePosition(event) {
if (event.pageX) {
return {
x: event.pageX,
y: event.pageY
};
} else {
return {
x: event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft,
y: event.clientY + document.body.scrollTop + document.documentElement.scrollTop
};
}
}
function getPosition(element){
var top = 0, left = 0;
while (element) {
left += element.offsetLeft;
top += element.offsetTop;
element = element.offsetParent;
}
return { x: left, y: top };
}
</script>
<!-- Fin de tout ce qui concerne le player -->
<script src="./libraries/jquery.js"></script>
<script src="./libraries/ajax.js"></script>
<script src="./libraries/animations.js"></script>
</body>
</html>