From 9dd7ede04abba0eb14bed1990bb2f40078a76189 Mon Sep 17 00:00:00 2001 From: emmanuel Date: Mon, 4 Sep 2023 19:48:13 +0000 Subject: [PATCH] CLASSROOMIO-T-144:Made the dashboard responsive Co-authored-by: Ifeanyi Nwosu Merge-request: CLASSROOMIO-MR-65 Merged-by: Best Admin --- src/lib/components/Navigation/app.svelte | 17 +++++++++++++++++ src/lib/components/Org/SideBar.svelte | 7 ++++++- src/lib/components/Org/store.js | 5 +++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/lib/components/Org/store.js diff --git a/src/lib/components/Navigation/app.svelte b/src/lib/components/Navigation/app.svelte index 04a65408..3e0892ba 100644 --- a/src/lib/components/Navigation/app.svelte +++ b/src/lib/components/Navigation/app.svelte @@ -5,6 +5,8 @@ import Moon from 'carbon-icons-svelte/lib/Moon.svelte'; import Sun from 'carbon-icons-svelte/lib/Sun.svelte'; import CourseIcon from '$lib/components/Icons/CourseIcon.svelte'; + import Menu from 'carbon-icons-svelte/lib/Menu.svelte'; + import Close from 'carbon-icons-svelte/lib/Close.svelte'; import IconButton from '$lib/components/IconButton/index.svelte'; import { course } from '$lib/components/Course/store'; @@ -12,11 +14,16 @@ import { currentOrgPath } from '$lib/utils/store/org'; import { toggleBodyByTheme } from '$lib/utils/functions/app'; import { goto } from '$app/navigation'; + import { menu } from '../Org/store'; export let title = ''; export let navClass = ''; export let isCoursePage = false; + const toggleSidebar = () => { + $menu.hidden = !$menu.hidden; + }; + function toggleDarkMode() { $appStore.isDark = !$appStore.isDark; @@ -41,6 +48,15 @@ >
    +
  • + + {#if $menu.hidden} + + {:else} + + {/if} + +
  • {#if isCoursePage} { @@ -76,6 +92,7 @@ {/if} +
diff --git a/src/lib/components/Org/SideBar.svelte b/src/lib/components/Org/SideBar.svelte index 36d7fdc6..fbc8a061 100644 --- a/src/lib/components/Org/SideBar.svelte +++ b/src/lib/components/Org/SideBar.svelte @@ -14,6 +14,7 @@ import { currentOrg, currentOrgPath } from '$lib/utils/store/org'; import { profile } from '$lib/utils/store/user'; import { NavClasses } from '$lib/utils/constants/reusableClass'; + import { menu } from './store'; const menuItems = [ { @@ -55,7 +56,11 @@