CLASSROOMIO-T-167:Allow user upload image in the landing page

Merge branch 'main' into CLASSROOMIO-T-167

CLASSROOMIO-T-186:Allow user upload image in the landing page


Co-authored-by: Ifeanyi Nwosu <ifeanyi@digdippa.com>


Merge-request: CLASSROOMIO-MR-84
Merged-by: Best Admin <best@digdippa.com>
This commit is contained in:
emmanuel
2023-10-04 10:02:28 +00:00
committed by Space Cloud
parent 9c671bce87
commit b0da3099f8
3 changed files with 99 additions and 24 deletions
@@ -22,7 +22,8 @@
import { VARIANTS } from '$lib/components/PrimaryButton/constants';
import HtmlRender from '$lib/components/HTMLRender/HTMLRender.svelte';
import { calDateDiff } from '$lib/utils/functions/date';
import { landingPage } from './store';
import { Loading } from 'carbon-components-svelte';
export let editMode = false;
export let courseData: Course;
const ratingsImg = [
@@ -85,6 +86,7 @@
});
$: video = get(courseData, 'metadata.videoUrl');
$: bannerImage = get(courseData, 'logo');
$: lessons = get(courseData, 'lessons', []);
$: instructor = courseData?.metadata?.instructor || {};
$: initPlyr(player, video);
@@ -144,6 +146,18 @@
/>
</div> -->
{:else}
<div class="w-2/3 relative rounded-md overflow-hidden">
<img
style="min-width:280px; min-height:200px"
alt="About us"
src={bannerImage ? bannerImage : '/images/classroomio-course-img-template.jpg'}
class="mt-2 md:mt-0 rounded-md w-full relative"
/>
{#if $landingPage.uploadingImage}
<Loading withOverlay={true} small class="absolute top-0 w-full h-full" />
{/if}
</div>
<!-- <div
class="banner-image w-2/3 h-96 relative cursor-pointer"
on:click={playVideo}