2022-01-03 20:28:35 +02:00
|
|
|
<script>
|
|
|
|
|
import { onMount } from 'svelte';
|
|
|
|
|
import RecentlyViewed16 from 'carbon-icons-svelte/lib/RecentlyViewed16';
|
|
|
|
|
import CurrencyDollar16 from 'carbon-icons-svelte/lib/CurrencyDollar16';
|
|
|
|
|
import Alarm16 from 'carbon-icons-svelte/lib/Alarm16';
|
|
|
|
|
import { stores } from '@sapper/app';
|
|
|
|
|
import Expandable from '../Expandable/index.svelte';
|
|
|
|
|
import PrimaryButton from '../PrimaryButton/index.svelte';
|
|
|
|
|
import MarkdownRender from '../MarkdownRender/index.svelte';
|
2022-01-10 00:18:08 +02:00
|
|
|
import { NAV_ITEMS, SECTION_KEYS } from './constants';
|
|
|
|
|
import { landingPageStore } from './store';
|
2022-01-03 20:28:35 +02:00
|
|
|
|
|
|
|
|
let activeNavItem = '';
|
|
|
|
|
|
|
|
|
|
const expandableRootClass =
|
|
|
|
|
'max-w-4xl pt-5 my-3 border-r-0 border-b border-l-0 border-gray-300';
|
|
|
|
|
const { page } = stores();
|
|
|
|
|
|
|
|
|
|
function handleEnrol() {}
|
|
|
|
|
function handleNavItemClick(navItem) {
|
|
|
|
|
return () => {
|
|
|
|
|
activeNavItem = navItem;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMount(() => {
|
2022-01-10 00:18:08 +02:00
|
|
|
activeNavItem = (window.location.hash || NAV_ITEMS[0].key).replace('#', '');
|
2022-01-03 20:28:35 +02:00
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<svelte:head>
|
2022-01-10 00:18:08 +02:00
|
|
|
<title>{$landingPageStore.header.title}</title>
|
2022-01-03 20:28:35 +02:00
|
|
|
</svelte:head>
|
|
|
|
|
|
|
|
|
|
<div class="w-full bg-white flex flex-col items-center">
|
|
|
|
|
<section
|
|
|
|
|
class="w-full flex items-center justify-center bg-gray-900 text-white p-6 pb-10"
|
|
|
|
|
>
|
|
|
|
|
<div class="container flex justify-between items-center">
|
|
|
|
|
<div class="course-description mr-3">
|
|
|
|
|
<h1>
|
2022-01-10 00:18:08 +02:00
|
|
|
{$landingPageStore.header.title}
|
2022-01-03 20:28:35 +02:00
|
|
|
</h1>
|
|
|
|
|
<h5>
|
2022-01-10 00:18:08 +02:00
|
|
|
{$landingPageStore.header.description}
|
2022-01-03 20:28:35 +02:00
|
|
|
</h5>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="flex items-center">
|
|
|
|
|
<RecentlyViewed16 class="carbon-icon mr-2" />
|
|
|
|
|
Last updated 10/2021
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="action-container bg-white p-3 flex items-start flex-col">
|
|
|
|
|
<p class="mb-2 text-black text-md flex items-center">
|
|
|
|
|
<Alarm16 class="carbon-icon active mr-2" />
|
2022-01-10 00:18:08 +02:00
|
|
|
{$landingPageStore.header.duration}
|
2022-01-03 20:28:35 +02:00
|
|
|
</p>
|
|
|
|
|
<p class="mb-2 text-black text-md flex items-center">
|
|
|
|
|
<CurrencyDollar16 class="carbon-icon active mr-2" />
|
2022-01-10 00:18:08 +02:00
|
|
|
{$landingPageStore.header.currency}{$landingPageStore.header.cost}
|
2022-01-03 20:28:35 +02:00
|
|
|
</p>
|
|
|
|
|
<PrimaryButton
|
2022-01-10 00:18:08 +02:00
|
|
|
label={$landingPageStore.header.buttonLabel}
|
2022-01-03 20:28:35 +02:00
|
|
|
onClick={handleEnrol}
|
|
|
|
|
className="md:w-full"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<nav
|
|
|
|
|
class="w-full z-10 max-w-4xl flex items-center justify-evenly py-4 px-4 bg-gray-100 mt-4 sticky top-0"
|
|
|
|
|
>
|
2022-01-10 00:18:08 +02:00
|
|
|
{#each NAV_ITEMS as navItem}
|
2022-01-03 20:28:35 +02:00
|
|
|
<p
|
|
|
|
|
class="text-md text-gray-900 {activeNavItem === navItem.key &&
|
|
|
|
|
'font-bold'}"
|
|
|
|
|
on:click={handleNavItemClick(navItem.key)}
|
|
|
|
|
>
|
|
|
|
|
<a href="{$page.path}#{navItem.key}">{navItem.label}</a>
|
|
|
|
|
</p>
|
|
|
|
|
{/each}
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<Expandable
|
2022-01-10 00:18:08 +02:00
|
|
|
id={SECTION_KEYS.REQUIREMENT}
|
2022-01-03 20:28:35 +02:00
|
|
|
title="Requirement"
|
|
|
|
|
titleClass="text-2xl"
|
|
|
|
|
rootClass={expandableRootClass}
|
|
|
|
|
supportsLink={true}
|
|
|
|
|
>
|
2022-01-10 00:18:08 +02:00
|
|
|
<MarkdownRender
|
|
|
|
|
content={$landingPageStore.requirement.content}
|
|
|
|
|
disableMaxWidth={true}
|
|
|
|
|
/>
|
2022-01-03 20:28:35 +02:00
|
|
|
</Expandable>
|
|
|
|
|
|
|
|
|
|
<Expandable
|
2022-01-10 00:18:08 +02:00
|
|
|
id={SECTION_KEYS.DESCRIPTION}
|
2022-01-03 20:28:35 +02:00
|
|
|
title="Description"
|
|
|
|
|
titleClass="text-2xl"
|
|
|
|
|
rootClass={expandableRootClass}
|
|
|
|
|
supportsLink={true}
|
|
|
|
|
>
|
2022-01-10 00:18:08 +02:00
|
|
|
<MarkdownRender
|
|
|
|
|
content={$landingPageStore.description.content}
|
|
|
|
|
disableMaxWidth={true}
|
|
|
|
|
/>
|
2022-01-03 20:28:35 +02:00
|
|
|
</Expandable>
|
|
|
|
|
|
|
|
|
|
<Expandable
|
2022-01-10 00:18:08 +02:00
|
|
|
id={SECTION_KEYS.SYLLABUS}
|
2022-01-03 20:28:35 +02:00
|
|
|
title="Syllabus"
|
|
|
|
|
titleClass="text-2xl"
|
|
|
|
|
rootClass={expandableRootClass}
|
|
|
|
|
supportsLink={true}
|
|
|
|
|
>
|
2022-01-10 00:18:08 +02:00
|
|
|
{#each $landingPageStore.syllabus.lessons as lesson, index}
|
2022-01-03 20:28:35 +02:00
|
|
|
<div class="flex items-center my-2">
|
|
|
|
|
<strong class="mr-2">Lesson {index + 1}. </strong>
|
|
|
|
|
{lesson.title}
|
|
|
|
|
</div>
|
|
|
|
|
{/each}
|
|
|
|
|
</Expandable>
|
|
|
|
|
|
|
|
|
|
<Expandable
|
2022-01-10 00:18:08 +02:00
|
|
|
id={SECTION_KEYS.ABOUT_US}
|
|
|
|
|
title="About Us - {$landingPageStore.aboutUs.companyName}"
|
2022-01-03 20:28:35 +02:00
|
|
|
titleClass="text-2xl"
|
|
|
|
|
rootClass={expandableRootClass}
|
|
|
|
|
supportsLink={true}
|
|
|
|
|
>
|
|
|
|
|
<div class="w-full">
|
|
|
|
|
<img
|
2022-01-10 00:18:08 +02:00
|
|
|
src={$landingPageStore.aboutUs.logoUrl}
|
|
|
|
|
alt={$landingPageStore.aboutUs.companyName}
|
2022-01-03 20:28:35 +02:00
|
|
|
height="260"
|
|
|
|
|
width="260"
|
|
|
|
|
class="rounded-full m-auto"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2022-01-10 00:18:08 +02:00
|
|
|
<MarkdownRender
|
|
|
|
|
content={$landingPageStore.aboutUs.description}
|
|
|
|
|
disableMaxWidth={true}
|
|
|
|
|
/>
|
2022-01-03 20:28:35 +02:00
|
|
|
</Expandable>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.container {
|
|
|
|
|
max-width: 800px;
|
|
|
|
|
|
|
|
|
|
.course-description {
|
|
|
|
|
max-width: 500px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.action-container {
|
|
|
|
|
height: fit-content;
|
|
|
|
|
width: 200px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|