feat: certificates, landing pages, ai tutor, website update, compliance
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type { MetaTagsProps } from 'svelte-meta-tags';
|
||||
import { classroomio, type InferResponseType } from '$lib/utils/services/api';
|
||||
import { safeServerApi } from '$lib/utils/services/api/server';
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
@@ -49,12 +50,40 @@ export const load = async ({ parent, url }) => {
|
||||
)
|
||||
]);
|
||||
const courseData = coursesResult.ok ? coursesResult.body.data : { courses: [], hasMoreCourses: false };
|
||||
const canonicalUrl = new URL(url.pathname, url.origin).href;
|
||||
const orgTitle = `${org.name} – All Courses`;
|
||||
const orgDescription = `Browse all courses offered by ${org.name}`;
|
||||
|
||||
const pageMetaTags = Object.freeze({
|
||||
title: orgTitle,
|
||||
description: orgDescription,
|
||||
canonical: canonicalUrl,
|
||||
openGraph: {
|
||||
type: 'website',
|
||||
url: canonicalUrl,
|
||||
title: orgTitle,
|
||||
description: orgDescription,
|
||||
...(org.avatarUrl
|
||||
? {
|
||||
images: [
|
||||
{
|
||||
url: org.avatarUrl,
|
||||
alt: `${org.name} logo`,
|
||||
secureUrl: org.avatarUrl,
|
||||
type: 'image/jpeg'
|
||||
}
|
||||
]
|
||||
}
|
||||
: {})
|
||||
}
|
||||
} satisfies MetaTagsProps);
|
||||
|
||||
return {
|
||||
org,
|
||||
courses: courseData.courses,
|
||||
hasMoreCourses: courseData.hasMoreCourses,
|
||||
tagGroups: tagsResult.ok ? tagsResult.body.data : [],
|
||||
activeTags: normalizedTags
|
||||
activeTags: normalizedTags,
|
||||
pageMetaTags
|
||||
};
|
||||
};
|
||||
|
||||
@@ -117,10 +117,6 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{$t('public_courses.page_title')}</title>
|
||||
</svelte:head>
|
||||
|
||||
<PoweredBy />
|
||||
|
||||
<main class={shellClass}>
|
||||
@@ -227,8 +223,7 @@
|
||||
<OrgLandingPageFooter
|
||||
orgName={data.org.name}
|
||||
logoUrl={data.org.avatarUrl ?? undefined}
|
||||
footerLinks={landingSettings.footerLinks}
|
||||
footerText={landingSettings.footerText}
|
||||
footer={landingSettings.footer}
|
||||
variant={landingSettings.theme}
|
||||
/>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user