1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-11 09:45:24 +01:00
Pinafore-Web-Client-Frontend/routes/_components/Avatar.html
2018-01-22 21:47:29 -08:00

28 lines
539 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>