navbar_lightmode #2
@ -1,52 +1,60 @@
|
|||||||
<template>
|
<template>
|
||||||
<aside class="navbar">
|
<aside :class="[darkMode ? 'navbar-dark' : 'navbar-light', isExpanded ? 'is-expanded' : 'is-not-expanded']" >
|
||||||
<div class="toggle">
|
<div class="toggle">
|
||||||
<div class="icon" id="back-icon">
|
<div v-if="isExpanded" :class="{ 'darkStylesIcon': darkMode, 'lightStylesIcon': !darkMode }" id="back-icon">
|
||||||
<img loading="lazy" src="../icons/Back-Icon.svg"/>
|
<img :style="darkMode ? darkStylesImg : lightStylesImg" loading="lazy" src="../icons/Back-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<div class="icon" id="indicator-icon">
|
<div :class="{ 'darkStylesIcon': darkMode, 'lightStylesIcon': !darkMode }" id="indicator-icon" @click="toggleSidebar">
|
||||||
<img loading="lazy" src="../icons/navbar-icons/Nav-Indicator-Icon-Opened.svg"/>
|
<img :style="[darkMode ? darkStylesImg : lightStylesImg ]"
|
||||||
|
loading="lazy"
|
||||||
|
src="../icons/navbar-icons/Nav-Indicator-Icon-Opened.svg" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="menus">
|
<div class="menus">
|
||||||
<nav id="home-menu">
|
<nav :class="{ 'dark-home-menu': darkMode, 'light-home-menu': !darkMode }" id="home-menu">
|
||||||
<button id="home-button">
|
<button :class="{ 'dark-menu': darkMode, 'light-menu': !darkMode }" id="home-button">
|
||||||
<div class="icon" id="home-icon">
|
<div class="icon" id="home-icon">
|
||||||
<img loading="lazy" src="../icons/navbar-icons/Home-Icon.svg"/>
|
<img :style="darkMode ? darkStylesImg : lightStylesImg" loading="lazy"
|
||||||
|
src="../icons/navbar-icons/Home-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<pre class="label">Home</pre>
|
<pre v-if="isExpanded" :style="darkMode ? darkStylesLabel : lightStylesLabel" class="label">Home</pre>
|
||||||
</button>
|
</button>
|
||||||
</nav>
|
</nav>
|
||||||
<nav id="site-menu">
|
<nav id="site-menu">
|
||||||
<button id="checklists-button">
|
<button :class="{ 'dark-menu': darkMode, 'light-menu': !darkMode }" id="checklists-button">
|
||||||
<div class="icon" id="checklists-icon">
|
<div class="icon" id="checklists-icon">
|
||||||
<img loading="lazy" src="../icons/navbar-icons/Checklists-Icon.svg"/>
|
<img :style="darkMode ? darkStylesImg : lightStylesImg" loading="lazy"
|
||||||
|
src="../icons/navbar-icons/Checklists-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<pre class="label">Checklists</pre>
|
<pre v-if="isExpanded" :style="darkMode ? darkStylesLabel : lightStylesLabel" class="label">Checklists</pre>
|
||||||
</button>
|
</button>
|
||||||
<button id="assets-button">
|
<button :class="{ 'dark-menu': darkMode, 'light-menu': !darkMode }" id="assets-button">
|
||||||
<div class="icon" id="assets-icon">
|
<div class="icon" id="assets-icon">
|
||||||
<img loading="lazy" src="../icons/navbar-icons/Assets-Icon.svg"/>
|
<img :style="darkMode ? darkStylesImg : lightStylesImg" loading="lazy"
|
||||||
|
src="../icons/navbar-icons/Assets-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<pre class="label">Config Items</pre>
|
<pre v-if="isExpanded" :style="darkMode ? darkStylesLabel : lightStylesLabel" class="label">Config Items</pre>
|
||||||
</button>
|
</button>
|
||||||
<button id="solutions-button">
|
<button :class="{ 'dark-menu': darkMode, 'light-menu': !darkMode }" id="solutions-button">
|
||||||
<div class="icon" id="solutions-icon">
|
<div class="icon" id="solutions-icon">
|
||||||
<img loading="lazy" src="../icons/navbar-icons/Solutions-Icon.svg"/>
|
<img :style="darkMode ? darkStylesImg : lightStylesImg" loading="lazy"
|
||||||
|
src="../icons/navbar-icons/Solutions-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<pre class="label">Solutions</pre>
|
<pre v-if="isExpanded" :style="darkMode ? darkStylesLabel : lightStylesLabel" class="label">Solutions</pre>
|
||||||
</button>
|
</button>
|
||||||
<button id="accounting-button">
|
<button :class="{ 'dark-menu': darkMode, 'light-menu': !darkMode }" id="accounting-button">
|
||||||
<div class="icon" id="accounting-icon">
|
<div class="icon" id="accounting-icon">
|
||||||
<img loading="lazy" src="../icons/navbar-icons/Accounting-Icon.svg"/>
|
<img :style="darkMode ? darkStylesImg : lightStylesImg" loading="lazy"
|
||||||
|
src="../icons/navbar-icons/Accounting-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<pre class="label">Accounting</pre>
|
<pre v-if="isExpanded" :style="darkMode ? darkStylesLabel : lightStylesLabel" class="label">Accounting</pre>
|
||||||
</button>
|
</button>
|
||||||
<button id="clients-button">
|
<button :class="{ 'dark-menu': darkMode, 'light-menu': !darkMode }" id="clients-button">
|
||||||
<div class="icon" id="clients-icon">
|
<div class="icon" id="clients-icon">
|
||||||
<img loading="lazy" src="../icons/navbar-icons/Clients-Icon.svg"/>
|
<img :style="darkMode ? darkStylesImg : lightStylesImg" loading="lazy"
|
||||||
|
src="../icons/navbar-icons/Clients-Icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
<pre class="label">Clients</pre>
|
<pre v-if="isExpanded" :style="darkMode ? darkStylesLabel : lightStylesLabel" class="label">Clients</pre>
|
||||||
</button>
|
</button>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
@ -59,6 +67,29 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Navigationbar",
|
name: "Navigationbar",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
darkMode: false,
|
||||||
|
isExpanded: true,
|
||||||
|
darkStylesImg: {
|
||||||
|
filter: 'invert(100%)',
|
||||||
|
},
|
||||||
|
lightStylesImg: {
|
||||||
|
filter: 'none',
|
||||||
|
},
|
||||||
|
darkStylesLabel: {
|
||||||
|
color: '#fff',
|
||||||
|
},
|
||||||
|
lightStylesLabel: {
|
||||||
|
color: '#000',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggleSidebar() {
|
||||||
|
this.isExpanded = !this.isExpanded;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -66,61 +97,94 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar {
|
aside {
|
||||||
|
transition: 0.2s ease-out;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: calc(2.5rem + 2.5rem);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside.is-expanded {
|
||||||
|
width: 238px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-expanded .label {
|
||||||
|
opacity: 1;
|
||||||
|
transition: 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-not-expanded .darkStylesIcon {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-not-expanded .lightStylesIcon {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.navbar-dark {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 200px;
|
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
min-width: 200px;
|
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.25);
|
box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.25);
|
||||||
background-color: #2c2c2c;
|
background-color: #2c2c2c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar-light {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
height: fit-content;
|
||||||
|
border-radius: 10px;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 15px;
|
||||||
|
margin: 0;
|
||||||
|
box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.25);
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.toggle {
|
.toggle {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.menus {
|
.menus {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
position: relative;
|
||||||
justify-content: center;
|
transition: 0.2s ease-out;
|
||||||
|
justify-content: flex;
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
gap: 30px;
|
gap: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px;
|
padding-top: 0.8rem;
|
||||||
|
padding-bottom: 0.8rem;
|
||||||
gap: 30px;
|
gap: 30px;
|
||||||
}
|
}
|
||||||
#home-menu {
|
|
||||||
border-bottom: 1px solid #8e8e8e;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
button {
|
||||||
button {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -132,48 +196,104 @@ export default {
|
|||||||
border: none;
|
border: none;
|
||||||
background-color: #2c2c2c;
|
background-color: #2c2c2c;
|
||||||
transition-duration: 0.5s;
|
transition-duration: 0.5s;
|
||||||
}
|
}
|
||||||
button:hover {
|
|
||||||
|
.dark-menu {
|
||||||
|
background-color: #2c2c2c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.light-menu {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-menu:hover {
|
||||||
background-color: #444444;
|
background-color: #444444;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.light-menu:hover {
|
||||||
|
background-color: #ACACAC;
|
||||||
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 35px;
|
width: 35px;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
}
|
transition: 0.2s ease-out;
|
||||||
#indicator-icon, #back-icon {
|
}
|
||||||
|
|
||||||
|
.lightStylesIcon {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 35px;
|
||||||
|
height: 35px;
|
||||||
|
transition: 0.2s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.darkStylesIcon {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 35px;
|
||||||
|
height: 35px;
|
||||||
|
transition: 0.2s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
#back-icon {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background-color: #2c2c2c;
|
|
||||||
transition-duration: 0.5s;
|
transition-duration: 0.5s;
|
||||||
}
|
transition: 0.2s ease-out;
|
||||||
#indicator-icon:hover, #back-icon:hover {
|
}
|
||||||
background-color: #444444;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon > img {
|
#indicator-icon {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 5px;
|
||||||
|
transition-duration: 0.5s;
|
||||||
|
transition: transform 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lightStylesIcon:hover {
|
||||||
|
background-color: #ACACAC;
|
||||||
|
}
|
||||||
|
|
||||||
|
.darkStylesIcon:hover {
|
||||||
|
background-color: #444444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon>img,
|
||||||
|
.lightStylesIcon>img,
|
||||||
|
.darkStylesIcon>img {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
filter: invert(100%);
|
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
object-position: center;
|
object-position: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
transition: 0.2s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-home-menu {
|
||||||
|
border-bottom: 1px solid #8e8e8e;
|
||||||
|
}
|
||||||
|
|
||||||
.label {
|
.light-home-menu {
|
||||||
color: #fff;
|
border-bottom: 1px solid #BABABA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
letter-spacing: 0.7px;
|
letter-spacing: 0.7px;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
margin: auto 0;
|
margin: auto 0;
|
||||||
font: 600 14px/20px Overpass, sans-serif;
|
font: 600 14px/20px Overpass, sans-serif;
|
||||||
}
|
opacity: 0;
|
||||||
|
transition: opacity 0.5s ease-out;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user