pinafore/routes/_components/status/Avatar.html
Nolan Lawson c0c7e9fafe refactor
2018-01-27 16:35:44 -08:00

28 lines
542 B
HTML

{{#if error}}
<svg class="{{className}} avatar" aria-hidden="true">
<use xlink:href="#fa-user" />
</svg>
{{else}}
<img class="{{className}} avatar" aria-hidden="true" alt=""
src="{{account.avatar}}" on:imgLoadError="set({error: true})" />
{{/if}}
<style>
.avatar {
width: 48px;
height: 48px;
border-radius: 4px;
}
svg.avatar {
fill: var(--deemphasized-text-color);
}
</style>
<script>
import { imgLoadError } from '../../_utils/events'
export default {
events: {
imgLoadError
}
}
</script>