misc: add title attribute to Avatar (#50)
This will allow users to hover over the avatars in a collapsed sidebar and see the name of the community.
This commit is contained in:
1 parent
d70548f6c7
commit
9e4fcae599
2 files changed
+3
-1
No files matched your search
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
export let url: string | undefined
|
export let url: string | undefined
|
||||||
export let alt: string = ''
|
export let alt: string = ''
|
||||||
|
export let title: string = ''
|
||||||
|
|
||||||
export let width: number
|
export let width: number
|
||||||
</script>
|
</script>
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
src="{url}?format=webp&thumbnail={findClosestNumber(sizes, width)}"
|
src="{url}?format=webp&thumbnail={findClosestNumber(sizes, width)}"
|
||||||
{alt}
|
{alt}
|
||||||
{width}
|
{width}
|
||||||
|
{title}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
class="rounded-full aspect-square object-cover overflow-hidden"
|
class="rounded-full aspect-square object-cover overflow-hidden"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
alignment="left"
|
alignment="left"
|
||||||
href="/c/{follow.name}@{new URL(follow.actor_id).hostname}"
|
href="/c/{follow.name}@{new URL(follow.actor_id).hostname}"
|
||||||
>
|
>
|
||||||
<Avatar url={follow.icon} alt={follow.name} width={20} slot="icon" />
|
<Avatar url={follow.icon} alt={follow.name} title={follow.title} width={20} slot="icon" />
|
||||||
<span class:hidden={!expanded}>{follow.title}</span>
|
<span class:hidden={!expanded}>{follow.title}</span>
|
||||||
</Button>
|
</Button>
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
Reference in new issue
Block a user