feat(frontend): specify height as well as width for avatars
This commit is contained in:
parent
99ab8b6864
commit
4a17611766
|
@ -25,8 +25,14 @@
|
||||||
{#each urls as url}
|
{#each urls as url}
|
||||||
<source {width} srcSet={url} type={contentTypeFor(url)} />
|
<source {width} srcSet={url} type={contentTypeFor(url)} />
|
||||||
{/each}
|
{/each}
|
||||||
<img {width} src={urls[0] || defaultAvatars[0]} {alt} class="rounded-circle img-fluid" />
|
<img
|
||||||
|
{width}
|
||||||
|
height={width}
|
||||||
|
src={urls[0] || defaultAvatars[0]}
|
||||||
|
{alt}
|
||||||
|
class="rounded-circle img-fluid"
|
||||||
|
/>
|
||||||
</picture>
|
</picture>
|
||||||
{:else}
|
{:else}
|
||||||
<img {width} class="rounded-circle img-fluid" src={defaultAvatars[0]} {alt} />
|
<img {width} height={width} class="rounded-circle img-fluid" src={defaultAvatars[0]} {alt} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -321,7 +321,13 @@
|
||||||
{#if avatar === ""}
|
{#if avatar === ""}
|
||||||
<FallbackImage alt="Current avatar" urls={[]} width={200} />
|
<FallbackImage alt="Current avatar" urls={[]} width={200} />
|
||||||
{:else if avatar}
|
{:else if avatar}
|
||||||
<img width={200} src={avatar} alt="New avatar" class="rounded-circle img-fluid" />
|
<img
|
||||||
|
width={200}
|
||||||
|
height={200}
|
||||||
|
src={avatar}
|
||||||
|
alt="New avatar"
|
||||||
|
class="rounded-circle img-fluid"
|
||||||
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<FallbackImage alt="Current avatar" urls={memberAvatars(data.member)} width={200} />
|
<FallbackImage alt="Current avatar" urls={memberAvatars(data.member)} width={200} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -268,7 +268,13 @@
|
||||||
{#if avatar === ""}
|
{#if avatar === ""}
|
||||||
<FallbackImage alt="Current avatar" urls={[]} width={200} />
|
<FallbackImage alt="Current avatar" urls={[]} width={200} />
|
||||||
{:else if avatar}
|
{:else if avatar}
|
||||||
<img width={200} src={avatar} alt="New avatar" class="rounded-circle img-fluid" />
|
<img
|
||||||
|
width={200}
|
||||||
|
height={200}
|
||||||
|
src={avatar}
|
||||||
|
alt="New avatar"
|
||||||
|
class="rounded-circle img-fluid"
|
||||||
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<FallbackImage alt="Current avatar" urls={userAvatars($userStore)} width={200} />
|
<FallbackImage alt="Current avatar" urls={userAvatars($userStore)} width={200} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in New Issue