feat: add ripple effect, update theme styles and layout

This commit is contained in:
2026-02-26 22:57:03 +00:00
parent bdbb561740
commit 12a4130c38
13 changed files with 1028 additions and 12 deletions

38
src/components/Footer.vue Normal file
View File

@@ -0,0 +1,38 @@
<script setup>
const currentYear = new Date().getFullYear();
const version = __APP_VERSION__;
</script>
<template>
<footer class="app-footer unselectable">
<div class="footer-content">
<p>&copy; {{ currentYear }} Tools App. v{{ version }}</p>
</div>
</footer>
</template>
<style scoped>
.app-footer {
width: 100%;
padding: 1rem;
background-color: #242424;
border-top: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
align-items: center;
justify-content: center;
margin-top: auto; /* Push to bottom in flex container */
}
.footer-content {
display: flex;
align-items: center;
gap: 10px;
}
p {
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.6);
margin: 0;
font-family: monospace;
}
</style>

114
src/components/Header.vue Normal file
View File

@@ -0,0 +1,114 @@
<script setup>
import { ref, onMounted } from 'vue'
import { Sun, Moon } from 'lucide-vue-next'
defineEmits(['toggleSidebar'])
const isDark = ref(true)
const setTheme = (dark) => {
isDark.value = dark
const theme = dark ? 'dark' : 'light'
document.documentElement.dataset.theme = theme
localStorage.setItem('theme', theme)
}
const toggleTheme = () => {
setTheme(!isDark.value)
}
onMounted(() => {
const savedTheme = localStorage.getItem('theme')
if (savedTheme) {
setTheme(savedTheme === 'dark')
} else {
setTheme(true)
}
})
</script>
<template>
<header class="app-header glass-panel unselectable">
<div class="header-content">
<div class="header-left">
<button class="menu-btn" @click="$emit('toggleSidebar')" aria-label="Toggle Menu" v-ripple>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</button>
<h1 class="app-title">Tools App</h1>
</div>
<button
class="btn-neon nav-btn icon-only"
@click="toggleTheme"
:title="isDark ? 'Switch to light mode' : 'Switch to dark mode'"
v-ripple
>
<Sun v-if="isDark" :size="20" />
<Moon v-else :size="20" />
</button>
</div>
</header>
</template>
<style scoped>
.app-header {
/* Remove hardcoded colors and use theme variables */
background: var(--glass-bg);
color: var(--text-color);
padding: 1rem;
/* box-shadow handled by glass-panel class */
position: relative;
z-index: 100;
border-left: none;
border-right: none;
border-top: none;
border-radius: 0;
}
.header-content {
max-width: 100%;
padding: 0;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
}
.header-left {
display: flex;
align-items: center;
gap: 1rem;
}
.menu-btn {
background: none;
border: none;
color: var(--text-color);
cursor: pointer;
padding: 0.5rem;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s;
}
.menu-btn:hover {
background-color: var(--button-hover-bg);
}
.app-title {
margin: 0;
font-size: 1.5rem;
font-weight: 600;
background: var(--title-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
</style>

View 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>

View File

@@ -0,0 +1,15 @@
<script setup>
</script>
<template>
<div class="passwords-tool">
<h2>Passwords Generator</h2>
<p>This is the passwords generator tool (work in progress).</p>
</div>
</template>
<style scoped>
.passwords-tool {
padding: 1rem;
}
</style>