Merge remote-tracking branch 'origin/master'

Conflicts:
	SRC/resources/views/home.blade.php
This commit is contained in:
alexandre-pereira
2015-03-10 16:00:02 +01:00
6 changed files with 69 additions and 63 deletions

View File

@ -120,7 +120,7 @@ img {
*/
.mg__start-screen {
text-align: center;
padding: 80px 20px;
padding: 5% 20px;
}
.mg__start-screen--heading {
@ -167,14 +167,17 @@ img {
*/
.mg__wrapper {
margin: 0 auto;
margin: 0;
padding: 0;
width: 100%;
text-align: center;
}
.mg__contents {
position: relative;
padding-bottom: 47%;
margin-left: -5px;
margin-right: -5px;
padding-bottom: 50%;
margin-left: 0%;
margin-right: 0%;
}
/**
@ -239,43 +242,45 @@ img {
.mg__level-2 .mg__tile-1 {
top: 0%;
left: 0%;
left: 23%;
}
.mg__level-2 .mg__tile-2 {
top: 0%;
left: 16.66667%;
left: 39.66667%;
}
.mg__level-2 .mg__tile-3 {
top: 0%;
left: 33.33333%;
left: 56.33333%;
}
/*
.mg__level-2 .mg__tile-4 {
top: 0%;
left: 50%;
left: 73%;
}
.mg__level-2 .mg__tile-5 {
top: 0%;
left: 66.66667%;
left: 89.66667%;
}
.mg__level-2 .mg__tile-6 {
top: 0%;
left: 83.33333%;
}
}*/
.mg__level-2 .mg__tile-7 {
top: 33.33333%;
left: 0%;
left: 23%;
}
.mg__level-2 .mg__tile-8 {
top: 33.33333%;
left: 16.66667%;
left: 39.66667%;
}
.mg__level-2 .mg__tile-9 {
top: 33.33333%;
left: 33.33333%;
left: 56.33333%;
}
/*
.mg__level-2 .mg__tile-10 {
top: 33.33333%;
left: 50%;
left: 73%;
}
.mg__level-2 .mg__tile-11 {
top: 33.33333%;
@ -309,7 +314,7 @@ img {
top: 66.66667%;
left: 83.33333%;
}
*/
/* game__level-3 styles */
.mg__level-3 .mg__tile {
width: 12.5%;
@ -318,20 +323,21 @@ img {
.mg__level-3 .mg__tile-1 {
top: 0%;
left: 0%;
left: 23%;
}
.mg__level-3 .mg__tile-2 {
top: 0%;
left: 12.5%;
left: 35.5%;
}
.mg__level-3 .mg__tile-3 {
top: 0%;
left: 25%;
left: 48%;
}
.mg__level-3 .mg__tile-4 {
top: 0%;
left: 37.5%;
left: 60.5%;
}
/*
.mg__level-3 .mg__tile-5 {
top: 0%;
left: 50%;
@ -347,26 +353,26 @@ img {
.mg__level-3 .mg__tile-8 {
top: 0%;
left: 87.5%;
}
}*/
.mg__level-3 .mg__tile-9 {
top: 25%;
left: 0%;
left: 23%;
}
.mg__level-3 .mg__tile-10 {
top: 25%;
left: 12.5%;
left: 35.5%;
}
.mg__level-3 .mg__tile-11 {
top: 25%;
left: 25%;
left: 48%;
}
.mg__level-3 .mg__tile-12 {
top: 25%;
left: 37.5%;
left: 60.5%;
}
.mg__level-3 .mg__tile-13 {
top: 25%;
left: 50%;
left: 73%;
}
.mg__level-3 .mg__tile-14 {
top: 25%;

View File

@ -198,7 +198,7 @@
</span>\
</div>\
<div class="mg__meta--right">\
<button id="mg__button--restart" class="mg__button btn-lg"><i class="fa fa-repeat fa-3x fa-spin"></i></button>\
<button id="mg__button--restart" class="mg__button btn-lg"><i class="fa fa-repeat fa-1x fa-spin"></i></button>\
</div>';
this.gameMeta.innerHTML = this.gameMetaHTML;
this.game.appendChild(this.gameMeta);
@ -207,8 +207,8 @@
// <button type="button" class="btn btn-default"> <span class="glyphicon glyphicon-star-empty"></span> </button>
this.gameStartScreenHTML = '<h2 class="mg__start-screen--heading">Welcome to the Memory Game!</h2>\
<h3 class="mg__start-screen--sub-heading">Choisir niveau</h3>\
this.gameStartScreenHTML = '<h2 class="mg__start-screen--heading">JEU MEMORY</h2>\
<h3 class="mg__start-screen--sub-heading">Choisir un niveau : </h3>\
<ul class="mg__start-screen--level-select">\
<span data-level="1"><button class="btn btn-success btn-lg"><i class="fa fa-2x fa-star-o"></i></button></span>\
<span data-level="2"><button class="btn btn-warning btn-lg "><i class="fa fa-2x fa-star-half-o"></i><i class="fa fa-2x fa-star-half-o"></i></button></span>\
@ -304,18 +304,19 @@
this.newCards.push(this.cards[i], this.cards[i]);
}
this.newCards = shuffle(this.newCards);
/* this.newCards.push(0, 0);
this.newCards.push(0, 0);*/
this.tilesHTML = '';
var n = 0;
for ( var i = 0; i < this.numTiles; i++ ) {
var n = i + 1;
//this.tilesHTML += '<div class="col-xs-6 col-sm-4">';
n = n + 1;
if(this.level == 3 && n == 5 ){n = 9}
if(this.level == 2 && n == 4 ){n = 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>';
this.tilesHTML +='</div>';
// this.tilesHTML +='</div>';
/* if(this.level == 1 && n == 2){
this.tilesHTML +="</tr><tr>";