CLASSROOMIO-T-145:Made the LMS dashboard responsive

CLASSROOMIO-T-145: All done and ready

CLASSROOMIO-T-145: All done and ready

CLASSROOMIO-T-145: Fixed the Z-index issue

Merge branch 'main' into CLASSROOMIO-T-145

CLASSROOMIO-T-145: Finished implementing the responsive design for the Main dashboard and LMS dashboard

Merge branch 'main' into CLASSROOMIO-T-145

CLASSROOMIO-T-144:Updating the dashboard responsiveness ooth for LMS and the Main dashboard

CLASSROOMIO-T-144:Updated the dashboard responsiveness ooth for LMS and the Main dashboard

Merge branch 'main' into CLASSROOMIO-T-145

CLASSROOMIO-T-145:Made the LMS dashboard responsive


Co-authored-by: Ifeanyi Nwosu <[email protected]>


Merge-request: CLASSROOMIO-MR-66
Merged-by: Best Admin <[email protected]>
This commit is contained in:
emmanuel
2023-09-08 09:17:05 +00:00
committed by Space Cloud
parent 7523e6c3e7
commit 536a444193
25 changed files with 275 additions and 171 deletions
@@ -47,7 +47,7 @@
<a rel="prefetch" href={isOnLandingPage ? `/course/${slug}` : `/courses/${id}`} class=" text-black"> <a rel="prefetch" href={isOnLandingPage ? `/course/${slug}` : `/courses/${id}`} class=" text-black">
<div <div
class="root w-80 border bg-gray-100 dark:bg-gray-800 sm:mr-4 mb-4 rounded-md hover:shadow-2xl transition ease-in-out relative" class="root w-full md:w-80 border bg-gray-100 dark:bg-gray-800 mb-4 rounded-md hover:shadow-2xl transition ease-in-out relative"
> >
{#if !isOnLandingPage} {#if !isOnLandingPage}
<Dropdown options={getOptions()} classNames="absolute top-4 right-4" isIcon={true}> <Dropdown options={getOptions()} classNames="absolute top-4 right-4" isIcon={true}>
@@ -87,7 +87,7 @@
<Modal <Modal
onClose={() => ($createCourseModal.open = false)} onClose={() => ($createCourseModal.open = false)}
bind:open={$createCourseModal.open} bind:open={$createCourseModal.open}
width="w-2/5" width="w-4/5 md:w-2/5"
modalHeading="Create a Course" modalHeading="Create a Course"
> >
<form on:submit|preventDefault={createCourse}> <form on:submit|preventDefault={createCourse}>
+21 -9
View File
@@ -5,11 +5,14 @@
import CoursesEmptyIcon from '../Icons/CoursesEmptyIcon.svelte'; import CoursesEmptyIcon from '../Icons/CoursesEmptyIcon.svelte';
import CopyCourseModal from './components/CopyCourseModal/index.svelte'; import CopyCourseModal from './components/CopyCourseModal/index.svelte';
import { courses, courseMetaDeta } from './store'; import { courses, courseMetaDeta } from './store';
import { isMobile } from '$lib/utils/store/useMobile';
</script> </script>
<CopyCourseModal /> <CopyCourseModal />
<div class={`w-full ${$courseMetaDeta.isLoading || $courses ? 'cards-container' : ''} my-4 m-auto`}> <div
class={`w-full ${$courseMetaDeta.isLoading || $courses ? 'cards-container' : ''} my-4 mx-auto`}
>
{#if $courseMetaDeta.isLoading} {#if $courseMetaDeta.isLoading}
<CardLoader /> <CardLoader />
<CardLoader /> <CardLoader />
@@ -28,14 +31,23 @@
currency={courseData.currency} currency={courseData.currency}
totalLessons={courseData.total_lessons} totalLessons={courseData.total_lessons}
/> />
{:else} <!-- {:else}
<Box> <Box className="w-full">
<CoursesEmptyIcon /> <CoursesEmptyIcon />
<h3 class="dark:text-white text-2xl my-5">No Courses Created</h3> <h3 class="dark:text-white text-2xl my-5">No Courses Created</h3>
<p class="dark:text-white w-1/3 text-center"> <p class="dark:text-white w-1/3 text-center">
Share your knowledge with the world by creating engaging courses for your students. Share your knowledge with the world by creating engaging courses for your students.
</p> </p>
</Box> </Box> -->
{/each} {/each}
{/if} {/if}
</div> </div>
{#if !$courses.length}
<Box className="w-full">
<CoursesEmptyIcon />
<h3 class="dark:text-white text-2xl my-5">No Courses Created</h3>
<p class="dark:text-white w-1/3 text-center">
Share your knowledge with the world by creating engaging courses for your students.
</p>
</Box>
{/if}
+14 -4
View File
@@ -12,6 +12,7 @@
import { currentOrg } from '$lib/utils/store/org'; import { currentOrg } from '$lib/utils/store/org';
import { profile } from '$lib/utils/store/user'; import { profile } from '$lib/utils/store/user';
import { NavClasses } from '$lib/utils/constants/reusableClass'; import { NavClasses } from '$lib/utils/constants/reusableClass';
import { menu } from '$lib/components/Org/store';
function isActive(pagePath, itemPath) { function isActive(pagePath, itemPath) {
const pageLinkItems = pagePath.split('/'); const pageLinkItems = pagePath.split('/');
@@ -45,9 +46,18 @@
link: '/lms/community' link: '/lms/community'
} }
]; ];
const toggleSidebar = () => {
$menu.hidden = !$menu.hidden;
};
</script> </script>
<aside class="w-[250px] min-w-[250px] bg-gray-100 dark:bg-gray-700 h-full"> <aside
class={`${
$menu.hidden
? '-translate-x-[100%] top-[56px] md:top-0 absolute md:translate-x-0 md:relative z-[9999]'
: 'translate-x-0 absolute md:relative top-[56px] md:top-0 z-[9999]'
} transition w-[250px] min-w-[250px] bg-gray-100 dark:bg-gray-700 h-full`}
>
<div class="h-full flex flex-col"> <div class="h-full flex flex-col">
<div class="border-b border-gray-200 pt-5 px-4"> <div class="border-b border-gray-200 pt-5 px-4">
{#if $currentOrg.avatar_url} {#if $currentOrg.avatar_url}
@@ -66,7 +76,7 @@
<ul class="my-5"> <ul class="my-5">
{#each sideLinks as item (item.name)} {#each sideLinks as item (item.name)}
<a href={item.link} class="text-black"> <a href={item.link} class="text-black" on:click={toggleSidebar}>
<li <li
class="flex items-center py-3 px-4 mb-2 {NavClasses.item} {isActive( class="flex items-center py-3 px-4 mb-2 {NavClasses.item} {isActive(
$page.url.pathname, $page.url.pathname,
@@ -87,13 +97,13 @@
</div> </div>
<span class="flex-grow" /> <span class="flex-grow" />
<ul class="my-5 pb-5 px-4"> <ul class="my-5 pb-5 px-4">
<a href="/lms" class="text-black"> <a href="/lms" class="text-black" on:click={toggleSidebar}>
<li class="flex items-center py-3 px-4 mb-2 rounded"> <li class="flex items-center py-3 px-4 mb-2 rounded">
<HelpIcon size={20} class="carbon-icon dark:text-white" /> <HelpIcon size={20} class="carbon-icon dark:text-white" />
<p class="dark:text-white ml-2">Help</p> <p class="dark:text-white ml-2">Help</p>
</li> </li>
</a> </a>
<a href="/lms/settings" class="text-black"> <a href="/lms/settings" class="text-black" on:click={toggleSidebar}>
<li <li
class="flex items-center py-3 px-4 mb-2 {NavClasses.item} {isActive( class="flex items-center py-3 px-4 mb-2 {NavClasses.item} {isActive(
$page.url.pathname, $page.url.pathname,
+11 -9
View File
@@ -48,15 +48,17 @@
> >
<ul class="flex w-full items-center"> <ul class="flex w-full items-center">
<div class="flex items-center text-white"> <div class="flex items-center text-white">
<li> {#if !isCoursePage}
<IconButton onClick={toggleSidebar}> <li>
{#if $menu.hidden} <IconButton onClick={toggleSidebar}>
<Menu size={16} class="md:hidden text-white" /> {#if $menu.hidden}
{:else} <Menu size={16} class="md:hidden text-white" />
<Close size={16} class="md:hidden text-white" /> {:else}
{/if} <Close size={16} class="md:hidden text-white" />
</IconButton> {/if}
</li> </IconButton>
</li>
{/if}
{#if isCoursePage} {#if isCoursePage}
<IconButton <IconButton
onClick={() => { onClick={() => {
+15
View File
@@ -7,10 +7,16 @@
import IconButton from '$lib/components/IconButton/index.svelte'; import IconButton from '$lib/components/IconButton/index.svelte';
import { appStore } from '$lib/utils/store/app'; import { appStore } from '$lib/utils/store/app';
import { Close, Menu } from 'carbon-icons-svelte';
import { menu } from '$lib/components/Org/store';
import { toggleBodyByMode } from '$lib/utils/functions/app'; import { toggleBodyByMode } from '$lib/utils/functions/app';
export let navClass = ''; export let navClass = '';
const toggleSidebar = () => {
$menu.hidden = !$menu.hidden;
};
function toggleDarkMode() { function toggleDarkMode() {
$appStore.isDark = !$appStore.isDark; $appStore.isDark = !$appStore.isDark;
@@ -23,6 +29,15 @@
<nav class="{navClass} flex w-full p-2 md:px-6 bg-primary-700"> <nav class="{navClass} flex w-full p-2 md:px-6 bg-primary-700">
<ul class="flex w-full items-center"> <ul class="flex w-full items-center">
<li>
<IconButton onClick={toggleSidebar}>
{#if $menu.hidden}
<Menu size={16} class="md:hidden text-white" />
{:else}
<Close size={16} class="md:hidden text-white" />
{/if}
</IconButton>
</li>
<div class=""> <div class="">
<a href={$page.url.pathname} title="Go to ClassroomIO Home" id="logo" class="text-lg"> <a href={$page.url.pathname} title="Go to ClassroomIO Home" id="logo" class="text-lg">
ClassroomIO ClassroomIO
+2 -4
View File
@@ -18,15 +18,13 @@
$: fetchInitData($currentOrg.id); $: fetchInitData($currentOrg.id);
</script> </script>
<div <div class="flex items-center justify-center lg:justify-start flex-wrap my-4 m-auto">
class="flex items-center justify-center lg:justify-start flex-wrap my-4 m-auto"
>
{#if $orgAudience.length || isLoading} {#if $orgAudience.length || isLoading}
<AudienceList {isLoading} /> <AudienceList {isLoading} />
{:else} {:else}
<Box> <Box>
<AudienceEmptyIcon /> <AudienceEmptyIcon />
<h3 class="dark:text-white text-2xl my-5">No audience to manage!</h3> <h3 class="dark:text-white text-2xl text-center my-5">No audience to manage!</h3>
<p class="dark:text-white w-1/3 text-center"> <p class="dark:text-white w-1/3 text-center">
Manage all your students here and stay connected with them. Manage all your students here and stay connected with them.
</p> </p>
@@ -93,7 +93,7 @@
</div> </div>
</div> </div>
{:else} {:else}
<Box> <Box className="w-screen">
<CoursesEmptyIcon /> <CoursesEmptyIcon />
<h3 class="dark:text-white text-2xl my-5">No Questions asked</h3> <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>
@@ -6,17 +6,12 @@
import { snackbarStore } from '$lib/components/Snackbar/store'; import { snackbarStore } from '$lib/components/Snackbar/store';
import { SNACKBAR_SEVERITY } from '$lib/components/Snackbar/constants'; import { SNACKBAR_SEVERITY } from '$lib/components/Snackbar/constants';
import { supabase } from '$lib/utils/functions/supabase'; import { supabase } from '$lib/utils/functions/supabase';
import { import { currentOrg, createQuizModal, currentOrgPath, quizesStore } from '$lib/utils/store/org';
currentOrg,
createQuizModal,
currentOrgPath,
quizesStore,
} from '$lib/utils/store/org';
import { createQuizValidation } from '$lib/utils/functions/validator'; import { createQuizValidation } from '$lib/utils/functions/validator';
let open = false; let open = false;
let errors = { let errors = {
title: '', title: ''
}; };
let isLoading = false; let isLoading = false;
@@ -76,16 +71,16 @@
{ {
id: 'circle', id: 'circle',
label: '', label: '',
isCorrect: false, isCorrect: false
}, },
{ {
id: 'triangle', id: 'triangle',
label: '', label: '',
isCorrect: false, isCorrect: false
}, }
], ]
}, }
], ]
}) })
.select(); .select();
isLoading = false; isLoading = false;
@@ -111,7 +106,7 @@
<Modal <Modal
onClose={handleClose} onClose={handleClose}
bind:open bind:open
width="w-2/5" width="w-4/5 md:w-2/5"
modalHeading="{$createQuizModal.openEdit ? 'Update' : 'Create'} a Quiz" modalHeading="{$createQuizModal.openEdit ? 'Update' : 'Create'} a Quiz"
> >
<form on:submit|preventDefault={createQuiz}> <form on:submit|preventDefault={createQuiz}>
+7 -7
View File
@@ -56,17 +56,17 @@
{#if quiz} {#if quiz}
<div <div
class="root w-full border hover:shadow-2xl transition ease-in-out rounded-lg bg-gray-100 dark:bg-gray-800 mr-4 mb-5 relative flex p-3" class="root w-full border hover:shadow-2xl transition ease-in-out rounded-lg bg-gray-100 dark:bg-gray-800 mr-4 mb-5 relative flex flex-col lg:flex-row p-3"
> >
<ImageLoader <ImageLoader
src={themeImages[quiz.theme]?.card || themeImages.standard.card} src={themeImages[quiz.theme]?.card || themeImages.standard.card}
alt="quiz-card" alt="quiz-card"
style="max-width: 300px;" style="max-width:300px, min-width: 200px;"
/> />
<div class="p-5 flex flex-col justify-between w-full"> <div class="p-2 md:p-5 flex flex-col justify-between w-full">
<div class="flex justify-between"> <div class="flex justify-between">
<h4 class="dark:text-white title text-md font-bold"> <h4 class="dark:text-white title text-md font-bold capitalize">
<a href="{$currentOrgPath}/quiz/{quiz.id}">{quiz.title}</a> <a href="{$currentOrgPath}/quiz/{quiz.id}">{quiz.title}</a>
</h4> </h4>
@@ -77,10 +77,10 @@
</Dropdown> </Dropdown>
</div> </div>
<div class="flex justify-between"> <div class="flex md:flex-row flex-col justify-between">
<div> <div>
<p class="mb-2">{pluralize('question', totalQuestions, true)}</p> <p class="mb-2">{pluralize('question', totalQuestions, true)}</p>
<p>Updated {dayjs(quiz.updated_at).fromNow(true)} ago</p> <p class="mb-2 md:mb-0">Updated {dayjs(quiz.updated_at).fromNow(true)} ago</p>
</div> </div>
<PrimaryButton <PrimaryButton
@@ -96,6 +96,6 @@
<style> <style>
.root { .root {
height: 180px; min-height: 180px;
} }
</style> </style>
@@ -136,25 +136,25 @@
</script> </script>
<Grid class="border-c rounded border-gray-200 w-full mt-5 relative"> <Grid class="border-c rounded border-gray-200 w-full mt-5 relative">
<Row class="py-7 border-bottom-c"> <Row class="flex lg:flex-row flex-col py-7 border-bottom-c">
<Column sm={2} md={2} lg={4}> <Column sm={4} md={4} lg={4}>
<SectionTitle>Landing Page</SectionTitle> <SectionTitle>Landing Page</SectionTitle>
<Toggle bind:toggled={$landingPageSettings.header.show} size="sm"> <Toggle bind:toggled={$landingPageSettings.header.show} size="sm">
<span slot="labelA" style="color: gray">Hide section</span> <span slot="labelA" style="color: gray">Hide section</span>
<span slot="labelB" style="color: gray">Show section</span> <span slot="labelB" style="color: gray">Show section</span>
</Toggle> </Toggle>
</Column> </Column>
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8} class="mt-4 lg:mt-0">
<TextField <TextField
label="Title" label="Title"
placeholder="Write your title here" placeholder="Write your title here"
bind:value={$landingPageSettings.header.title} bind:value={$landingPageSettings.header.title}
className="mb-5" className="w-full mb-5"
/> />
<TextField <TextField
label="Title-Highlight" label="Title-Highlight"
placeholder="Write your titlehighlight here" placeholder="Write your titlehighlight here"
className="mb-5" className="w-full mb-5"
bind:value={$landingPageSettings.header.titleHighlight} bind:value={$landingPageSettings.header.titleHighlight}
/> />
@@ -162,7 +162,7 @@
label="Subtitle" label="Subtitle"
labelClassName="font-light" labelClassName="font-light"
placeholder="Write your subtitle here" placeholder="Write your subtitle here"
className="mb-5" className="w-full mb-5"
bind:value={$landingPageSettings.header.subtitle} bind:value={$landingPageSettings.header.subtitle}
/> />
@@ -170,7 +170,7 @@
<TextField <TextField
label="Label" label="Label"
placeholder="Write your label here" placeholder="Write your label here"
className="mt-3 mb-5" className="w-full mt-3 mb-5"
bind:value={$landingPageSettings.header.action.label} bind:value={$landingPageSettings.header.action.label}
/> />
<div class="gap-2 mb-5"> <div class="gap-2 mb-5">
@@ -199,15 +199,15 @@
</Column> </Column>
</Row> </Row>
<Row class="py-7 border-bottom-c"> <Row class="flex lg:flex-row flex-col py-7 border-bottom-c">
<Column sm={2} md={2} lg={4} <Column sm={4} md={4} lg={4}
><SectionTitle>About</SectionTitle> ><SectionTitle>About</SectionTitle>
<Toggle bind:toggled={$landingPageSettings.aboutUs.show} size="sm"> <Toggle bind:toggled={$landingPageSettings.aboutUs.show} size="sm">
<span slot="labelA" style="color: gray">Hide section</span> <span slot="labelA" style="color: gray">Hide section</span>
<span slot="labelB" style="color: gray">Show section</span> <span slot="labelB" style="color: gray">Show section</span>
</Toggle></Column </Toggle></Column
> >
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8} class="mt-4 lg:mt-0">
<TextField <TextField
label="Title" label="Title"
placeholder="Write your title here" placeholder="Write your title here"
@@ -244,15 +244,15 @@
</Column> </Column>
</Row> </Row>
<Row class="py-7 border-bottom-c"> <Row class="flex lg:flex-row flex-col py-7 border-bottom-c">
<Column sm={2} md={2} lg={4} <Column sm={4} md={4} lg={4}
><SectionTitle>Courses</SectionTitle> ><SectionTitle>Courses</SectionTitle>
<Toggle bind:toggled={$landingPageSettings.courses.show} size="sm"> <Toggle bind:toggled={$landingPageSettings.courses.show} size="sm">
<span slot="labelA" style="color: gray">Hide section</span> <span slot="labelA" style="color: gray">Hide section</span>
<span slot="labelB" style="color: gray">Show section</span> <span slot="labelB" style="color: gray">Show section</span>
</Toggle> </Toggle>
</Column> </Column>
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8} class="mt-4 lg:mt-0">
<TextField <TextField
label="Title" label="Title"
placeholder="Write your title here" placeholder="Write your title here"
@@ -272,15 +272,15 @@
</Column> </Column>
</Row> </Row>
<Row class="py-7 border-bottom-c"> <Row class="flex lg:flex-row flex-col py-7 border-bottom-c">
<Column sm={2} md={2} lg={4} <Column sm={4} md={4} lg={4}
><SectionTitle>Frequently Asked Questions</SectionTitle> ><SectionTitle>Frequently Asked Questions</SectionTitle>
<Toggle bind:toggled={$landingPageSettings.faq.show} size="sm"> <Toggle bind:toggled={$landingPageSettings.faq.show} size="sm">
<span slot="labelA" style="color: gray">Hide section</span> <span slot="labelA" style="color: gray">Hide section</span>
<span slot="labelB" style="color: gray">Show section</span> <span slot="labelB" style="color: gray">Show section</span>
</Toggle> </Toggle>
</Column> </Column>
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8}>
<TextField <TextField
label="Title" label="Title"
placeholder="Write your title here" placeholder="Write your title here"
@@ -331,15 +331,15 @@
</Column> </Column>
</Row> </Row>
<Row class="py-7 border-bottom-c"> <Row class="flex lg:flex-row flex-col py-7 border-bottom-c">
<Column sm={2} md={2} lg={4} <Column sm={4} md={4} lg={4}
><SectionTitle>Contact us</SectionTitle> ><SectionTitle>Contact us</SectionTitle>
<Toggle bind:toggled={$landingPageSettings.contact.show} size="sm"> <Toggle bind:toggled={$landingPageSettings.contact.show} size="sm">
<span slot="labelA" style="color: gray">Hide section</span> <span slot="labelA" style="color: gray">Hide section</span>
<span slot="labelB" style="color: gray">Show section</span> <span slot="labelB" style="color: gray">Show section</span>
</Toggle> </Toggle>
</Column> </Column>
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8}>
<TextField <TextField
label="Title" label="Title"
placeholder="Write your title here" placeholder="Write your title here"
@@ -375,15 +375,15 @@
</Column> </Column>
</Row> </Row>
<Row class="py-7 border-bottom-c"> <Row class="flex lg:flex-row flex-col py-7 border-bottom-c">
<Column sm={2} md={2} lg={4} <Column sm={4} md={4} lg={4}
><SectionTitle>Mailing List</SectionTitle> ><SectionTitle>Mailing List</SectionTitle>
<Toggle bind:toggled={$landingPageSettings.mailinglist.show} size="sm"> <Toggle bind:toggled={$landingPageSettings.mailinglist.show} size="sm">
<span slot="labelA" style="color: gray">Hide section</span> <span slot="labelA" style="color: gray">Hide section</span>
<span slot="labelB" style="color: gray">Show section</span> <span slot="labelB" style="color: gray">Show section</span>
</Toggle> </Toggle>
</Column> </Column>
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8} class="mt-4 lg:mt-0">
<TextField <TextField
label="Title" label="Title"
placeholder="Write your title here" placeholder="Write your title here"
@@ -407,15 +407,15 @@
</Column> </Column>
</Row> </Row>
<Row class="py-7 border-bottom-c"> <Row class="flex lg:flex-row flex-col py-7 border-bottom-c">
<Column sm={2} md={2} lg={4} <Column sm={4} md={4} lg={4}
><SectionTitle>Footer</SectionTitle> ><SectionTitle>Footer</SectionTitle>
<Toggle bind:toggled={$landingPageSettings.footer.show} size="sm"> <Toggle bind:toggled={$landingPageSettings.footer.show} size="sm">
<span slot="labelA" style="color: gray">Hide section</span> <span slot="labelA" style="color: gray">Hide section</span>
<span slot="labelB" style="color: gray">Show section</span> <span slot="labelB" style="color: gray">Show section</span>
</Toggle> </Toggle>
</Column> </Column>
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8} class="mt-4 lg:mt-0">
<TextField <TextField
label="Facebook" label="Facebook"
placeholder="Write your Facebook link here" placeholder="Write your Facebook link here"
@@ -98,10 +98,14 @@
</script> </script>
<Grid class="border-c rounded border-gray-200 w-full mt-5"> <Grid class="border-c rounded border-gray-200 w-full mt-5">
<Row class="py-7 border-bottom-c"> <Row class="flex lg:flex-row flex-col py-7 border-bottom-c">
<Column sm={2} md={2} lg={4}><SectionTitle>Organization Profile</SectionTitle></Column> <Column sm={4} md={4} lg={4}><SectionTitle>Organization Profile</SectionTitle></Column>
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8} class="mt-2 lg:mt-0 flex flex-col items-center lg:items-start">
<TextField label="Organization Name" bind:value={$currentOrg.name} className="w-60 mb-5" /> <TextField
label="Organization Name"
bind:value={$currentOrg.name}
className="w-full lg:w-60 mb-5"
/>
<UploadImage <UploadImage
bind:avatar bind:avatar
src={$currentOrg.avatar_url} src={$currentOrg.avatar_url}
@@ -110,65 +114,65 @@
/> />
<PrimaryButton <PrimaryButton
label="Update Organization" label="Update Organization"
className="px-6 py-3 mr-5 mt-5" className="px-6 py-3 lg:mr-5 mt-5"
isLoading={loading} isLoading={loading}
isDisabled={loading} isDisabled={loading}
onClick={handleUpdate} onClick={handleUpdate}
/> />
</Column> </Column>
</Row> </Row>
<Row class="py-7 border-bottom-c"> <Row class="flex lg:flex-row flex-col py-7 border-bottom-c">
<Column sm={2} md={2} lg={4}><SectionTitle>Theme</SectionTitle></Column> <Column sm={4} md={4} lg={4}><SectionTitle>Theme</SectionTitle></Column>
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8}>
<h4 class="dark:text-white mt-0">Set your brand color</h4> <h4 class="dark:text-white lg:mt-0">Set your brand color</h4>
<div class="flex gap-2"> <div class="flex gap-2">
<button <button
class="rounded-full border-2 {$currentOrg.theme === themes.default && class="rounded-full border-2 {$currentOrg.theme === themes.default &&
'border-[#1d4ee2]'} mr-3" 'border-[#1d4ee2]'} mr-3 flex items-center justify-center"
on:click={handleChangeTheme(themes.default)} on:click={handleChangeTheme(themes.default)}
> >
<div class="w-6 h-6 bg-[#1d4ee2] rounded-full m-1" /> <div class="w-3 h-3 md:w-6 md:h-6 bg-[#1d4ee2] rounded-full m-1" />
</button> </button>
<button <button
class="rounded-full border-2 {$currentOrg.theme === themes.rose && class="rounded-full border-2 {$currentOrg.theme === themes.rose &&
'border-[#be1241]'} mr-3" 'border-[#be1241]'} mr-3 flex items-center justify-center"
on:click={handleChangeTheme(themes.rose)} on:click={handleChangeTheme(themes.rose)}
> >
<div class="w-6 h-6 bg-[#be1241] rounded-full m-1" /> <div class="w-3 h-3 md:w-6 md:h-6 bg-[#be1241] rounded-full m-1" />
</button> </button>
<button <button
class="rounded-full border-2 {$currentOrg.theme === themes.green && class="rounded-full border-2 {$currentOrg.theme === themes.green &&
'border-[#0c891b]'} mr-3" 'border-[#0c891b]'} mr-3 flex items-center justify-center"
on:click={handleChangeTheme(themes.green)} on:click={handleChangeTheme(themes.green)}
> >
<div class="w-6 h-6 bg-[#0c891b] rounded-full m-1" /> <div class="w-3 h-3 md:w-6 md:h-6 bg-[#0c891b] rounded-full m-1" />
</button> </button>
<button <button
class="rounded-full border-2 {$currentOrg.theme === themes.orange && class="rounded-full border-2 {$currentOrg.theme === themes.orange &&
'border-[#cc4902]'} mr-3" 'border-[#cc4902]'} mr-3 flex items-center justify-center"
on:click={handleChangeTheme(themes.orange)} on:click={handleChangeTheme(themes.orange)}
> >
<div class="w-6 h-6 bg-[#cc4902] rounded-full m-1" /> <div class="w-3 h-3 md:w-6 md:h-6 bg-[#cc4902] rounded-full m-1" />
</button> </button>
<button <button
class="rounded-full border-2 {$currentOrg.theme === themes.violet && class="rounded-full border-2 {$currentOrg.theme === themes.violet &&
'border-[#cf00ce]'} mr-3" 'border-[#cf00ce]'} mr-3 flex items-center justify-center"
on:click={handleChangeTheme(themes.violet)} on:click={handleChangeTheme(themes.violet)}
> >
<div class="w-6 h-6 bg-[#cf00ce] rounded-full m-1" /> <div class="w-3 h-3 md:w-6 md:h-6 bg-[#cf00ce] rounded-full m-1" />
</button> </button>
</div> </div>
</Column> </Column>
</Row> </Row>
<Row class="py-7 border-bottom-c"> <Row class="flex lg:flex-row flex-col py-7 border-bottom-c">
<Column sm={2} md={2} lg={4}><SectionTitle>Custom Domain</SectionTitle></Column> <Column sm={4} md={4} lg={4}><SectionTitle>Custom Domain</SectionTitle></Column>
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8}>
<h4 class="dark:text-white mt-0">Customise your Domain</h4> <h4 class="dark:text-white lg:mt-0">Customise your Domain</h4>
<p class="text-sm text-gray-500 dark:text-white"> <p class="text-sm text-gray-500 dark:text-white">
Create a custom URL so your audience can get to your organization easily Create a custom URL so your audience can get to your organization easily
</p> </p>
@@ -180,10 +184,10 @@
/> />
</Column> </Column>
</Row> </Row>
<Row class="py-7 border-bottom-c"> <Row class="flex lg:flex-row flex-col py-7 border-bottom-c">
<Column sm={2} md={2} lg={4}><SectionTitle>Team</SectionTitle></Column> <Column sm={4} md={4} lg={4}><SectionTitle>Team</SectionTitle></Column>
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8}>
<h4 class="dark:text-white">Set up your website</h4> <h4 class="dark:text-white lg:mt-0">Set up your website</h4>
<p class="text-sm text-gray-500 dark:text-white"> <p class="text-sm text-gray-500 dark:text-white">
Add team mates to your organization so you can both collaborate on projects. Add team mates to your organization so you can both collaborate on projects.
</p> </p>
+11 -11
View File
@@ -72,25 +72,25 @@
</script> </script>
<Grid class="border-c rounded border-gray-200 w-full mt-5"> <Grid class="border-c rounded border-gray-200 w-full mt-5">
<Row class="py-7 border-bottom-c"> <Row class="flex flex-col lg:flex-row items-center lg:items-start py-7 border-bottom-c ">
<Column sm={2} md={2} lg={4}> <Column sm={4} md={8} lg={4} class="mt-2 md:mt-0">
<SectionTitle>Profile Picture</SectionTitle> <SectionTitle>Profile Picture</SectionTitle>
</Column> </Column>
<Column sm={2} md={6} lg={8}> <Column sm={2} md={4} lg={8} class="mt-2 lg:mt-0">
<UploadImage bind:avatar src={$profile.avatar_url} widthHeight="w-24 h-24" /> <UploadImage bind:avatar src={$profile.avatar_url} widthHeight="w-16 h-16 lg:w-24 lg:h-24" />
</Column> </Column>
</Row> </Row>
<Row class="py-7 border-bottom-c"> <Row class="flex flex-col lg:flex-row py-7 border-bottom-c">
<Column sm={2} md={2} lg={4}> <Column sm={4} md={4} lg={4}>
<SectionTitle>Personal Information</SectionTitle> <SectionTitle>Personal Information</SectionTitle>
</Column> </Column>
<Column sm={2} md={6} lg={8}> <Column sm={8} md={8} lg={8} class="mt-2 lg:mt-0">
<TextField label="Full Name" bind:value={$profile.fullname} className="w-60 mb-4" /> <TextField label="Full Name" bind:value={$profile.fullname} className="w-full lg:w-60 mb-4" />
<TextField label="Username" bind:value={$profile.username} className="w-60 mb-4" /> <TextField label="Username" bind:value={$profile.username} className="w-full lg:w-60 mb-4" />
<TextField label="Email" bind:value={$profile.email} className="w-60 mb-4" /> <TextField label="Email" bind:value={$profile.email} className="w-full lg:w-60 mb-4" />
</Column> </Column>
</Row> </Row>
<Row class="m-5 w-full flex items-center justify-center"> <Row class="m-5 w-full flex items-center gap-2 lg:justify-center">
<PrimaryButton <PrimaryButton
label="Update Profile" label="Update Profile"
className="mr-5" className="mr-5"
+3 -3
View File
@@ -63,16 +63,16 @@
{/each} {/each}
<!-- <Tab label="Account" /> --> <!-- <Tab label="Account" /> -->
<svelte:fragment slot="content"> <svelte:fragment slot="content">
<TabContent> <TabContent class="w-full p-0">
<Profile /> <Profile />
</TabContent> </TabContent>
<!-- <TabContent> <!-- <TabContent>
<Account /> <Account />
</TabContent> --> </TabContent> -->
<TabContent> <TabContent class="w-full p-0">
<OrgSettings /> <OrgSettings />
</TabContent> </TabContent>
<TabContent> <TabContent class="w-full p-0">
<LandingpageSettings /> <LandingpageSettings />
</TabContent> </TabContent>
</svelte:fragment> </svelte:fragment>
+14 -7
View File
@@ -53,14 +53,17 @@
return pagePath.includes(itemPath); return pagePath.includes(itemPath);
} }
const toggleSidebar = () => {
$menu.hidden = !$menu.hidden;
};
</script> </script>
<aside <aside
class={` ${ class={`${
$menu.hidden $menu.hidden
? '-translate-x-[100%] top-[48px] md:top-0 absolute md:translate-x-0 md:relative ' ? '-translate-x-[100%] absolute md:translate-x-0 md:relative z-[9999]'
: 'translate-x-0 absolute md:relative top-[48px] md:top-0' : 'translate-x-0 absolute md:relative z-[9999]'
} transition 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`} } transition w-[250px] min-w-[250px] bg-gray-100 dark:bg-gray-800 h-[calc(100vh-36px)] md:h-full border border-l-0 border-t-0 border-b-0 border-r-1`}
> >
<div class="h-full flex flex-col"> <div class="h-full flex flex-col">
<div class="border-b border-gray-200 pt-5 px-4"> <div class="border-b border-gray-200 pt-5 px-4">
@@ -80,7 +83,11 @@
<ul class="my-5"> <ul class="my-5">
{#each menuItems as menuItem} {#each menuItems as menuItem}
<a href="{$currentOrgPath}{menuItem.path}" class="text-black no-underline"> <a
href="{$currentOrgPath}{menuItem.path}"
class="text-black no-underline"
on:click={toggleSidebar}
>
<li <li
class="flex items-center py-3 px-4 mb-2 {NavClasses.item} {isActive( class="flex items-center py-3 px-4 mb-2 {NavClasses.item} {isActive(
$page.url.pathname, $page.url.pathname,
@@ -110,13 +117,13 @@
</div> </div>
<span class="flex-grow" /> <span class="flex-grow" />
<ul class="my-5 pb-5 px-4"> <ul class="my-5 pb-5 px-4">
<a href={$currentOrgPath} class="text-black no-underline"> <a href={$currentOrgPath} class="text-black no-underline" on:click={toggleSidebar}>
<li class="flex items-center py-3 px-4 mb-2 rounded"> <li class="flex items-center py-3 px-4 mb-2 rounded">
<HelpIcon size={20} class="carbon-icon dark:text-white" /> <HelpIcon size={20} class="carbon-icon dark:text-white" />
<p class="dark:text-white ml-2">Help</p> <p class="dark:text-white ml-2">Help</p>
</li> </li>
</a> </a>
<a href="{$currentOrgPath}/settings" class="text-black no-underline"> <a href="{$currentOrgPath}/settings" class="text-black no-underline" on:click={toggleSidebar}>
<li <li
class="flex items-center py-3 px-4 mb-2 {NavClasses.item} {isActive( class="flex items-center py-3 px-4 mb-2 {NavClasses.item} {isActive(
$page.url.pathname, $page.url.pathname,
+20 -2
View File
@@ -346,11 +346,11 @@
} }
.org-root { .org-root {
height: calc(100vh - 44px); height: calc(100vh - 38px);
} }
.org-slot { .org-slot {
min-width: calc(100vw - 250px); min-width: calc(100vw - 250px);
height: calc(100vh - 44px); height: calc(100vh - 38px);
overflow-y: auto; overflow-y: auto;
} }
@@ -411,4 +411,22 @@
column-gap: 12px; column-gap: 12px;
row-gap: 12px; row-gap: 12px;
} }
@media screen and (max-width: 768px) {
:global(.cards-container) {
width: 95%;
margin: 0 auto;
padding: 0;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
column-gap: 12px;
row-gap: 12px;
}
}
@media screen and (max-width: 457px) {
.org-slot {
min-width: 100%;
max-height: calc(100vh - 38px);
overflow-y: auto;
}
}
</style> </style>
+1 -1
View File
@@ -52,7 +52,7 @@
class="flex items-center justify-center border border-[#EAEAEA] dark:bg-gray-700 gap-2 rounded w-full xl:w-[400px] h-fit xl:h-[516px] overflow-y-auto p-3 xl:mt-11" class="flex items-center justify-center border border-[#EAEAEA] dark:bg-gray-700 gap-2 rounded w-full xl:w-[400px] h-fit xl:h-[516px] overflow-y-auto p-3 xl:mt-11"
> >
<div <div
class="w-full h-full flex flex-col sm:flex-row xl:flex-col items-center md:items-center xl:items-start gap-5 md:justify-around" class="w-full h-full flex flex-col sm:flex-row xl:flex-col items-center justify-between md:items-center xl:items-start gap-5 md:justify-around"
> >
<div> <div>
<img src="/images/target.svg" alt="student Learning score" /> <img src="/images/target.svg" alt="student Learning score" />
+37 -11
View File
@@ -14,6 +14,7 @@
import type { UserLessonDataType, LessonsByMonthIndexType } from '$lib/utils/types'; import type { UserLessonDataType, LessonsByMonthIndexType } from '$lib/utils/types';
import WelcomeModal from '$lib/components/WelcomeModal/WelcomeModal.svelte'; import WelcomeModal from '$lib/components/WelcomeModal/WelcomeModal.svelte';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import { Add } from 'carbon-icons-svelte';
export let data; export let data;
const { orgName } = data; const { orgName } = data;
@@ -194,24 +195,32 @@
<div class="py-10 px-5 w-full max-w-7xl mx-auto"> <div class="py-10 px-5 w-full max-w-7xl mx-auto">
<div class="flex items-center justify-between mb-10"> <div class="flex items-center justify-between mb-10">
<h1 class="dark:text-white text-3xl font-bold">Dashboard</h1> <h1 class="dark:text-white text-2xl md:text-3xl font-bold">Dashboard</h1>
<PrimaryButton label="Create Course" onClick={createCourse} /> {#if $isMobile}
<PrimaryButton onClick={createCourse}>
<Add size={24} />
</PrimaryButton>
{:else}
<PrimaryButton label="Create Course" onClick={createCourse} />
{/if}
</div> </div>
<div class="flex items-start flex-wrap"> <div class="flex items-start flex-wrap">
{#each boxes as box} {#each boxes as box}
<div class="box flex flex-col rounded border border-gray-200 justify-center px-5 mr-5 mb-5"> <div
class="w-full md:w-[246px] h-[165px] flex flex-col rounded border border-gray-200 justify-center px-5 md:mr-5 mb-5"
>
<p class="dark:text-white mb-2 text-sm">{box.label}</p> <p class="dark:text-white mb-2 text-sm">{box.label}</p>
<p class="dark:text-white text-xl font-bold">{box.value}</p> <p class="dark:text-white text-xl font-bold">{box.value}</p>
</div> </div>
{/each} {/each}
</div> </div>
<div class="flex flex-wrap mt-5"> <div class="flex flex-wrap lg:flex-nowrap gap-2 mt-5 w-full">
<!-- Your Schedule --> <!-- Your Schedule -->
<div> <div class="w-full md:w-auto">
<p class="dark:text-white font-bold mb-7">Your Schedule</p> <p class="dark:text-white font-bold mb-7">Your Schedule</p>
<div class="rounded border w-2/5 border-gray-200 mr-5 schedule-box"> <div class="rounded border border-gray-200 md:mr-3 md:min-w-[450px] schedule-box">
{#if !$isMobile} {#if !$isMobile}
<div id="calendar" class="flex justify-center mt-5"> <div id="calendar" class="flex justify-center mt-5">
<InlineCalendar bind:store {theme} /> <InlineCalendar bind:store {theme} />
@@ -287,15 +296,15 @@
<!-- Your Activities --> <!-- Your Activities -->
<div> <div>
<p class="dark:text-white font-bold mb-7">Your Activities</p> <p class="dark:text-white font-bold mb-7 mt-5 lg:mt-0">Your Activities</p>
<div class="rounded border border-gray-200 w-5 activities-box py-4 px-5"> <div class="rounded border border-gray-200 md:min-w-[450px] activities-box py-4 px-2 md:px-5">
{#each activities as activity} {#each activities as activity}
<div class="flex mb-3 pb-3 border-b border-gray-200"> <div class="flex mb-3 pb-3 border-b border-gray-200">
<Avatar src={activity.avatar} name="avatar" /> <Avatar src={activity.avatar} name="avatar" />
<div class="ml-2 flex"> <div class="ml-2 flex flex-col lg:flex-row">
<div class="mr-2"> <div class="mr-2">
<p class="dark:text-white">{activity.name}</p> <p class="dark:text-white">{activity.name}</p>
<p class="dark:text-white mb-2 mt-1"> <p class="dark:text-white mb-2 mt-1 line-clamp-1 md:line-clamp-2">
{activity.description} {activity.description}
</p> </p>
<a href={activity.link}>View</a> <a href={activity.link}>View</a>
@@ -323,9 +332,9 @@
} }
.schedule-box, .schedule-box,
.activities-box { .activities-box {
min-width: 450px;
height: 516px; height: 516px;
overflow-y: auto; overflow-y: auto;
overflow: hidden;
} }
.calendar-root { .calendar-root {
@@ -373,4 +382,21 @@
font-size: 30px; font-size: 30px;
} }
} }
/* @media screen and (min-width: 756px) {
.schedule-box,
.activities-box {
height: fit-content;
overflow-y: auto;
overflow: hidden;
}
}
@media screen and (min-width: 756px) {
.schedule-box,
.activities-box {
height: fit-content;
overflow-y: auto;
}
} */
</style> </style>
+2 -7
View File
@@ -17,13 +17,8 @@
<section class="w-full max-w-6xl mx-auto"> <section class="w-full max-w-6xl mx-auto">
<div class="py-10 px-5"> <div class="py-10 px-5">
<div class="flex items-center justify-between mb-10"> <div class="flex items-center justify-between mb-10">
<h1 class="dark:text-white text-3xl font-bold">Audience</h1> <h1 class="dark:text-white text-2xl md:text-3xl font-bold">Audience</h1>
<PrimaryButton <PrimaryButton label="Export" onClick={exportAudience} isDisabled={isLoading} {isLoading} />
label="Export"
onClick={exportAudience}
isDisabled={isLoading}
{isLoading}
/>
</div> </div>
<Audience /> <Audience />
+14 -6
View File
@@ -3,6 +3,9 @@
import Community from '$lib/components/Org/Community/index.svelte'; import Community from '$lib/components/Org/Community/index.svelte';
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte'; import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
import { currentOrgPath } from '$lib/utils/store/org'; import { currentOrgPath } from '$lib/utils/store/org';
import { isMobile } from '$lib/utils/store/useMobile';
import AddFilled from 'carbon-icons-svelte/lib/AddFilled.svelte';
import Add from 'carbon-icons-svelte/lib/Add.svelte';
function askCommunity() { function askCommunity() {
goto(`${$currentOrgPath}/community/ask`); goto(`${$currentOrgPath}/community/ask`);
@@ -13,13 +16,18 @@
<title>Community - ClassroomIO</title> <title>Community - ClassroomIO</title>
</svelte:head> </svelte:head>
<section class="w-full max-w-4xl mx-auto"> <section class="w-full md:max-w-4xl md:mx-auto">
<div class="py-10 px-5"> <div class="w-full py-10 px-5">
<div class="flex items-center justify-between mb-10"> <div class="flex items-center justify-between mb-10 w-full">
<h1 class="dark:text-white text-3xl font-bold">Community</h1> <h1 class="dark:text-white text-2xl md:text-3xl font-bold">Community</h1>
<PrimaryButton label="Ask Community" onClick={askCommunity} /> {#if $isMobile}
<PrimaryButton onClick={askCommunity}>
<Add size={24} />
</PrimaryButton>
{:else}
<PrimaryButton label="Ask Community" onClick={askCommunity} />
{/if}
</div> </div>
<Community /> <Community />
</div> </div>
</section> </section>
@@ -55,7 +55,7 @@
<title>Ask the Community - ClassroomIO</title> <title>Ask the Community - ClassroomIO</title>
</svelte:head> </svelte:head>
<section class="w-full max-w-3xl mx-auto"> <section class="w-full md:max-w-3xl md:mx-auto">
<div class="p-5"> <div class="p-5">
<a <a
class="text-gray-500 dark:text-white text-md flex items-center" class="text-gray-500 dark:text-white text-md flex items-center"
@@ -63,15 +63,15 @@
> >
<ArrowLeftIcon size={24} class="carbon-icon dark:text-white" /> Go Back <ArrowLeftIcon size={24} class="carbon-icon dark:text-white" /> Go Back
</a> </a>
<div class="flex items-center justify-between"> <div class="flex items-center gap-12 justify-between">
<h1 class="dark:text-white text-3xl font-bold">Ask the community</h1> <h1 class="dark:text-white text-2xl md:text-3xl font-bold">Ask the community</h1>
<PrimaryButton label="Publish" onClick={handleSave} /> <PrimaryButton label="Publish" onClick={handleSave} />
</div> </div>
</div> </div>
<div class="mb-3 p-2"> <div class="mb-3 p-2">
<input <input
class="title rounded-lg border border-1 border-gray p-2 w-full focus:outline-none" class="title rounded-lg border border-1 border-gray p-2 w-full dark:text-black focus:outline-none"
error="false" error="false"
autocomplete="off" autocomplete="off"
placeholder="Title" placeholder="Title"
@@ -88,10 +88,11 @@
</p> </p>
{/if} {/if}
</div> </div>
<div class="px-2">
<TextEditor <TextEditor
bind:value={fields.body} bind:value={fields.body}
placeholder="Ask the community any question you might have" placeholder="Ask the community any question you might have"
onChange={(html) => (fields.body = html)} onChange={(html) => (fields.body = html)}
/> />
</div>
</section> </section>
+12 -4
View File
@@ -9,6 +9,8 @@
import { courses, createCourseModal, courseMetaDeta } from '$lib/components/Courses/store'; import { courses, createCourseModal, courseMetaDeta } from '$lib/components/Courses/store';
import { setProfileIdOfGroupMember } from '$lib/utils/services/courses'; import { setProfileIdOfGroupMember } from '$lib/utils/services/courses';
import { currentOrg } from '$lib/utils/store/org'; import { currentOrg } from '$lib/utils/store/org';
import { Add } from 'carbon-icons-svelte';
import { isMobile } from '$lib/utils/store/useMobile';
export let data; export let data;
let { allCourses, cantFetch } = data; let { allCourses, cantFetch } = data;
@@ -47,11 +49,17 @@
<title>Courses - ClassroomIO</title> <title>Courses - ClassroomIO</title>
</svelte:head> </svelte:head>
<section class="w-full max-w-6xl mx-auto"> <section class="w-full md:max-w-6xl md:mx-auto">
<div class="py-10 px-5"> <div class="py-10 px-2 md:px-5">
<div class="flex items-center justify-between mb-10"> <div class="flex items-center justify-between mb-10">
<h1 class="dark:text-white text-3xl font-bold">Courses</h1> <h1 class="dark:text-white text-2xl md:text-3xl font-bold">Courses</h1>
<PrimaryButton label="Create Course" onClick={() => ($createCourseModal.open = true)} /> {#if $isMobile}
<PrimaryButton onClick={() => ($createCourseModal.open = true)}>
<Add size={24} />
</PrimaryButton>
{:else}
<PrimaryButton label="Create Course" onClick={() => ($createCourseModal.open = true)} />
{/if}
</div> </div>
<NewCourseModal /> <NewCourseModal />
+10 -5
View File
@@ -4,6 +4,8 @@
import DeleteModal from '$lib/components/Org/Quiz/DeleteModal.svelte'; import DeleteModal from '$lib/components/Org/Quiz/DeleteModal.svelte';
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte'; import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
import { createQuizModal } from '$lib/utils/store/org'; import { createQuizModal } from '$lib/utils/store/org';
import { isMobile } from '$lib/utils/store/useMobile';
import { Add } from 'carbon-icons-svelte';
</script> </script>
<svelte:head> <svelte:head>
@@ -13,11 +15,14 @@
<section class="w-full max-w-6xl mx-auto"> <section class="w-full max-w-6xl mx-auto">
<div class="py-10 px-5"> <div class="py-10 px-5">
<div class="flex items-center justify-between mb-10"> <div class="flex items-center justify-between mb-10">
<h1 class="dark:text-white text-3xl font-bold">Interactive Quizzes</h1> <h1 class="dark:text-white text-2xl md:text-3xl font-bold">Interactive Quizzes</h1>
<PrimaryButton {#if $isMobile}
label="Create Quiz" <PrimaryButton onClick={() => ($createQuizModal.open = true)}>
onClick={() => ($createQuizModal.open = true)} <Add size={24} />
/> </PrimaryButton>
{:else}
<PrimaryButton label="Create Quiz" onClick={() => ($createQuizModal.open = true)} />
{/if}
</div> </div>
<NewQuizModal /> <NewQuizModal />
@@ -8,7 +8,7 @@
</svelte:head> </svelte:head>
<section class="w-full max-w-6xl mx-auto"> <section class="w-full max-w-6xl mx-auto">
<div class="py-10 px-5"> <div class="py-10 px-3 md:px-5">
<a class="text-gray-500 dark:text-white text-md" href={`${$currentOrgPath}/settings?tab=org`} <a class="text-gray-500 dark:text-white text-md" href={`${$currentOrgPath}/settings?tab=org`}
>Back to Settings</a >Back to Settings</a
> >
@@ -8,7 +8,7 @@
</svelte:head> </svelte:head>
<section class="w-full max-w-6xl mx-auto"> <section class="w-full max-w-6xl mx-auto">
<div class="py-10 px-5"> <div class="py-10 px-3 md:px-5">
<a class="text-gray-500 dark:text-white text-md" href={`${$currentOrgPath}/settings?tab=org`} <a class="text-gray-500 dark:text-white text-md" href={`${$currentOrgPath}/settings?tab=org`}
>Back to Settings</a >Back to Settings</a
> >