vastly improved SVG crystals
This commit is contained in:
parent
7b5bfa4fe1
commit
dafc8c66fd
4 changed files with 15 additions and 14 deletions
|
@ -3,7 +3,7 @@
|
||||||
<v-tooltip @input="booted = true" bottom>
|
<v-tooltip @input="booted = true" bottom>
|
||||||
<template v-slot:activator="{ on }">
|
<template v-slot:activator="{ on }">
|
||||||
<v-list-tile-avatar v-on="on" style="cursor: zoom-in">
|
<v-list-tile-avatar v-on="on" style="cursor: zoom-in">
|
||||||
<Crystal :element="dbentry.element" :cost="dbentry.cost" />
|
<Crystal :size="35" :element="dbentry.element" :cost="dbentry.cost" />
|
||||||
</v-list-tile-avatar>
|
</v-list-tile-avatar>
|
||||||
</template>
|
</template>
|
||||||
<v-img
|
<v-img
|
||||||
|
|
|
@ -1,22 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<svg
|
<svg
|
||||||
x="0px"
|
:height="size + 'px'"
|
||||||
y="0px"
|
:width="16 / 30 * size + 'px'"
|
||||||
width="16px"
|
|
||||||
height="30px"
|
|
||||||
viewBox="0 0 16 30"
|
viewBox="0 0 16 30"
|
||||||
style="enable-background:new 0 0 16 30"
|
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
>
|
>
|
||||||
<polygon points="0,5 8,0 16,5 16,25 8,30 0,25" :fill="color" />
|
<polygon points="0,5 8,0 16,5 16,25 8,30 0,25" :style="{ fill: color }" />
|
||||||
|
<polygon points="7,5 7,25 2,25 2,5" style="fill:rgba(255,255,255,0.3);" />
|
||||||
|
<polygon points="0,5 8,0 16,5" style="fill:rgba(255,255,255,0.6);" />
|
||||||
|
<polygon points="10,25 16,25 8,30" style="fill:rgba(255,255,255,0.5);" />
|
||||||
<text
|
<text
|
||||||
x="2.5"
|
x="50%"
|
||||||
y="22"
|
text-anchor="middle"
|
||||||
|
y="17"
|
||||||
|
dominant-baseline="middle"
|
||||||
font-size="20"
|
font-size="20"
|
||||||
font-family="sans-serif"
|
font-family="sans-serif"
|
||||||
fill="white"
|
fill="white"
|
||||||
font-weight="bold"
|
font-weight="bold"
|
||||||
class="ng-binding"
|
|
||||||
>
|
>
|
||||||
{{ cost }}
|
{{ cost }}
|
||||||
</text>
|
</text>
|
||||||
|
@ -29,6 +30,7 @@ export default {
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
element: String,
|
element: String,
|
||||||
|
size: Number,
|
||||||
cost: Number
|
cost: Number
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
<v-flex text-xs-center xs4 sm3 md2>
|
<v-flex text-xs-center xs4 sm3 md2>
|
||||||
<Crystal
|
<Crystal
|
||||||
v-for="element in deck.elements()"
|
v-for="element in deck.elements()"
|
||||||
:key="element.name"
|
:size="40"
|
||||||
:element="element.name"
|
:element="element.name"
|
||||||
|
:key="element.name"
|
||||||
/>
|
/>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-flex class="subheading">
|
<v-flex class="subheading">
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
<v-icon>view_carousel</v-icon> Decks
|
<v-icon>view_carousel</v-icon> Decks
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
<v-btn flat>
|
<v-btn flat> <v-icon>play_arrow</v-icon> Play </v-btn>
|
||||||
<v-icon>play_arrow</v-icon> Play
|
|
||||||
</v-btn>
|
|
||||||
|
|
||||||
<v-btn flat :to="{ name: 'usercp' }">
|
<v-btn flat :to="{ name: 'usercp' }">
|
||||||
<v-icon>person</v-icon> {{ user.login }}
|
<v-icon>person</v-icon> {{ user.login }}
|
||||||
|
|
Reference in a new issue