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.

70 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-18 11:44:19 +01:00
<div id="imgRef" style="background-image:url('{{ $ref -> image }}');"></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>
{{$nbBronze}}
</div>
<div style="display:inline-block;">
<img style="height:100px; vertical-align:middle;width:100px" src="{{ URL::to('imgs/trophees/argent.png') }}"><br>
{{$nbArgent}}
</div>
<div style="display:inline-block;">
<img style="height:100px; vertical-align:middle;width:100px" src="{{ URL::to('imgs/trophees/or.png') }}"><br>
{{$nbOr}}
</div>
</div>
@endsection
2015-03-17 19:35:31 +01:00
@section('page-scripts')
<script>
var redirect;
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;
}
document.getElementById('imgRef').addEventListener("click", function(event) {
absorbEvent_(event);
2015-03-18 12:03:11 +01:00
return false;
});
2015-03-18 12:13:56 +01:00
document.getElementById('imgRef').addEventListener("mousedown", function(event) {
absorbEvent_(event);
2015-03-17 19:35:31 +01:00
redirect = setTimeout(function(){location.href="{{URL::to('choisirref')}}"}, 3000);
2015-03-18 11:50:14 +01:00
return false;
2015-03-17 19:35:31 +01:00
2015-03-18 12:09:00 +01:00
});
2015-03-17 19:35:31 +01:00
document.getElementById('imgRef').addEventListener("mouseup", function() {
clearTimeout(redirect);
2015-03-18 12:00:00 +01:00
return false;
2015-03-17 19:35:31 +01:00
});
2015-03-18 12:00:00 +01:00
2015-03-18 12:13:56 +01:00
document.getElementById('imgRef').addEventListener("touchstart", function(event) {
absorbEvent_(event);
2015-03-18 12:09:00 +01:00
redirect = setTimeout(function(){location.href="{{URL::to('choisirref')}}"}, 3000);
return false;
});
document.getElementById('imgRef').addEventListener("touchend", function() {
clearTimeout(redirect);
return false;
});
2015-03-17 19:35:31 +01:00
</script>
@endsection