Skip to content

Commit

Permalink
More image fixes (#1069)
Browse files Browse the repository at this point in the history
- Lazy load dragalipatch image to avoid loading both
- Lazy load acknowledgements since they're offscreen on initial render
- Fix banner image moving slightly when toggling mode by aligning the
two images properly
  • Loading branch information
SapiensAnatis authored Sep 8, 2024
1 parent ce69b82 commit bb75a50
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
Binary file modified Website/src/lib/assets/bannerDark-wide.webp
Binary file not shown.
Binary file modified Website/src/lib/assets/bannerLight-wide.webp
Binary file not shown.
6 changes: 4 additions & 2 deletions Website/src/routes/(main)/(home)/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,13 @@
<enhanced:img
src="$lib/assets/dragalipatch.png"
class="block w-full max-w-80 align-middle dark:hidden"
alt="Example inputs of Dawnshard server address in Dragalipatch interface" />
alt="Example inputs of Dawnshard server address in Dragalipatch interface"
loading="lazy" />
<enhanced:img
src="$lib/assets/dragalipatchDark.png"
class="hidden w-full max-w-80 align-middle dark:block"
alt="Example inputs of Dawnshard server address in Dragalipatch interface" />
alt="Example inputs of Dawnshard server address in Dragalipatch interface"
loading="lazy" />
<p class="mt-1 italic">Example Dragalipatch inputs</p>
</aside>
<div class="col-span-12">
Expand Down
2 changes: 1 addition & 1 deletion Website/src/routes/(main)/(home)/acknowledgement.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<li class="my-2 flex items-center gap-3">
<Avatar>
<AvatarImage src={avatarSrc} alt={`${name} avatar image`} />
<AvatarImage src={avatarSrc} alt={`${name} avatar image`} loading="lazy" />
</Avatar>
<p><strong>{name}</strong>, <slot /></p>
</li>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bb75a50

Please sign in to comment.