performance improvements

This commit is contained in:
Rotimi Best
2026-03-28 20:42:37 +01:00
parent c58953a018
commit 4fd565a18e
5 changed files with 30 additions and 8 deletions
@@ -12,7 +12,7 @@
<div class="logo">
<a
href={resolve('/')}
href={resolve('/', {})}
title={`${$t('navigation.goto')} ${orgName || 'ClassroomIO'} ${$t('navigation.home')}`}
class="flex items-center gap-2"
id="logo"
@@ -22,7 +22,8 @@
src={logo || '/logo-192.png'}
alt={`${orgName || 'ClassroomIO'} logo`}
class="mx-auto inline-block w-9 rounded"
data-atf="1"
width="36"
height="36"
/>
{#if orgName}
<span class="line-clamp-1 hidden text-sm font-medium md:block">{orgName}</span>
@@ -131,6 +131,13 @@
<title>
{!org?.name ? '' : `${org.name}'s `}{$t('course.navItem.landing_page.landing_page')}
</title>
{#if $landingPageSettings.header.background?.show !== false}
<link
rel="preload"
as="image"
href={$landingPageSettings.header.background?.image || '/images/org-landingpage-banner.jpeg'}
/>
{/if}
</svelte:head>
<PoweredBy />
@@ -201,7 +208,14 @@
/>
</div>
{:else}
<img class="rounded-md" src={$landingPageSettings.header?.banner?.image} alt="landing page banner" />
<img
class="rounded-md"
src={$landingPageSettings.header?.banner?.image}
alt="landing page banner"
width="640"
height="427"
fetchpriority="high"
/>
{/if}
</div>
</div>
@@ -245,7 +259,14 @@
</div>
<div class="image">
<img src={$landingPageSettings.aboutUs.imageUrl} alt="Our Story" class=" max-h-[450px] rounded-2xl" />
<img
src={$landingPageSettings.aboutUs.imageUrl}
alt="Our Story"
class="max-h-[450px] rounded-2xl"
width="900"
height="562"
loading="lazy"
/>
</div>
</div>
</section>
@@ -477,7 +498,9 @@
src={org.avatarUrl || '/logo-192.png'}
alt={`${org.name} logo`}
class="mx-auto inline-block max-h-10 w-10 rounded"
data-atf="1"
width="40"
height="40"
loading="lazy"
/>
<h3 class="ml-3 text-xl text-black">{org.name}</h3>
</a>
+1 -3
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import { page } from '$app/state';
import { OrgLandingPage, PlayQuiz } from '$features/org';
import { OrgLandingPage } from '$features/org';
import { Snackbar } from '$features/ui';
import { UpgradeModal, PageLoadProgress, PageRestricted } from '$features/ui';
import { user } from '$lib/utils/store/user';
@@ -144,8 +144,6 @@
{#if data.org?.isRestricted || $currentOrg.isRestricted}
<PageRestricted />
{:else if data.skipAuth}
<PlayQuiz />
{:else if data.isOrgSite && data.org && path === '/'}
<OrgLandingPage orgSiteName={data.orgSiteName} org={data.org} />
{:else}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 799 KiB

After

Width:  |  Height:  |  Size: 138 KiB