mirror of
https://github.com/exane/not-gwent-online
synced 2024-11-23 19:36:53 +00:00
yo
This commit is contained in:
parent
de5cc1da00
commit
72d97d2361
@ -464,7 +464,7 @@ let BattleView = Backbone.View.extend({
|
|||||||
}
|
}
|
||||||
if(this.user.get("setAgile")){
|
if(this.user.get("setAgile")){
|
||||||
let id = this.user.get("setAgile");
|
let id = this.user.get("setAgile");
|
||||||
this.$el.find("[data-id='" + id + "']").addClass("activeCard");
|
this.$el.find("[data-id='" + id + "']").parent().addClass("activeCard");
|
||||||
}
|
}
|
||||||
if(this.user.get("setHorn")){
|
if(this.user.get("setHorn")){
|
||||||
let id = this.user.get("setHorn");
|
let id = this.user.get("setHorn");
|
||||||
@ -585,16 +585,17 @@ let BattleView = Backbone.View.extend({
|
|||||||
},
|
},
|
||||||
calculateMargin: function($container, minSize){
|
calculateMargin: function($container, minSize){
|
||||||
minSize = typeof minSize === "number" && minSize >= 0 ? minSize : 6;
|
minSize = typeof minSize === "number" && minSize >= 0 ? minSize : 6;
|
||||||
|
var Class = $container.find(".card-wrap").length ? ".card-wrap" : ".card";
|
||||||
var n = $container.children().size();
|
var n = $container.children().size();
|
||||||
let w = $container.width(), c = $container.find(".card").outerWidth() + 3;
|
let w = $container.width(), c = $container.find(Class).outerWidth();
|
||||||
let res;
|
let res;
|
||||||
if(n < minSize)
|
if(n < minSize)
|
||||||
res = 0;
|
res = 0;
|
||||||
else {
|
else {
|
||||||
res = -((w - c) / (n - 1) - c) + 1
|
res = 0;//-((w - c) / (n - 1) - c) + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
$container.find(".card").css("margin-left", -res);
|
$container.find(Class).css("margin-left", -res);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -838,7 +839,7 @@ let User = Backbone.Model.extend({
|
|||||||
side: roomSide
|
side: roomSide
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCardData: function(card) {
|
getCardData: function(card){
|
||||||
if(!card || !card.ability) return;
|
if(!card || !card.ability) return;
|
||||||
var abilities;
|
var abilities;
|
||||||
|
|
||||||
@ -850,7 +851,7 @@ let User = Backbone.Model.extend({
|
|||||||
abilities.push(card.ability);
|
abilities.push(card.ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
abilities = abilities.map((ability) => {
|
abilities = abilities.map((ability) =>{
|
||||||
return abilityData[ability].description;
|
return abilityData[ability].description;
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -938,7 +939,7 @@ let Preview = Backbone.View.extend({
|
|||||||
this.abilities.push(this.card.ability);
|
this.abilities.push(this.card.ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.abilities = this.abilities.map((ability) => {
|
this.abilities = this.abilities.map((ability) =>{
|
||||||
return abilityData[ability].description;
|
return abilityData[ability].description;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1,8 +1,53 @@
|
|||||||
|
.card-wrap {
|
||||||
|
float: left;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 10;
|
||||||
|
height: auto !important;
|
||||||
|
width: auto !important;
|
||||||
|
margin: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-wrap .shadow,
|
||||||
|
.grave .shadow {
|
||||||
|
height: calc(100% - 40px);
|
||||||
|
left: 14px;
|
||||||
|
top: 20px;
|
||||||
|
width: calc(100% - 26px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.card-wrap:hover {
|
||||||
|
z-index: 20;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
.card {
|
||||||
|
border: none !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
overflow: visible !important;
|
||||||
|
height: 93px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
float: left;
|
||||||
|
height: 93px;
|
||||||
|
width: 69px;
|
||||||
|
position: relative;
|
||||||
|
transition: margin .05s ease-in-out 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card i {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 3px;
|
||||||
|
left: 3px;
|
||||||
|
height: 87px;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
.small-cards-modal {
|
.small-cards-modal {
|
||||||
|
|
||||||
|
|
||||||
.hand-wrap {
|
.hand-wrap {
|
||||||
background: rgba(0,0,0,.8);
|
background: rgba(0, 0, 0, .8);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 130px;
|
height: 130px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -25,62 +70,71 @@
|
|||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-wrap {
|
}
|
||||||
|
|
||||||
|
.card-wrap {
|
||||||
float: left;
|
float: left;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
margin: 3px;
|
margin: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.activeCard {
|
||||||
|
position: relative;
|
||||||
|
z-index: 19 !important;
|
||||||
|
transform: scale(1.1, 1.1) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-wrap .shadow,
|
.card-wrap .shadow,
|
||||||
.grave .shadow {
|
.grave .shadow {
|
||||||
height: calc(100% - 40px);
|
height: calc(100% - 40px);
|
||||||
left: 14px;
|
left: 14px;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
width: calc(100% - 26px);
|
width: calc(100% - 26px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-wrap:hover {
|
.card-wrap:hover, .activeCard {
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
float: left;
|
float: left;
|
||||||
height: 93px;
|
height: 93px;
|
||||||
width: 69px;
|
width: 69px;
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: margin .05s ease-in-out 0s;
|
transition: margin .05s ease-in-out 0s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card i {
|
.card i {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 3px;
|
top: 3px;
|
||||||
left: 3px;
|
left: 3px;
|
||||||
height: 87px;
|
height: 87px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** SHAME **/
|
/** SHAME **/
|
||||||
|
|
||||||
.card-wrap:hover .bla,
|
.card-wrap:hover .bla,
|
||||||
.grave:hover .bla,
|
.activeCard .bla,
|
||||||
.leader-card:hover .bla {
|
.grave:hover .bla,
|
||||||
|
.leader-card:hover .bla {
|
||||||
box-shadow: 0 0 2px 0 orange;
|
box-shadow: 0 0 2px 0 orange;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bla {
|
.bla {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shadow {
|
.shadow {
|
||||||
border-radius: 35%;
|
border-radius: 35%;
|
||||||
box-shadow: 0 0 15px 14px #ffa500;
|
box-shadow: 0 0 15px 14px #ffa500;
|
||||||
content: "";
|
content: "";
|
||||||
@ -92,85 +146,90 @@
|
|||||||
top: 30px;
|
top: 30px;
|
||||||
transition: all 0.3s ease-in-out 0s;
|
transition: all 0.3s ease-in-out 0s;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-wrap:hover .shadow,
|
.card-wrap:hover .shadow,
|
||||||
.grave:hover .shadow,
|
.grave:hover .shadow,
|
||||||
.leader-card:hover .shadow {
|
.activeCard .shadow,
|
||||||
|
.leader-card:hover .shadow {
|
||||||
-webkit-animation: Shadow 4s ease-in-out infinite;
|
-webkit-animation: Shadow 4s ease-in-out infinite;
|
||||||
-moz-animation: Shadow 4s ease-in-out infinite;
|
-moz-animation: Shadow 4s ease-in-out infinite;
|
||||||
animation: Shadow 4s ease-in-out infinite;
|
animation: Shadow 4s ease-in-out infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ani {
|
.ani {
|
||||||
background: linear-gradient(2deg, #000, #000, #000, #000);;
|
background: linear-gradient(2deg, #000, #000, #000, #000);;
|
||||||
transition: all .05s ease-in-out 0s;
|
transition: all .05s ease-in-out 0s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-wrap:hover .ani,
|
.card-wrap:hover .ani,
|
||||||
.grave:hover .ani,
|
.activeCard .ani,
|
||||||
.leader-card:hover .ani {
|
.grave:hover .ani,
|
||||||
|
.leader-card:hover .ani {
|
||||||
background: linear-gradient(2deg, #ffa500, #ffd68b, #ffa500, #ffa500);
|
background: linear-gradient(2deg, #ffa500, #ffd68b, #ffa500, #ffa500);
|
||||||
background-size: 800% 800%;
|
background-size: 800% 800%;
|
||||||
|
|
||||||
-webkit-animation: AnimationName 3s ease infinite;
|
-webkit-animation: AnimationName 3s ease infinite;
|
||||||
-moz-animation: AnimationName 3s ease infinite;
|
-moz-animation: AnimationName 3s ease infinite;
|
||||||
animation: AnimationName 3s ease infinite;
|
animation: AnimationName 3s ease infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@-webkit-keyframes Shadow {
|
@-webkit-keyframes Shadow {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
25% {
|
25% {
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
50%{
|
50% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
75% {
|
75% {
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
100%{ opacity: 0;
|
100% {
|
||||||
}
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@-webkit-keyframes Shadow {
|
@-webkit-keyframes Shadow {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
25% {
|
25% {
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
50%{
|
50% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
75% {
|
75% {
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
100%{ opacity: 0;
|
100% {
|
||||||
}
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes Shadow {
|
@keyframes Shadow {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
25% {
|
25% {
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
50%{
|
50% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
75% {
|
75% {
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
100%{ opacity: 0;
|
100% {
|
||||||
}
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.overlay-card {
|
.overlay-card {
|
||||||
background: linear-gradient(2deg, rgba(255,255,255,.03), rgba(255,255,255,.2), rgba(255,255,255,.05));
|
background: linear-gradient(2deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .2), rgba(255, 255, 255, .05));
|
||||||
background-size: 800% 800%;
|
background-size: 800% 800%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
@ -180,49 +239,70 @@
|
|||||||
height: calc(100% - 4px);
|
height: calc(100% - 4px);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-wrap:hover .overlay-card,
|
.card-wrap:hover .overlay-card,
|
||||||
.grave:hover .overlay-card,
|
.activeCard .overlay-card,
|
||||||
.leader-card:hover .overlay-card {
|
.grave:hover .overlay-card,
|
||||||
|
.leader-card:hover .overlay-card {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
-webkit-animation: AnimationName 10s ease infinite;
|
-webkit-animation: AnimationName 10s ease infinite;
|
||||||
-moz-animation: AnimationName 10s ease infinite;
|
-moz-animation: AnimationName 10s ease infinite;
|
||||||
animation: AnimationName 10s ease infinite;
|
animation: AnimationName 10s ease infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@-webkit-keyframes AnimationName {
|
@-webkit-keyframes AnimationName {
|
||||||
0%{background-position:51% 0%}
|
0% {
|
||||||
50%{background-position:50% 100%}
|
background-position: 51% 0%
|
||||||
100%{background-position:51% 0%}
|
|
||||||
}
|
}
|
||||||
@-moz-keyframes AnimationName {
|
50% {
|
||||||
0%{background-position:51% 0%}
|
background-position: 50% 100%
|
||||||
50%{background-position:50% 100%}
|
|
||||||
100%{background-position:51% 0%}
|
|
||||||
}
|
}
|
||||||
@keyframes AnimationName {
|
100% {
|
||||||
0%{background-position:51% 0%}
|
background-position: 51% 0%
|
||||||
50%{background-position:50% 100%}
|
|
||||||
100%{background-position:51% 0%}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** SUB HAND **/
|
@-moz-keyframes AnimationName {
|
||||||
|
0% {
|
||||||
|
background-position: 51% 0%
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
background-position: 50% 100%
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background-position: 51% 0%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.sub-hand {
|
@keyframes AnimationName {
|
||||||
|
0% {
|
||||||
|
background-position: 51% 0%
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
background-position: 50% 100%
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background-position: 51% 0%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** SUB HAND **/
|
||||||
|
|
||||||
|
.sub-hand {
|
||||||
float: left;
|
float: left;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
margin: 18px 0 0 0;
|
margin: 18px 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grave {
|
.grave {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 69px;
|
width: 69px;
|
||||||
height: 93px;
|
height: 93px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grave-img {
|
.grave-img {
|
||||||
background: url(../grave.png) no-repeat;
|
background: url(../grave.png) no-repeat;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 63px;
|
width: 63px;
|
||||||
@ -230,14 +310,13 @@
|
|||||||
top: 3px;
|
top: 3px;
|
||||||
left: 3px;
|
left: 3px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.deck-back {
|
.deck-back {
|
||||||
background: url(../back.png) no-repeat;
|
background: url(../back.png) no-repeat;
|
||||||
float: left;
|
float: left;
|
||||||
width: 63px;
|
width: 63px;
|
||||||
height: 87px;
|
height: 87px;
|
||||||
margin: 3px 0 0 10px;
|
margin: 3px 0 0 10px;
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,10 @@ $game-height: 800px;
|
|||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
&.active {
|
&.active {
|
||||||
box-shadow: 0px 0px 15px #ffbb0b;
|
box-shadow: 0px 0px 15px #ffbb0b !important;
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0px 0px 30px #ffd135 !important;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -77,7 +80,7 @@ $game-height: 800px;
|
|||||||
&:hover {
|
&:hover {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
transform: scale(1.25, 1.25);
|
transform: scale(1.1, 1.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,16 +125,35 @@ $game-height: 800px;
|
|||||||
height: $game-height/2;
|
height: $game-height/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.field {
|
||||||
|
.card-wrap {/*
|
||||||
|
height: 90px;
|
||||||
|
width: 63px !important;*//*
|
||||||
|
float: left;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 10;
|
||||||
|
height: auto !important;
|
||||||
|
width: auto !important;
|
||||||
|
margin: 3px;*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
border: 2px solid black;
|
/*border: 2px solid black;
|
||||||
float: left;
|
float: left;
|
||||||
margin: 3px;
|
margin: 3px;
|
||||||
|
overflow: hidden;*//*
|
||||||
height: 90px;
|
height: 90px;
|
||||||
overflow: hidden;
|
overflow: hidden;*//*
|
||||||
|
border: none !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
overflow: visible !important;
|
||||||
|
height: 93px !important;
|
||||||
|
*/
|
||||||
|
|
||||||
|
i {/*
|
||||||
i {
|
display: block;*/
|
||||||
display: block;
|
|
||||||
//transform: scale(1);
|
//transform: scale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,11 +177,12 @@ $game-height: 800px;
|
|||||||
margin-left: -4px;
|
margin-left: -4px;
|
||||||
//margin-top: 2px;
|
//margin-top: 2px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
padding-top: 4px;
|
//padding-top: 3px;
|
||||||
//padding-left: -4px;
|
//padding-left: -4px;
|
||||||
height: 37px;
|
height: 30px;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
background: url("../../assets/card_strength_border.png") no-repeat;
|
background: url("../../assets/card_strength_border.png") no-repeat;
|
||||||
|
z-index: 11;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: #ff2d00;
|
color: #ff2d00;
|
||||||
@ -170,6 +193,8 @@ $game-height: 800px;
|
|||||||
width: 30px;
|
width: 30px;
|
||||||
display: block;
|
display: block;
|
||||||
margin-left: -2px;
|
margin-left: -2px;
|
||||||
|
margin-top: -1px;
|
||||||
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,11 +202,11 @@ $game-height: 800px;
|
|||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.activeCard {
|
/*&.activeCard {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 11;
|
z-index: 11;
|
||||||
transform: scale(1.5, 1.5) !important;
|
transform: scale(1.5, 1.5) !important;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-preview {
|
.card-preview {
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 field field-hand">
|
<div class="col-xs-12 field field-hand {{#if isWaiting}}{{else}}active{{/if}}">
|
||||||
{{#each cards as |val key|}}
|
{{#each cards as |val key|}}
|
||||||
{{>card val}}
|
{{>card val}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
Loading…
Reference in New Issue
Block a user