1
0
mirror of https://github.com/exane/not-gwent-online synced 2025-10-09 07:39:08 +00:00

few simple changes

This commit is contained in:
devfake
2015-06-24 07:09:16 +02:00
parent 28aefb4417
commit ddd168b2dd
9 changed files with 452 additions and 190 deletions

View File

@@ -1,5 +1,35 @@
var cards = require("../../../../../../assets/data/cards");
var deck = require("../../../../../../assets/data/deck");
module.exports = {
template: require('../views/deck-builder.html')
template: require('../views/deck-builder.html'),
data: function() {
return {
cards: [],
deck: []
}
},
ready: function() {
this.cards = $.map(cards, function(n) {
if(n.faction == 'Northern Realm' && n.type != 3) return n;
});
$.map(deck, (n, i) => {
if(i == 'northern_realm') {
for(var m in n) {
//console.log(this.cards[m].type);
this.deck.push(this.cards[m]);
}
}
});
},
filters: {
leader: function(deck) {
//return deck.type == 3 ? deck : 'ne';
}
}
};

View File

@@ -1 +1,33 @@
deckbuilder
<div class="heading">Nord Deck</div>
<div class="all-cards-wrap">
<div class="all-cards">
<div class="clear-space"></div>
<div class="card-wrap" v-repeat="card: cards">
<div class="bla ani"></div>
<div class="card-img card" style="background-image: url(http://80.240.132.120/gwent/assets/cards/{{ card.img }}.png)"></div>
<div class="shadow"></div>
<div class="overlay-card"></div>
</div>
<div class="clear-space"></div>
</div>
</div>
<!--div class="line"></div-->
<p>{{ leader.name }}</p>
<style>
.container-content {
padding: 0;
}
.test {
float: left;
overflow: hidden;
}
</style>