refactor: update layout
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<CHeader position="sticky" class="mb-4">
|
<CHeader position="sticky" class="mb-4">
|
||||||
<CContainer fluid>
|
<CContainer class="border-bottom" fluid>
|
||||||
<CHeaderToggler class="ps-1" @click="$store.commit('toggleSidebar')">
|
<CHeaderToggler class="ps-1" @click="$store.commit('toggleSidebar')">
|
||||||
<CIcon icon="cil-menu" size="lg" />
|
<CIcon icon="cil-menu" size="lg" />
|
||||||
</CHeaderToggler>
|
</CHeaderToggler>
|
||||||
@@ -42,9 +42,9 @@
|
|||||||
</li>
|
</li>
|
||||||
<CDropdown variant="nav-item" placement="bottom-end">
|
<CDropdown variant="nav-item" placement="bottom-end">
|
||||||
<CDropdownToggle :caret="false">
|
<CDropdownToggle :caret="false">
|
||||||
<CIcon v-if="getColorMode() === 'dark'" icon="cil-moon" size="xl" />
|
<CIcon v-if="colorMode === 'dark'" icon="cil-moon" size="xl" />
|
||||||
<CIcon
|
<CIcon
|
||||||
v-else-if="getColorMode() === 'light'"
|
v-else-if="colorMode === 'light'"
|
||||||
icon="cil-sun"
|
icon="cil-sun"
|
||||||
size="xl"
|
size="xl"
|
||||||
/>
|
/>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
</CDropdownToggle>
|
</CDropdownToggle>
|
||||||
<CDropdownMenu>
|
<CDropdownMenu>
|
||||||
<CDropdownItem
|
<CDropdownItem
|
||||||
:active="getColorMode() === 'light'"
|
:active="colorMode === 'light'"
|
||||||
class="d-flex align-items-center"
|
class="d-flex align-items-center"
|
||||||
component="button"
|
component="button"
|
||||||
type="button"
|
type="button"
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<CIcon class="me-2" icon="cil-sun" size="lg" /> Light
|
<CIcon class="me-2" icon="cil-sun" size="lg" /> Light
|
||||||
</CDropdownItem>
|
</CDropdownItem>
|
||||||
<CDropdownItem
|
<CDropdownItem
|
||||||
:active="getColorMode() === 'dark'"
|
:active="colorMode === 'dark'"
|
||||||
class="d-flex align-items-center"
|
class="d-flex align-items-center"
|
||||||
component="button"
|
component="button"
|
||||||
type="button"
|
type="button"
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
<CIcon class="me-2" icon="cil-moon" size="lg" /> Dark
|
<CIcon class="me-2" icon="cil-moon" size="lg" /> Dark
|
||||||
</CDropdownItem>
|
</CDropdownItem>
|
||||||
<CDropdownItem
|
<CDropdownItem
|
||||||
:active="getColorMode() === 'auto'"
|
:active="colorMode === 'auto'"
|
||||||
class="d-flex align-items-center"
|
class="d-flex align-items-center"
|
||||||
component="button"
|
component="button"
|
||||||
type="button"
|
type="button"
|
||||||
@@ -89,7 +89,6 @@
|
|||||||
<AppHeaderDropdownAccnt />
|
<AppHeaderDropdownAccnt />
|
||||||
</CHeaderNav>
|
</CHeaderNav>
|
||||||
</CContainer>
|
</CContainer>
|
||||||
<CHeaderDivider />
|
|
||||||
<CContainer fluid>
|
<CContainer fluid>
|
||||||
<AppBreadcrumb />
|
<AppBreadcrumb />
|
||||||
</CContainer>
|
</CContainer>
|
||||||
@@ -108,13 +107,13 @@ export default {
|
|||||||
AppHeaderDropdownAccnt,
|
AppHeaderDropdownAccnt,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const { getColorMode, setColorMode } = useColorModes(
|
const { colorMode, setColorMode } = useColorModes(
|
||||||
'coreui-free-vue-admin-template-theme',
|
'coreui-free-vue-admin-template-theme',
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
logo,
|
logo,
|
||||||
|
colorMode,
|
||||||
setColorMode,
|
setColorMode,
|
||||||
getColorMode,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<CSidebar
|
<CSidebar
|
||||||
|
class="border-end"
|
||||||
position="fixed"
|
position="fixed"
|
||||||
:unfoldable="sidebarUnfoldable"
|
:unfoldable="sidebarUnfoldable"
|
||||||
:visible="sidebarVisible"
|
:visible="sidebarVisible"
|
||||||
@@ -11,23 +12,27 @@
|
|||||||
})
|
})
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<CSidebarBrand>
|
<CSidebarHeader class="border-bottom">
|
||||||
<CIcon
|
<CSidebarBrand>
|
||||||
custom-class-name="sidebar-brand-full"
|
<CIcon
|
||||||
:icon="logoNegative"
|
custom-class-name="sidebar-brand-full"
|
||||||
:height="35"
|
:icon="logoNegative"
|
||||||
/>
|
:height="32"
|
||||||
<CIcon
|
/>
|
||||||
custom-class-name="sidebar-brand-narrow"
|
<CIcon
|
||||||
:icon="sygnet"
|
custom-class-name="sidebar-brand-narrow"
|
||||||
:height="35"
|
:icon="sygnet"
|
||||||
/>
|
:height="32"
|
||||||
</CSidebarBrand>
|
/>
|
||||||
|
</CSidebarBrand>
|
||||||
|
</CSidebarHeader>
|
||||||
<AppSidebarNav />
|
<AppSidebarNav />
|
||||||
<CSidebarToggler
|
<CSidebarFooter class="border-top">
|
||||||
class="d-none d-lg-flex"
|
<CSidebarToggler
|
||||||
@click="$store.commit('toggleUnfoldable')"
|
class="d-none d-lg-flex"
|
||||||
/>
|
@click="$store.commit('toggleUnfoldable')"
|
||||||
|
/>
|
||||||
|
</CSidebarFooter>
|
||||||
</CSidebar>
|
</CSidebar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<AppSidebar />
|
<AppSidebar />
|
||||||
<div class="wrapper d-flex flex-column min-vh-100 bg-body-tertiary">
|
<div class="wrapper d-flex flex-column min-vh-100">
|
||||||
<AppHeader />
|
<AppHeader />
|
||||||
<div class="body flex-grow-1 px-3">
|
<div class="body flex-grow-1 px-3">
|
||||||
<CContainer lg>
|
<CContainer lg>
|
||||||
|
|||||||
+33
-1
@@ -1 +1,33 @@
|
|||||||
// Here you can add other styles
|
// Here you can add other styles// Here you can add other styles
|
||||||
|
.header > .container-fluid,
|
||||||
|
.sidebar-header {
|
||||||
|
min-height: calc(4rem + 1px); // stylelint-disable-line function-disallowed-list
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-toggler {
|
||||||
|
@include ltr-rtl("margin-left", auto);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-narrow,
|
||||||
|
.sidebar-narrow-unfoldable:not(:hover) {
|
||||||
|
.sidebar-toggler {
|
||||||
|
@include ltr-rtl("margin-right", auto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.header > .container-fluid + .container-fluid {
|
||||||
|
min-height: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.container-fluid {
|
||||||
|
padding-right: $spacer;
|
||||||
|
padding-left: $spacer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
min-height: calc(3rem + 1px); // stylelint-disable-line function-disallowed-list
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,22 @@
|
|||||||
|
body {
|
||||||
|
background-color: var(--cui-tertiary-bg);
|
||||||
|
}
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@include ltr-rtl("padding-left", var(--cui-sidebar-occupy-start, 0));
|
@include ltr-rtl("padding-left", var(--cui-sidebar-occupy-start, 0));
|
||||||
will-change: auto;
|
will-change: auto;
|
||||||
@include transition(padding .15s);
|
@include transition(padding .15s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if $enable-dark-mode {
|
||||||
|
@include color-mode(dark) {
|
||||||
|
body {
|
||||||
|
background-color: var(--cui-dark-bg-subtle);
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
--cui-footer-bg: var(--cui-body-bg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user