summaryrefslogtreecommitdiff
path: root/src/TalentBox.vue
blob: c779e12e59bca034346e204efdf20f11d8b9cc07 (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
35
36
37
38
39
40
41
<template>
  <div class="box">
    <p class="title">{{ title }}</p>
    <article class="media">
      <div class="media-left">
        <figure class="image is-64x64">
          <img :src="'dist/assets/hero-icons/' + hero.toLowerCase() + '.png'" :alt="entry.Actor">
        </figure>
        <figure class="image is-64x64">
          <img :src="'dist/assets/talent-icons-small/' + hero + '/' + hero + '_' + rarity + '.png'" :alt="hero + ' ' + rarity">
        </figure>
      </div>
      <div class="media-content">
        <div class="content">
          <slot></slot>
        </div>
      </div>
    </article>
  </div>
</template>

<script>
import Vue from 'vue';
import * as maps from './maps/maps';

export default Vue.component('talent-box', {
  props: [ 'title', 'content', 'entry' ],
  data: function() {
    return {
    };
  },
  computed: {
    hero: function() {
      return maps.getHero(this.entry.Actor);
    },
    rarity: function() {
      return maps.getTalentRarity(this.entry.Talent);
    },
  },
});
</script>