2022-01-10 00:18:08 +02:00
|
|
|
<script>
|
|
|
|
|
import { fly } from 'svelte/transition';
|
2023-08-02 19:35:27 +01:00
|
|
|
import CourseLandingPage from '$lib/components/CourseLandingPage/index.svelte';
|
|
|
|
|
import Editor from '$lib/components/CourseLandingPage/components/Editor/index.svelte';
|
2023-10-22 09:47:13 +01:00
|
|
|
import { course } from '$lib/components/Course/store';
|
2023-08-02 19:35:27 +01:00
|
|
|
import { lessons } from '$lib/components/Course/components/Lesson/store/lessons';
|
2022-01-10 00:18:08 +02:00
|
|
|
|
2023-08-02 19:35:27 +01:00
|
|
|
export let data;
|
2023-10-22 09:47:13 +01:00
|
|
|
|
2023-08-02 19:35:27 +01:00
|
|
|
const { courseId } = data;
|
2022-12-30 13:08:54 +01:00
|
|
|
|
|
|
|
|
let courseData = {};
|
|
|
|
|
|
2023-08-02 19:35:27 +01:00
|
|
|
function setCourseData(course = {}, lessons) {
|
2022-12-30 13:08:54 +01:00
|
|
|
courseData = { ...course, lessons };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$: setCourseData($course, $lessons);
|
|
|
|
|
$: console.log('courseData changed', courseData);
|
2022-01-10 00:18:08 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div
|
2023-09-24 13:20:04 +00:00
|
|
|
class="absolute flex inset-0 z-50 bg-white"
|
2022-01-10 00:18:08 +02:00
|
|
|
in:fly={{ y: 500, duration: 500 }}
|
|
|
|
|
out:fly={{ y: 500, duration: 500 }}
|
|
|
|
|
>
|
2022-12-30 13:08:54 +01:00
|
|
|
<Editor {courseId} bind:course={courseData} />
|
2023-09-14 20:59:51 +00:00
|
|
|
<div class="rightBar">
|
2023-09-15 00:11:23 +01:00
|
|
|
<CourseLandingPage bind:courseData editMode={true} />
|
2022-01-10 00:18:08 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.rightBar {
|
|
|
|
|
flex-grow: 1;
|
2023-09-14 20:59:51 +00:00
|
|
|
width: 100%;
|
2022-01-10 00:18:08 +02:00
|
|
|
height: 100%;
|
2023-09-24 13:20:04 +00:00
|
|
|
overflow-x: hidden;
|
2023-09-14 20:59:51 +00:00
|
|
|
overflow-y: auto;
|
2022-01-10 00:18:08 +02:00
|
|
|
}
|
|
|
|
|
</style>
|