From b8c0ce241a9f549df1c9a0ca363f68cd304fb067 Mon Sep 17 00:00:00 2001 From: exane Date: Sat, 4 Jul 2015 17:33:06 +0200 Subject: [PATCH] add deck-card-number --- client/js/client.js | 9 +++++++++ client/scss/main.scss | 5 +++++ client/templates/battle.handlebars | 10 +++++----- client/templates/cardpiles.handlebars | 7 +++++++ 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 client/templates/cardpiles.handlebars diff --git a/client/js/client.js b/client/js/client.js index 397255d..caa9fab 100644 --- a/client/js/client.js +++ b/client/js/client.js @@ -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"); diff --git a/client/scss/main.scss b/client/scss/main.scss index e84d1b5..a6ff8ff 100644 --- a/client/scss/main.scss +++ b/client/scss/main.scss @@ -200,6 +200,11 @@ $game-height: 800px; //height: $game-height; } +.field-deck-number { + display: block; + text-align: center; +} + .score, .hand-card { color: #8798ac; diff --git a/client/templates/battle.handlebars b/client/templates/battle.handlebars index 91dfbc7..1574a7a 100644 --- a/client/templates/battle.handlebars +++ b/client/templates/battle.handlebars @@ -36,7 +36,7 @@
-
+
@@ -72,19 +72,19 @@
-
+
-
+
\ No newline at end of file diff --git a/client/templates/cardpiles.handlebars b/client/templates/cardpiles.handlebars new file mode 100644 index 0000000..814de20 --- /dev/null +++ b/client/templates/cardpiles.handlebars @@ -0,0 +1,7 @@ +
+ +
+
+ + {{data.deck}} +
\ No newline at end of file