yandere_fe/src/components/user_avatar/user_avatar.vue

45 lines
947 B
Vue
Raw Normal View History

<template>
2019-02-05 07:17:50 -08:00
<StillImage
class="avatar"
:alt="user.screen_name"
:title="user.screen_name"
2019-08-28 11:02:04 -07:00
:src="imgSrc"
2019-02-05 07:17:50 -08:00
:class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }"
2019-07-05 00:17:44 -07:00
:image-load-error="imageLoadError"
2019-02-05 07:17:50 -08:00
/>
</template>
<script src="./user_avatar.js"></script>
2019-02-02 11:33:13 -08:00
<style lang="scss">
@import '../../_variables.scss';
.avatar.still-image {
width: 48px;
height: 48px;
box-shadow: var(--avatarStatusShadow);
border-radius: $fallback--avatarRadius;
border-radius: var(--avatarRadius, $fallback--avatarRadius);
img {
width: 100%;
height: 100%;
}
2019-02-02 11:33:13 -08:00
&.better-shadow {
box-shadow: var(--avatarStatusShadowInset);
filter: var(--avatarStatusShadowFilter)
}
&.animated::before {
display: none;
}
&.avatar-compact {
width: 32px;
height: 32px;
border-radius: $fallback--avatarAltRadius;
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
2019-02-02 11:33:13 -08:00
}
}
</style>