feat: add ripple effect, update theme styles and layout
This commit is contained in:
69
src/components/Sidebar.vue
Normal file
69
src/components/Sidebar.vue
Normal file
@@ -0,0 +1,69 @@
|
||||
<script setup>
|
||||
defineProps({
|
||||
isOpen: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<aside class="sidebar unselectable" :class="{ 'is-open': isOpen }">
|
||||
<nav class="sidebar-nav">
|
||||
<router-link to="/passwords" class="nav-item" v-ripple>Passwords</router-link>
|
||||
</nav>
|
||||
</aside>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.sidebar {
|
||||
width: 0;
|
||||
background-color: var(--panel-bg);
|
||||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
overflow-x: hidden;
|
||||
transition: width 0.3s ease;
|
||||
border-right: 1px solid var(--panel-border);
|
||||
flex-shrink: 0;
|
||||
height: 100%;
|
||||
box-shadow: var(--panel-shadow);
|
||||
}
|
||||
|
||||
.sidebar.is-open {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 250px; /* Fixed width for content */
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
display: block;
|
||||
padding: 0.5rem;
|
||||
color: var(--text-secondary);
|
||||
text-decoration: none;
|
||||
transition: background-color 0.2s, color 0.2s;
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.nav-item:hover {
|
||||
background-color: var(--button-hover-bg);
|
||||
color: var(--text-strong);
|
||||
}
|
||||
|
||||
.nav-item.router-link-active {
|
||||
color: var(--primary-accent);
|
||||
background-color: var(--toggle-bg);
|
||||
border-right: 2px solid var(--primary-accent);
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 1px;
|
||||
background-color: var(--panel-border);
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user