2021-07-10 19:16:10 +00:00
|
|
|
<script>
|
2021-07-14 09:05:09 +03:00
|
|
|
import { onMount, afterUpdate } from 'svelte';
|
2021-07-13 16:27:02 +00:00
|
|
|
|
2021-07-14 09:05:09 +03:00
|
|
|
import Navigation from '../Course/components/Navigation/index.svelte';
|
2021-08-18 19:47:02 +03:00
|
|
|
// import { lessons, lesson } from '../Course/components/Lesson/store/lessons';
|
|
|
|
|
// import { questionnaire } from '../Course/components/Lesson/Exercise/store/exercise';
|
|
|
|
|
// import { questionnaireMetaData } from '../Course/components/Lesson/store/answers';
|
|
|
|
|
import { course } from '../Course/store';
|
|
|
|
|
import Confetti from '../Confetti/index.svelte';
|
2021-07-13 16:27:02 +00:00
|
|
|
|
|
|
|
|
export let path;
|
2021-08-18 19:47:02 +03:00
|
|
|
export let isExercisePage = false;
|
2021-07-13 16:27:02 +00:00
|
|
|
|
2021-07-25 17:44:11 +03:00
|
|
|
function setStoreWithData() {
|
2021-08-18 19:47:02 +03:00
|
|
|
// lessons.set(courseData.lessons);
|
|
|
|
|
// if (courseData.lesson) {
|
|
|
|
|
// lesson.set(courseData.lesson);
|
|
|
|
|
// }
|
|
|
|
|
// if (courseData.exercise && courseData.exercise.data) {
|
|
|
|
|
// questionnaire.set(courseData.exercise.data);
|
|
|
|
|
// questionnaireMetaData.set(courseData.exercise.answers);
|
|
|
|
|
// }
|
2021-07-25 17:44:11 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMount(setStoreWithData);
|
|
|
|
|
|
|
|
|
|
afterUpdate(setStoreWithData);
|
2021-07-10 19:16:10 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<svelte:head>
|
2021-08-18 19:47:02 +03:00
|
|
|
<title>{$course.title || 'ClassroomIO Course'}</title>
|
2021-07-10 19:16:10 +00:00
|
|
|
</svelte:head>
|
|
|
|
|
|
|
|
|
|
<div class="root">
|
2021-08-18 19:47:02 +03:00
|
|
|
<Navigation {path} />
|
2021-07-10 19:16:10 +00:00
|
|
|
<div class="rightBar">
|
2021-08-18 19:47:02 +03:00
|
|
|
{#if isExercisePage}
|
|
|
|
|
<Confetti />
|
|
|
|
|
{/if}
|
2021-07-10 19:16:10 +00:00
|
|
|
<slot />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.root {
|
|
|
|
|
display: flex;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rightBar {
|
|
|
|
|
flex-grow: 1;
|
2021-08-18 19:47:02 +03:00
|
|
|
width: calc(100% - 360px);
|
2021-07-10 19:16:10 +00:00
|
|
|
}
|
|
|
|
|
</style>
|