This repository has been archived on 2021-09-15. You can view files and clone it, but cannot push or open issues or pull requests.

75 lines
2.3 KiB
PHP
Raw Normal View History

2015-03-17 12:07:18 +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>
</div>
@endsection
2015-03-17 19:35:31 +01:00
@section('page-scripts')
<script>
2015-03-21 16:38:15 +01:00
var redirectTimer;
imgRef.innerHTML = '&nbsp;';
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-21 16:38:15 +01:00
imgRef.innerHTML = 3;
redirectTimer = setInterval(counter, 1000);
}
2015-03-18 12:09:00 +01:00
2015-03-21 16:38:15 +01:00
function counter() {
imgRef.innerHTML--;
if(imgRef.innerHTML == 0) location.href="{{URL::to('choisirref')}}";
}
function endCounter(event) {
imgRef.innerHTML = '&nbsp;';
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