1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-12-23 21:03:14 +00:00

add deck-card-number

This commit is contained in:
exane 2015-07-04 17:33:06 +02:00
parent 2d1fb7056e
commit b8c0ce241a
4 changed files with 26 additions and 5 deletions

View File

@ -114,6 +114,7 @@ let SideView = Backbone.View.extend({
template: require("../templates/cards.handlebars"),
templateCards: require("../templates/fieldCards.handlebars"),
templateInfo: require("../templates/info.handlebars"),
templateCardpiles: require("../templates/cardpiles.handlebars"),
initialize: function(options){
let self = this;
this.side = options.side;
@ -145,6 +146,14 @@ let SideView = Backbone.View.extend({
this.$info = this.$el.find(".game-info" + this.side).html(html);
/*let $deck = $(this.side + " .field-deck");
$deck*/
this.$deck = $(this.side + ".right-side");
this.$deck.html(this.templateCardpiles({
data: d
}));
if(this.app.user.get("waiting") && this.side === ".player"){
this.$info.addClass("removeBackground");

View File

@ -200,6 +200,11 @@ $game-height: 800px;
//height: $game-height;
}
.field-deck-number {
display: block;
text-align: center;
}
.score,
.hand-card {
color: #8798ac;

View File

@ -36,7 +36,7 @@
<div class="col-xs-11 field-close"></div>
</div>
</div>
<div class="col-xs-12 mid-line"></div>
<!--<div class="col-xs-12 mid-line"></div>-->
<div class="col-xs-12 battleside battleside-player player">
<div class="col-xs-2 field-horn field-horn-close">
</div>
@ -72,19 +72,19 @@
<div class="col-xs-12 card-preview">
</div>
<div class="col-xs-12 right-side right-side-foe foe">
<div class="col-xs-4 field-discard field-single">
<!--<div class="col-xs-4 field-discard field-single">
<i class="discard-skull"></i>
</div>
<div class="col-xs-4 field-deck field-single">
<i class="icon-deck"></i>
</div>
</div>-->
</div>
<div class="col-xs-12 right-side right-side-player player">
<div class="col-xs-4 field-discard field-single">
<!--<div class="col-xs-4 field-discard field-single">
<i class="discard-skull"></i>
</div>
<div class="col-xs-4 field-deck field-single">
<i class="icon-deck"></i>
</div>
</div>-->
</div>
</div>

View File

@ -0,0 +1,7 @@
<div class="col-xs-4 field-discard field-single">
<i class="discard-skull"></i>
</div>
<div class="col-xs-4 field-deck field-single">
<i class="icon-deck"></i>
<span class="field-deck-number">{{data.deck}}</span>
</div>