+ {#if selectedSection.key === 1}
+
+ {:else if selectedSection.key === 2}
+
+ {:else if selectedSection.key === 3}
+
+ {:else if selectedSection.key === 4}
+
+ {:else if selectedSection.key === 5}
+
+ {/if}
+
+ {/if}
diff --git a/src/components/CourseLandingPage/constants.ts b/src/components/CourseLandingPage/constants.ts
new file mode 100644
index 00000000..9b1e8150
--- /dev/null
+++ b/src/components/CourseLandingPage/constants.ts
@@ -0,0 +1,26 @@
+export const SECTION_KEYS = {
+ HEADER: 'header',
+ REQUIREMENT: 'requirement',
+ DESCRIPTION: 'description',
+ SYLLABUS: 'syllabus',
+ ABOUT_US: 'about-us',
+};
+
+export const NAV_ITEMS = [
+ {
+ key: SECTION_KEYS.REQUIREMENT,
+ label: 'Requirement',
+ },
+ {
+ key: SECTION_KEYS.DESCRIPTION,
+ label: 'Description',
+ },
+ {
+ key: SECTION_KEYS.SYLLABUS,
+ label: 'Syllabus',
+ },
+ {
+ key: SECTION_KEYS.ABOUT_US,
+ label: 'About Us',
+ },
+];
diff --git a/src/components/CourseLandingPage/index.svelte b/src/components/CourseLandingPage/index.svelte
index 766f3a12..6a6d1c31 100644
--- a/src/components/CourseLandingPage/index.svelte
+++ b/src/components/CourseLandingPage/index.svelte
@@ -7,64 +7,11 @@
import Expandable from '../Expandable/index.svelte';
import PrimaryButton from '../PrimaryButton/index.svelte';
import MarkdownRender from '../MarkdownRender/index.svelte';
+ import { NAV_ITEMS, SECTION_KEYS } from './constants';
+ import { landingPageStore } from './store';
let activeNavItem = '';
- const data = {
- title: 'Online Business Masterclass: Sell Your Own Digital Products',
- shortDescription:
- 'Create, Launch & Market Your Own Online Business w/ Digital Products such as Online Courses, Coaching, eBooks, Webinars+',
- cost: {
- currency: '$',
- price: '300',
- },
- requirement:
- "You don't need any experience creating an online business or digital product. \nYou don't need an online presence, website, or following - but it will help kickstart your online business if you do.",
- description:
- "### Have you ever dreamed of starting your own online business?. \n\nOf course I know that :-) I was just thinking if there is some way to do same as getStaticProps for other components too. I don't think such feature is completely necessary, though. \n### Enroll today and get instant access to. \n\nOf course I know that :-) I was just thinking if there is some way to do same as getStaticProps for other components too. I don't think such feature is completely necessary, though.\n ### You will learn many types of digital marketing:\n\n Of course I know that :-) I was just thinking if there is some way to do same as getStaticProps for other components too. I don't think such feature is completely necessary, though. Hello, thank you for reply. Of course I know that :-) I was just thinking if there is some way to do same as getStaticProps for other components too. I don't think such feature is completely necessary, though. Hello, thank you for reply. Of course I know that :-) I was just thinking if there is some way to do same as getStaticProps for other components too. I don't think such feature is completely necessary, though. Hello, thank you for reply. Of course I know that :-) I was just thinking if there is some way to do same as getStaticProps for other components too. I don't think such feature is completely necessary, though. Hello, thank you for reply. Of course I know that :-) I was just thinking if there is some way to do same as getStaticProps for other components too. I don't think such feature is completely necessary, though.",
- lessons: [
- {
- title: 'What is FinTech?',
- },
- {
- title: 'Payments, Cryptocurrencies and Blockchain',
- },
- {
- title: 'Digital Finance and Alternative Finance',
- },
- {
- title: 'FinTech Regulation and RegTech',
- },
- {
- title: 'Data & TechFin',
- },
- ],
- aboutUs: {
- companyName: 'The Brad School',
- logoUrl: 'https://img-c.udemycdn.com/user/200_H/19701574_95d1_13.jpg',
- description:
- '*Learn creative skills, from absolute beginner to advanced mastery.*\nVideo School exists to help you succeed in life. Each course has been hand-tailored to teach a specific skill from photography and video to art, design and business.\n**Whether you’re trying to learn a new skill from scratch, or want to refresh your memory on something you’ve learned in the past, you’ve come to the right place.**\nEducation makes the world a better place. Make your world better with new skills!\nOur courses can be watched 24/7 wherever you are. Most are fully downloadable so you can take them with you. You can also view them on mobile devices with the Udemy mobile app.\nAll courses have a 30-day money-back guarantee so that you can check it out, make sure it’s the right course for you, and get a refund if it’s not!',
- },
- };
- const navItems = [
- {
- label: 'Requirement',
- key: 'requirement',
- },
- {
- label: 'Description',
- key: 'description',
- },
- {
- label: 'Syllabus',
- key: 'syllabus',
- },
- {
- label: 'About Us',
- key: 'about-us',
- },
- ];
-
const expandableRootClass =
'max-w-4xl pt-5 my-3 border-r-0 border-b border-l-0 border-gray-300';
const { page } = stores();
@@ -77,12 +24,12 @@
}
onMount(() => {
- activeNavItem = window.location.hash || navItems[0].key;
+ activeNavItem = (window.location.hash || NAV_ITEMS[0].key).replace('#', '');
});
- {data.title}
+ {$landingPageStore.header.title}