1
0
mirror of https://github.com/nolanlawson/pinafore synced 2025-02-01 14:26:45 +01:00

28 lines
542 B
HTML
Raw Normal View History

2018-01-20 21:06:30 -08:00
{{#if error}}
2018-01-17 23:00:33 -08:00
<svg class="{{className}} avatar" aria-hidden="true">
2018-01-14 21:41:19 -08:00
<use xlink:href="#fa-user" />
</svg>
2018-01-20 21:06:30 -08:00
{{else}}
<img class="{{className}} avatar" aria-hidden="true" alt=""
2018-01-22 21:47:29 -08:00
src="{{account.avatar}}" on:imgLoadError="set({error: true})" />
2018-01-20 21:06:30 -08:00
{{/if}}
2018-01-10 20:45:02 -08:00
<style>
2018-01-16 08:38:23 -08:00
.avatar {
2018-01-11 00:26:35 -08:00
width: 48px;
height: 48px;
2018-01-10 20:45:02 -08:00
border-radius: 4px;
}
2018-01-14 21:41:19 -08:00
2018-01-16 08:38:23 -08:00
svg.avatar {
2018-01-14 21:41:19 -08:00
fill: var(--deemphasized-text-color);
}
2018-01-10 20:45:02 -08:00
</style>
<script>
2018-01-27 16:35:44 -08:00
import { imgLoadError } from '../../_utils/events'
2018-01-22 21:47:29 -08:00
2018-01-10 20:45:02 -08:00
export default {
2018-01-20 21:06:30 -08:00
events: {
2018-01-22 21:47:29 -08:00
imgLoadError
2018-01-14 21:41:19 -08:00
}
2018-01-10 20:45:02 -08:00
}
</script>