Dashboard improvements + LMS community
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
import { currentOrgPath, currentOrg } from '$lib/utils/store/org';
|
||||
import { supabase } from '$lib/utils/functions/supabase';
|
||||
|
||||
export let isLMS = false;
|
||||
|
||||
let discussions = [];
|
||||
|
||||
dayjs.extend(relativeTime);
|
||||
@@ -38,7 +40,7 @@
|
||||
|
||||
if (error) {
|
||||
console.error('Error loading community', error);
|
||||
return goto(`${currentOrgPath}`);
|
||||
return goto(isLMS ? '/lms' : $currentOrgPath);
|
||||
}
|
||||
|
||||
discussions =
|
||||
@@ -48,7 +50,7 @@
|
||||
author: discussion?.author?.profile?.fullname,
|
||||
comments: discussion.comments?.[0]?.count || 0,
|
||||
votes: discussion.votes,
|
||||
createdAt: dayjs(discussion.created_at).fromNow(true),
|
||||
createdAt: dayjs(discussion.created_at).fromNow(true)
|
||||
})) || [];
|
||||
}
|
||||
|
||||
@@ -65,7 +67,7 @@
|
||||
<h4>
|
||||
<a
|
||||
class="text-black dark:text-white"
|
||||
href="{$currentOrgPath}/community/{discussion.slug}"
|
||||
href="{isLMS ? '/lms' : $currentOrgPath}/community/{discussion.slug}"
|
||||
>
|
||||
{discussion.title}
|
||||
</a>
|
||||
@@ -84,9 +86,7 @@
|
||||
<Box>
|
||||
<CoursesEmptyIcon />
|
||||
<h3 class="dark:text-white text-2xl my-5">No Questions asked</h3>
|
||||
<p class="dark:text-white w-1/3 text-center">
|
||||
Ask a question to the community
|
||||
</p>
|
||||
<p class="dark:text-white w-1/3 text-center">Ask a question to the community</p>
|
||||
</Box>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
@@ -133,7 +133,9 @@
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
{$currentOrg.name}
|
||||
<title>
|
||||
{$currentOrg.name}'s Landing Page
|
||||
</title>
|
||||
</svelte:head>
|
||||
|
||||
<main>
|
||||
@@ -148,7 +150,7 @@
|
||||
class="md:w-11/12 lg:w-5/6 w-full flex items-center justify-between flex-col-reverse md:flex-row z-20 relative"
|
||||
>
|
||||
<!-- Course Description -->
|
||||
<div class="md:w-2/5 w-11/12 py-10 flex flex-col items-start">
|
||||
<div class="md:w-2/5 w-11/12 py-10 flex flex-col items-start mr-3">
|
||||
<p class=" text-blue-600 text-2xl font-semibold">Coding Dojo</p>
|
||||
<h1 class="text-4xl md:text-5xl lg:text-6xl my-4 font-bold">
|
||||
Web Developement Courses for <br /><span class="text-blue-600">Everyone</span>
|
||||
@@ -164,7 +166,7 @@
|
||||
onClick={() => goto('#contact')}
|
||||
/>
|
||||
</div>
|
||||
<div class="w-4/6 md:w-2/3 md:max-w-[650px] flex">
|
||||
<div class="w-4/6 md:w-1/2 md:max-w-[650px] flex">
|
||||
<video class="w-full rounded-xl" controls loop autoplay>
|
||||
<source src={video} type="video/mp4" />
|
||||
<!-- <source src="/path/to/video.webm" type="video/webm" /> -->
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</script>
|
||||
|
||||
<aside
|
||||
class="root bg-gray-100 dark:bg-gray-800 h-full border border-l-0 border-t-0 border-b-0 border-r-1"
|
||||
class="w-[250px] min-w-[250px] bg-gray-100 dark:bg-gray-800 h-full border border-l-0 border-t-0 border-b-0 border-r-1"
|
||||
>
|
||||
<div class="h-full flex flex-col">
|
||||
<div class="border-b border-gray-200 pt-5 px-4">
|
||||
@@ -128,9 +128,3 @@
|
||||
</ul>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<style>
|
||||
.root {
|
||||
width: 250px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user