|
| 1 | +<template> |
| 2 | + <sidenav |
| 3 | + :custom_class="this.$store.state.mcolor" |
| 4 | + :class="[ |
| 5 | + this.$store.state.isTransparent, |
| 6 | + this.$store.state.isRTL ? 'fixed-end' : 'fixed-start', |
| 7 | + ]" |
| 8 | + v-if="this.$store.state.showSidenav" |
| 9 | + /> |
| 10 | + <main |
| 11 | + class="main-content position-relative max-height-vh-100 h-100 border-radius-lg" |
| 12 | + > |
| 13 | + <!-- nav --> |
| 14 | + <navbar |
| 15 | + :class="[navClasses]" |
| 16 | + :textWhite="this.$store.state.isAbsolute ? 'text-white opacity-8' : ''" |
| 17 | + :minNav="navbarMinimize" |
| 18 | + v-if="this.$store.state.showNavbar" |
| 19 | + /> |
| 20 | + <router-view /> |
| 21 | + <app-footer v-show="this.$store.state.showFooter" /> |
| 22 | + <configurator |
| 23 | + :toggle="toggleConfigurator" |
| 24 | + :class="[ |
| 25 | + this.$store.state.showConfig ? 'show' : '', |
| 26 | + this.$store.state.hideConfigButton ? 'd-none' : '', |
| 27 | + ]" |
| 28 | + /> |
| 29 | + </main> |
| 30 | +</template> |
| 31 | +<script> |
| 32 | +import Sidenav from "./examples/Sidenav"; |
| 33 | +import Configurator from "@/examples/Configurator.vue"; |
| 34 | +import Navbar from "@/examples/Navbars/Navbar.vue"; |
| 35 | +import AppFooter from "@/examples/Footer.vue"; |
| 36 | +import { mapMutations } from "vuex"; |
| 37 | +export default { |
| 38 | + name: "App", |
| 39 | + components: { |
| 40 | + Sidenav, |
| 41 | + Configurator, |
| 42 | + Navbar, |
| 43 | + AppFooter, |
| 44 | + }, |
| 45 | + methods: { |
| 46 | + ...mapMutations(["toggleConfigurator", "navbarMinimize"]), |
| 47 | + }, |
| 48 | + computed: { |
| 49 | + navClasses() { |
| 50 | + return { |
| 51 | + "position-sticky blur shadow-blur mt-4 left-auto top-1 z-index-sticky": this |
| 52 | + .$store.state.isNavFixed, |
| 53 | + "position-absolute px-4 mx-0 w-100 z-index-2": this.$store.state |
| 54 | + .isAbsolute, |
| 55 | + "px-0 mx-4 mt-4": !this.$store.state.isAbsolute, |
| 56 | + }; |
| 57 | + }, |
| 58 | + }, |
| 59 | + beforeMount() { |
| 60 | + this.$store.state.isTransparent = "bg-transparent"; |
| 61 | + }, |
| 62 | +}; |
| 63 | +</script> |
0 commit comments