summaryrefslogtreecommitdiff
path: root/src/TalentBox.vue
blob: d9f220ed612d373bfcc34b9db511e4eec81b90c8 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<template>
<div>
  <p class="title-box">{{ title }}</p>
  <div class="columns">

    <div class="column is-centered">
      <figure class="image is-64x64 hero-image-slot">
        <img class="hero-image" :src="'dist/assets/hero-icons/' + hero.toLowerCase() + '.png'" :alt="entry.Actor">
      </figure>
      <p class="hero-name">{{ hero }}</p>
    </div>
    <div class="column value is-centered">
      <talent-image :entry="entry" :size="64"></talent-image>
        {{ value }}{{ label }}
        <div class="type">{{ type }}</div>
    </div>
    </div>
  </div>
</template>

<style scoped>
.title-box {
  font-size: 20px;
  text-transform: uppercase;
}
.is-centered {
  display: flex;
  /* flex-align: center; */
  justify-content: center;
  align-content: center;
  align-items: center;
  flex-direction: column;
}

.hero-image-slot {
  display: inline-block;
}

.hero-image {
  /* width: 128px;
    height: 128px; */
  /* border-radius: 50%; */
  overflow: hidden;
  border: 5px solid rgba(27, 40, 56, 0.1);
}

.hero-name {
  font-size: 18px;
  /* margin-bottom: 10px; */
}

.value {
  font-size: 24px;
  text-align: center;
}
.value .type {
  position: absolute;
  bottom: 5px;
  font-size: 14px;
}
</style>


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

export default Vue.component("talent-box", {
  props: ["title", "content", "entry", "type", "value", "label"],
  data: function() {
    return {
      hero: maps.getHero(this.entry.Actor),
    };
  },
  components: {
    TalentImage
  }
});
</script>