blob: 4dd2e95a8b9d908eef81680c4a0fed8acc04cc4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<template>
<div v-if="rarity != 'None'"
class="talent-image"
:style="`background-image: url('/dist/assets/talent-icons-small/${hero}/${hero}_${rarity}.jpg'); width: ${size}px; height: ${size}px`"
:alt="`${hero} ${rarity}`"
:title="`${hero} ${rarity}`">
</div>
</template>
<style scoped>
.talent-image {
background-size: 230%;
border-radius: 50%;
background-position: center center;
}
</style>
<script>
import Vue from 'vue';
import * as maps from './maps/maps';
export default Vue.component('talent-image', {
props: [ 'entry', 'size' ],
computed: {
hero: function() {
return maps.getHero(this.entry.Actor);
},
rarity: function() {
return maps.getTalentRarity(this.entry.Talent);
},
},
});
</script>
|