Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chamilo-lms/var/vue_templates/components/layout/DashboardLayout.vue

52 lines
1.2 KiB

<script setup>
import { useSecurityStore } from "../../../../assets/vue/store/securityStore"
import Topbar from "./Topbar.vue"
import Sidebar from "../../../../assets/vue/components/layout/Sidebar.vue"
import SidebarNotLoggedIn from "./SidebarNotLoggedIn.vue"
import Breadcrumb from "../../../../assets/vue/components/Breadcrumb.vue"
defineProps({
showBreadcrumb: {
type: Boolean,
default: true,
},
})
const securityStore = useSecurityStore()
</script>
<template>
<Topbar />
<Sidebar v-if="securityStore.isAuthenticated" />
<SidebarNotLoggedIn v-else />
<div
class="app-main"
:class="{
'app-main--no-sidebar': !securityStore.isAuthenticated,
'app-main--no-loggedin': !securityStore.isAuthenticated,
}"
>
<Breadcrumb v-if="showBreadcrumb" />
<slot />
<router-view />
</div>
</template>
<style scoped lang="scss">
@media (min-width: 640px) {
#app {
&.app--sidebar-inactive {
.app-main.app-main--no-loggedin {
margin-left: 15rem !important;
}
}
&:not(.app--sidebar-inactive) {
.app-main.app-main--no-loggedin {
margin-left: 15rem !important;
}
}
}
}
</style>