Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started implementing card browser for stacks
- Loading branch information
1 parent
0ff1207
commit 53edb12
Showing
9 changed files
with
1,117 additions
and
64 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<style lang="sass"> | ||
.card-browser { | ||
position:absolute; | ||
width: 100vw; | ||
top:50%; | ||
margin-top:-226px; | ||
left: 0; | ||
overflow-x: scroll; | ||
z-index: 99; | ||
} | ||
.card-browser__list { | ||
margin:0; | ||
padding:0; | ||
list-style-type:none; | ||
width:9960px; //332*30 | ||
display: block; | ||
height: 452px; | ||
} | ||
.card-browser__item { | ||
display:inline-block; | ||
} | ||
.card-browser__overlay { | ||
position:fixed; | ||
top:0; | ||
right:0; | ||
bottom:0; | ||
left:0; | ||
background-color:transparentize(black,0.2); | ||
z-index:98; | ||
} | ||
.card-browser .card { | ||
width:332px; | ||
height:452px; | ||
background-size:332px 452px; | ||
} | ||
</style> | ||
|
||
<template> | ||
<div class="card-browser__overlay" v-show="viewBrowser" @click="closeBrowser"></div> | ||
<div class="card-browser" v-show="viewBrowser"> | ||
<ul class="card-browser__list"> | ||
<li v-for="cardName in cards" track-by="$index" class="card-browser__item"> | ||
<card :card-name="cardName"></card> | ||
</li> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import card from '../game/card.vue'; | ||
export default { | ||
components: { | ||
card | ||
}, | ||
data: function() { | ||
return { | ||
viewBrowser: false, | ||
cards: [] | ||
} | ||
}, | ||
methods: { | ||
openBrowser: function(cards) { | ||
console.log('browser: ' + cards); | ||
this.cards = cards; | ||
console.log('browser own: ' + this.cards); | ||
this.viewBrowser = true; | ||
}, | ||
closeBrowser: function() { | ||
this.viewBrowser = false; | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters