Co co mit
This commit is contained in:
parent
4ef3e7e8b3
commit
f9251c68f9
11
.env
Normal file
11
.env
Normal file
@ -0,0 +1,11 @@
|
||||
APP_ENV=local
|
||||
APP_DEBUG=true
|
||||
APP_KEY=Z8ORdoQRFFogOAPl8ZmkSWAtNLKW4eku
|
||||
|
||||
DB_HOST=localhost
|
||||
DB_DATABASE=moduleweb
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
@ -64,7 +64,7 @@ class APIController extends Controller {
|
||||
->designationFilter($designations)
|
||||
->domaineFilter($domaines)
|
||||
->matiereFilter($matieres)
|
||||
->simplePaginate(10);
|
||||
->paginate(10);
|
||||
|
||||
return view('backend/ref_listeoeuvres',['oeuvres' => $listeoeuvres]);
|
||||
|
||||
|
@ -26,11 +26,15 @@ class GameController extends Controller {
|
||||
return view('frontend/memo_level');
|
||||
}
|
||||
|
||||
public function playMemo() {
|
||||
public function playMemo($niveau) {
|
||||
$idRef = Cookie::get('referent');
|
||||
$configjeu = Referent::find($idRef)->configjeu()->where('actifPuzzle', '=', '1')->first();
|
||||
$configjeu = Referent::find($idRef)->configjeu()->where('actifMemo', '=', '1')->first();
|
||||
if($configjeu && count($configjeu->oeuvres) >= 1) {
|
||||
$oes = $configjeu->oeuvres;
|
||||
return view('frontend/memo', ['oeuvres' => $oes]);
|
||||
} else {
|
||||
$oes = Oeuvre::orderByRaw("RAND()")->take(5)->get();
|
||||
}
|
||||
return view('frontend/memo', ['oeuvres' => $oes, 'niveau' => $niveau]);
|
||||
}
|
||||
|
||||
public function chooseDifPuzzle() {
|
||||
|
@ -1,95 +1,3 @@
|
||||
/* =============================================================================
|
||||
RESET, BOX SIZING, & CLEARFIX
|
||||
============================================================================= */
|
||||
/*#jeu{
|
||||
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
|
||||
background-image:url("../pictures/setting_picture/fond.jpg");
|
||||
background-attachment:fixed;
|
||||
background-repeat:no-repeat;
|
||||
background-position:100% 100%;
|
||||
background-size:cover;
|
||||
|
||||
}*/
|
||||
|
||||
body
|
||||
{
|
||||
background-image:url("../pictures/setting_picture/fond.jpg");
|
||||
background-attachment:fixed;
|
||||
background-repeat:no-repeat;
|
||||
background-position:100% 100%;
|
||||
background-size:cover;
|
||||
}
|
||||
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* =============================================================================
|
||||
BASE
|
||||
============================================================================= */
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* =============================================================================
|
||||
LAYOUT
|
||||
============================================================================= */
|
||||
/* wrapper */
|
||||
.wrapper {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
/*min-width: 432px;*/
|
||||
}
|
||||
|
||||
/* container */
|
||||
/*
|
||||
.container {
|
||||
padding-top: 50px;*/
|
||||
/* margin: 0 auto;
|
||||
width: 96%;
|
||||
max-width: 1128px;*/
|
||||
|
||||
}
|
||||
|
||||
/* =============================================================================
|
||||
MEMORY GAME (mg)
|
||||
============================================================================= */
|
||||
/**
|
||||
* Game container
|
||||
*
|
||||
* This is the overall container for the game. Different things get addead and
|
||||
* removed from this container depending on the game state.
|
||||
*/
|
||||
.mg {
|
||||
/* blank */
|
||||
}
|
||||
|
||||
/**
|
||||
* Game meta
|
||||
*
|
||||
* The game meta is the section that displays the level and moves. It's appended
|
||||
* to the game container at the start, and shows the level the user selected
|
||||
* and the number of moves the user has played.
|
||||
*/
|
||||
.mg__meta {
|
||||
margin-bottom: 10px;
|
||||
color: #28aadc;
|
||||
@ -173,12 +81,7 @@ img {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mg__contents {
|
||||
position: relative;
|
||||
padding-bottom: 50%;
|
||||
margin-left: 0%;
|
||||
margin-right: 0%;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Game tiles
|
||||
@ -482,7 +385,6 @@ img {
|
||||
}
|
||||
|
||||
.mg__tile--outside {
|
||||
background: url("/pictures/default/logo-bw.png") 50% 50% no-repeat;
|
||||
background-color: #dcdee1;
|
||||
box-shadow: 0 0 0 1px #787a80;
|
||||
}
|
||||
|
7
SRC/public/js/imagesloaded.pkgd.min.js
vendored
Normal file
7
SRC/public/js/imagesloaded.pkgd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -31,10 +31,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
function Memory( options ) {
|
||||
function Memory( options, level ) {
|
||||
this.options = extend( {}, this.options );
|
||||
extend( this.options, options );
|
||||
this._init();
|
||||
this._init(level);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -44,7 +44,7 @@
|
||||
* ready for game setup.
|
||||
*/
|
||||
|
||||
Memory.prototype._init = function() {
|
||||
Memory.prototype._init = function(level) {
|
||||
this.game = document.createElement("div");
|
||||
this.game.id = "mg";
|
||||
this.game.className = "mg";
|
||||
@ -65,7 +65,7 @@
|
||||
this.gameMessages.id = "mg__onend";
|
||||
this.gameMessages.className = "mg__onend";
|
||||
|
||||
this._setupGame();
|
||||
this._setupGame(level);
|
||||
};
|
||||
|
||||
/**
|
||||
@ -85,7 +85,7 @@
|
||||
* 3 : game is finished
|
||||
*/
|
||||
|
||||
Memory.prototype._setupGame = function() {
|
||||
Memory.prototype._setupGame = function(level) {
|
||||
var self = this;
|
||||
this.gameState = 1;
|
||||
this.cards = shuffle(this.options.cards);
|
||||
@ -98,7 +98,7 @@
|
||||
this.flippedTiles = 0;
|
||||
this.chosenLevel = "";
|
||||
this.numMoves = 0;
|
||||
this._setupGameWrapper(3);
|
||||
this._setupGameWrapper(level);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -155,7 +155,7 @@
|
||||
this.tilesHTML += '<div class="mg__tile mg__tile-' + n + '">\
|
||||
<div class="mg__tile--inner" data-id="' + this.newCards[i]["id"] + '">\
|
||||
<span class="mg__tile--outside"></span>\
|
||||
<span class="mg__tile--inside"><img src="' + this.newCards[i]["img"] + '"></span>';
|
||||
<span class="mg__tile--inside" style="background-image:url(' + this.newCards[i]["img"] + ');"></span>';
|
||||
this.tilesHTML +='</div>';
|
||||
|
||||
|
||||
@ -279,7 +279,7 @@
|
||||
self.card1.classList.remove("flipped");
|
||||
self.card2.classList.remove("flipped");
|
||||
self._gameResetVars();
|
||||
}, 900 );
|
||||
}, 500 );
|
||||
|
||||
// plus one on the move counter
|
||||
this._gameCounterPlusOne();
|
||||
|
@ -248,8 +248,6 @@
|
||||
@endsection
|
||||
@section('page-scripts')
|
||||
<script src="{{ URL::to('js/image-picker.min.js') }}"></script>
|
||||
<script src="{{ URL::to('js/masonry.min.js') }}"></script>
|
||||
<script src="{{ URL::to('js/image-picker.min.js') }}"></script>
|
||||
<script src="{{ URL::to('js/bootstrap-multiselect.js') }}"></script>
|
||||
<script>
|
||||
$("select.multiple").imagepicker();
|
||||
@ -258,14 +256,14 @@ $("select.multiple").imagepicker();
|
||||
$('#imagesSearched').load('{{ URL::to('api/searchOeuvres') }}', function(){$("select.multiple").imagepicker();});
|
||||
|
||||
|
||||
function fitGrid(){
|
||||
/*$('.thumbnails').masonry({
|
||||
/*function fitGrid(){
|
||||
$('.thumbnails').masonry({
|
||||
itemSelector: 'li',
|
||||
gutterWidth: 10
|
||||
}).masonry('reload');*/
|
||||
};
|
||||
}).masonry('reload');
|
||||
};*/
|
||||
|
||||
$('#imagesSearched').on('click', '.pager a', function (event) {
|
||||
$('#imagesSearched').on('click', '.pagination a', function (event) {
|
||||
event.preventDefault();
|
||||
if ( $(this).attr('href') != '#' ) {
|
||||
$("#imagesSearched").animate({ scrollTop: 0 }, "fast");
|
||||
@ -295,7 +293,6 @@ $("#recherche").on('submit', function(event){
|
||||
$('#imagesSearched').empty();
|
||||
$('#imagesSearched').append(data);
|
||||
$("select.multiple").imagepicker();
|
||||
fitGrid();
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -4,7 +4,7 @@
|
||||
<option data-img-src='http://www.augustins.org/documents/10180/156407/{{$oeuvre->image}}' value='{{$oeuvre->id}}'></option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<div class="text-center">
|
||||
{!! $oeuvres->render() !!}
|
||||
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Ajouter à la liste courante</button>
|
@ -4,20 +4,14 @@
|
||||
<link rel="stylesheet" href="/css/memory.css">
|
||||
<style>
|
||||
.mg__tile--inside {
|
||||
overflow: hidden;
|
||||
}
|
||||
.mg__tile--inside img {
|
||||
max-width: 100%;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
</style>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<div style="margin:auto;width:90%">
|
||||
<div id="my-memory-game"></div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
@ -38,7 +32,7 @@
|
||||
cards : cards2,
|
||||
onGameStart : function() { return false; },
|
||||
onGameEnd : function() { return false; }
|
||||
});
|
||||
}, {{$niveau}});
|
||||
|
||||
|
||||
</script>
|
||||
|
@ -10,21 +10,11 @@
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<button onclick="location.href='{{ URL::to('memo/jouer/1') }}'"><span style="color:gold;">
|
||||
<span class="icon-star-full"></span>
|
||||
</span><span class="icon-star-full"></span>
|
||||
<button onclick="location.href='{{ URL::to('memo/jouer/1') }}'"><span style="color:gold;"><span class="icon-star-full"></span></span><span class="icon-star-full"></span><span class="icon-star-full"></span></button><br>
|
||||
|
||||
<span class="icon-star-full"></span></button><br>
|
||||
<button onclick="location.href='{{ URL::to('memo/jouer/2') }}'"><span style="color:gold;">
|
||||
<span class="icon-star-full"></span>
|
||||
<span class="icon-star-full"></span>
|
||||
</span>
|
||||
<span class="icon-star-full"></span></button><br>
|
||||
<button onclick="location.href='{{ URL::to('memo/jouer/3') }}'"><span style="color:gold;">
|
||||
<span class="icon-star-full"></span>
|
||||
<span class="icon-star-full"></span><span class="icon-star-full"></span>
|
||||
</span>
|
||||
</button>
|
||||
<button onclick="location.href='{{ URL::to('memo/jouer/2') }}'"><span style="color:gold;"><span class="icon-star-full"></span><span class="icon-star-full"></span></span><span class="icon-star-full"></span></button><br>
|
||||
|
||||
<button onclick="location.href='{{ URL::to('memo/jouer/3') }}'"><span style="color:gold;"><span class="icon-star-full"></span><span class="icon-star-full"></span><span class="icon-star-full"></span></span></button>
|
||||
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user