From 9e4fcae5997bd9efd641a44c6b942567bad8a710 Mon Sep 17 00:00:00 2001 From: Peter Bui Date: Mon, 31 Jul 2023 20:03:08 -0400 Subject: [PATCH] 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. --- src/lib/components/ui/Avatar.svelte | 2 ++ src/lib/components/ui/Sidebar.svelte | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/components/ui/Avatar.svelte b/src/lib/components/ui/Avatar.svelte index 42faf172..3edd6957 100644 --- a/src/lib/components/ui/Avatar.svelte +++ b/src/lib/components/ui/Avatar.svelte @@ -7,6 +7,7 @@ export let url: string | undefined export let alt: string = '' + export let title: string = '' export let width: number @@ -16,6 +17,7 @@ src="{url}?format=webp&thumbnail={findClosestNumber(sizes, width)}" {alt} {width} + {title} loading="lazy" class="rounded-full aspect-square object-cover overflow-hidden" /> diff --git a/src/lib/components/ui/Sidebar.svelte b/src/lib/components/ui/Sidebar.svelte index b65848cc..75e72daa 100644 --- a/src/lib/components/ui/Sidebar.svelte +++ b/src/lib/components/ui/Sidebar.svelte @@ -60,7 +60,7 @@ alignment="left" href="/c/{follow.name}@{new URL(follow.actor_id).hostname}" > - + {follow.title} {/each}