From f345de78e2ed206fe4172a6f3464e50a0be04684 Mon Sep 17 00:00:00 2001 From: Alexandro Uc Santos Date: Sat, 2 Dec 2023 17:36:45 -0600 Subject: [PATCH] add: component navbar --- src/components/NavBar.vue | 90 +++++++++++++++++++++++++++++++++++++ src/layouts/AdminLayout.vue | 83 ++-------------------------------- 2 files changed, 93 insertions(+), 80 deletions(-) create mode 100644 src/components/NavBar.vue diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue new file mode 100644 index 0000000..1bd442e --- /dev/null +++ b/src/components/NavBar.vue @@ -0,0 +1,90 @@ + + + + + \ No newline at end of file diff --git a/src/layouts/AdminLayout.vue b/src/layouts/AdminLayout.vue index b9c28a1..ffdd358 100644 --- a/src/layouts/AdminLayout.vue +++ b/src/layouts/AdminLayout.vue @@ -2,17 +2,12 @@ import { RouterLink, useRoute, useRouter } from 'vue-router'; import { useAuthStore } from '../stores/auth'; import LoadingModal from '../components/ui/LoadingModal.vue'; + import NavBar from '../components/NavBar.vue'; const route = useRoute(); const router = useRouter(); const auth = useAuthStore(); - $(document).ready(function() { - $('#sidebarCollapse').on('click', function () { - $('#sidebar').toggleClass('active'); - }); - }); - const handleLogout = () => { auth.$patch({ sesion: '', @@ -142,24 +137,8 @@ -
- +
+
@@ -177,21 +156,15 @@ } #sidebar { - /* margin: 20px; */ display: flex; flex-direction: column; width: 220px; min-height: 100vh; - /* background: #FFF; - color: #323030; */ background: #323030; color: #FFF; filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.10)); transition: all 0.3s; } - #sidebar.active { - margin-left: -250px; - } #sidebar .sidebar-header { padding: 20px; @@ -219,7 +192,6 @@ align-items: center; padding: 10px 20px; margin-bottom: 5px; - /* background-color: #FFF; */ background-color: #323030; } @@ -243,40 +215,11 @@ position: relative; } - .custom-navbar { - display: block; - width: calc(100vw - 220px); - background-color: #FFF; - } - - .btn-menu { - display: none; - } - - .dropdown-toggle::after { - display: block; - position: absolute; - top: 50%; - right: 20px; - transform: translateY(-50%); - } - .view { margin: 24px 50px; // width: calc(100vw - 260px); } - .nav-items { - display: flex; - flex-direction: row; - justify-content: end; - } - - .nav-options { - margin-left: 32px; - display: flex; - } - .nav-link{ cursor: pointer; /* color: #5f5c5c; */ @@ -294,16 +237,6 @@ color: #FFF; } - .router-link-active{ - /* color: #413f3c !important; */ - color: #FFF !important; - } - - .bg-nav-active { - /* background-color: #e4eff2 !important;; */ - background-color: #373738 !important;; - } - .eta-info { // position: fixed; display: flex; @@ -332,16 +265,6 @@ @media (max-width: 768px) { - .custom-navbar { - width: 100vw; - } - - .nav-items { - justify-content: space-between; - } - .btn-menu { - display: flex; - } #sidebar { margin-left: -220px;