Files
habitica/website/client/components/members/classBadge.vue
Matteo Pagliazzi ee82f5a774 Client: Tasks and Header v2 (#9168)
* wip: footer

* pin bootstrap-vue

* compact footer and fixes

* compact header

* fix member details in other views

* fix first party member in header

* fix unread notifications badge color

* sync + menu fixes

* loading bar styles

* new filter button

* create button

* create fixes

* quick add

* fix quick add inputs

* tooltips for create buttons

* fix create task moda

* fix class badge

* fixed footer links

* revert change that caused problems with tests and old browsers

* misc
2017-10-16 22:04:16 +02:00

55 lines
1.1 KiB
Vue

<template lang="pug">
.class-badge.d-flex.justify-content-center
.align-self-center.svg-icon(v-html="icons[memberClass]")
</template>
<style lang="scss" scoped>
@import '~client/assets/scss/colors.scss';
.class-badge {
$badge-size: 32px;
width: $badge-size;
height: $badge-size;
background: $white;
box-shadow: 0 2px 2px 0 rgba($black, 0.16), 0 1px 4px 0 rgba($black, 0.12);
border-radius: 100px;
&.under-avatar {
position: absolute;
left: calc(50% - (16px));
bottom: -($badge-size / 2);
}
.svg-icon {
width: 19px;
height: 19px;
}
}
</style>
<script>
import warriorIcon from 'assets/svg/warrior.svg';
import rogueIcon from 'assets/svg/rogue.svg';
import healerIcon from 'assets/svg/healer.svg';
import wizardIcon from 'assets/svg/wizard.svg';
export default {
props: {
memberClass: {
type: String,
required: true,
},
},
data () {
return {
icons: Object.freeze({
warrior: warriorIcon,
rogue: rogueIcon,
healer: healerIcon,
wizard: wizardIcon,
}),
};
},
};
</script>