2015-03-17 12:07:18 +01:00
|
|
|
|
2015-03-14 14:36:03 +01:00
|
|
|
@extends('frontend/template')
|
|
|
|
|
|
|
|
@section('content')
|
2015-03-17 17:21:37 +01:00
|
|
|
<div style="text-align:center">
|
|
|
|
|
2015-03-22 14:05:40 +01:00
|
|
|
<div id="imgRef" style="background-image:url('{{ $ref -> image }}');">
|
2015-03-20 20:02:26 +01:00
|
|
|
</div>
|
|
|
|
<br>
|
2015-03-17 17:21:37 +01:00
|
|
|
|
|
|
|
|
2015-03-17 19:24:29 +01:00
|
|
|
<div class="game" onclick="location.href='{{ URL::to('memo') }}'"><img src="imgs/memo/memo2.png"></div>
|
2015-03-18 11:44:19 +01:00
|
|
|
<div class="game" onclick="location.href='{{ URL::to('puzzle') }}'"><img src="imgs/puzzle/puzzle.png"></div>
|
2015-03-18 19:47:36 +01:00
|
|
|
|
2015-03-20 18:38:41 +01:00
|
|
|
<br>
|
|
|
|
<div style="display:inline-block;">
|
|
|
|
<img style="height:100px; vertical-align:middle;width:100px" src="{{ URL::to('imgs/trophees/bronze.png') }}"><br>
|
2015-03-22 14:05:40 +01:00
|
|
|
<div class="trophy-text" style="color:chocolate;">{{$nbBronze}}</div>
|
|
|
|
|
2015-03-20 18:38:41 +01:00
|
|
|
</div>
|
|
|
|
<div style="display:inline-block;">
|
|
|
|
<img style="height:100px; vertical-align:middle;width:100px" src="{{ URL::to('imgs/trophees/argent.png') }}"><br>
|
2015-03-22 14:05:40 +01:00
|
|
|
<div class="trophy-text" style="color:#c0c0c0;">{{$nbArgent}}</div>
|
|
|
|
|
2015-03-20 18:38:41 +01:00
|
|
|
</div>
|
|
|
|
<div style="display:inline-block;">
|
|
|
|
<img style="height:100px; vertical-align:middle;width:100px" src="{{ URL::to('imgs/trophees/or.png') }}"><br>
|
2015-03-22 14:05:40 +01:00
|
|
|
<div class="trophy-text" style="color:gold;">{{$nbOr}}</div>
|
|
|
|
|
2015-03-20 18:38:41 +01:00
|
|
|
</div>
|
2015-03-14 14:36:03 +01:00
|
|
|
</div>
|
|
|
|
@endsection
|
2015-03-17 19:35:31 +01:00
|
|
|
|
|
|
|
@section('page-scripts')
|
|
|
|
<script>
|
2015-03-21 16:38:15 +01:00
|
|
|
|
|
|
|
var redirectTimer;
|
2015-03-24 11:45:32 +01:00
|
|
|
var chiffre;
|
|
|
|
|
2015-03-21 16:38:15 +01:00
|
|
|
imgRef.innerHTML = ' ';
|
|
|
|
|
|
|
|
|
2015-03-18 12:13:56 +01:00
|
|
|
function absorbEvent_(event) {
|
|
|
|
var e = event || window.event;
|
|
|
|
e.preventDefault && e.preventDefault();
|
|
|
|
e.stopPropagation && e.stopPropagation();
|
|
|
|
e.cancelBubble = true;
|
|
|
|
e.returnValue = false;
|
|
|
|
return false;
|
|
|
|
}
|
2015-03-21 16:38:15 +01:00
|
|
|
|
|
|
|
function startCounter(event) {
|
2015-03-18 12:13:56 +01:00
|
|
|
absorbEvent_(event);
|
2015-03-24 11:45:32 +01:00
|
|
|
chiffre = 3;
|
2015-03-24 12:07:25 +01:00
|
|
|
imgRef.innerHTML = "Redirection <br>"+chiffre;
|
2015-03-21 16:38:15 +01:00
|
|
|
redirectTimer = setInterval(counter, 1000);
|
|
|
|
}
|
2015-03-18 12:09:00 +01:00
|
|
|
|
2015-03-21 16:38:15 +01:00
|
|
|
function counter() {
|
2015-03-24 11:45:32 +01:00
|
|
|
chiffre--;
|
2015-03-24 12:07:25 +01:00
|
|
|
imgRef.innerHTML = "Redirection <br>"+chiffre;
|
|
|
|
if(chiffre == 0)
|
|
|
|
{
|
|
|
|
endCounter(null);
|
|
|
|
location.href="{{URL::to('choisirref')}}";
|
|
|
|
}
|
2015-03-21 16:38:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
function endCounter(event) {
|
|
|
|
imgRef.innerHTML = ' ';
|
|
|
|
clearInterval(redirectTimer);
|
|
|
|
}
|
|
|
|
|
|
|
|
document.getElementById('imgRef').addEventListener("mousedown", startCounter);
|
|
|
|
document.getElementById('imgRef').addEventListener("touchstart", startCounter);
|
|
|
|
window.addEventListener("mouseup", endCounter);
|
|
|
|
window.addEventListener("touchend", endCounter);
|
2015-03-20 21:58:10 +01:00
|
|
|
|
2015-03-17 19:35:31 +01:00
|
|
|
</script>
|
|
|
|
@endsection
|