Merge pull request #47 from josedario87/ui/navbar-topbar-redesign
All checks were successful
build-and-deploy / filter (push) Successful in 2s
build-and-deploy / build (push) Successful in 10s
build-and-deploy / deploy (push) Successful in 26s

UI/navbar topbar redesign
This commit is contained in:
josedario87
2025-06-10 00:31:11 -06:00
committed by GitHub
3 changed files with 21 additions and 12 deletions

View File

@@ -64,7 +64,7 @@ const transitionDurationStyle = computed(() => {
<!-- wrapper: deja espacio para TopBar (pt-14 = 56px) y, en desktop, para NavBar (pl-60) --> <!-- wrapper: deja espacio para TopBar (pt-14 = 56px) y, en desktop, para NavBar (pl-60) -->
<div :class="[ <div :class="[
'pt-14 min-h-screen transition-[padding-left] duration-200', 'pt-14 min-h-screen transition-[padding-left] duration-200',
ui.sidebarOpen ? 'md:pl-60' : '', (ui.sidebarOpen && ui.desktopNavbarPersistent) ? 'md:pl-60' : '',
// The global style.css will handle base background and text color via body styling // The global style.css will handle base background and text color via body styling
// but we can keep specific overrides here if needed or theme classes. // but we can keep specific overrides here if needed or theme classes.
// ui.theme === 'dark' ? 'bg-gray-800 text-gray-100' : 'bg-gray-100 text-gray-900' // ui.theme === 'dark' ? 'bg-gray-800 text-gray-100' : 'bg-gray-100 text-gray-900'

View File

@@ -80,10 +80,6 @@ const handleLinkClick = () => {
<div class="flex items-center justify-between px-4 py-4 md:px-5 md:py-4 md:border-none" <div class="flex items-center justify-between px-4 py-4 md:px-5 md:py-4 md:border-none"
style="border-bottom-color: var(--secondary-color); border-bottom-width: 1px;"> style="border-bottom-color: var(--secondary-color); border-bottom-width: 1px;">
<span class="text-lg font-semibold md:hidden" style="color: var(--primary-color);">Núcleo</span> <span class="text-lg font-semibold md:hidden" style="color: var(--primary-color);">Núcleo</span>
<button class="close-btn h-8 w-8 flex items-center justify-center rounded-full border transition duration-200"
@click="ui.toggleSidebar">
</button>
</div> </div>
<!-- navegación --> <!-- navegación -->

View File

@@ -7,26 +7,39 @@ const ui = useUi()
<!-- barra superior fija --> <!-- barra superior fija -->
<header class="fixed top-0 left-0 right-0 h-14 flex items-center justify-between px-4 md:px-6 z-50 shadow-sm" <header class="fixed top-0 left-0 right-0 h-14 flex items-center justify-between px-4 md:px-6 z-50 shadow-sm"
:style="{ backgroundColor: 'var(--background-color)', borderBottom: '1px solid var(--secondary-color)' }"> :style="{ backgroundColor: 'var(--background-color)', borderBottom: '1px solid var(--secondary-color)' }">
<!-- título -->
<h1 class="text-lg font-semibold tracking-wide select-none" :style="{ color: 'var(--primary-color)' }">Núcleo</h1>
<!-- botón hamburguesa (visible solo en mobile) --> <!-- botón hamburguesa (visible solo en mobile) -->
<button <button
@click="ui.toggleSidebar" @click="ui.toggleSidebar"
class="hamburger-button inline-flex items-center justify-center h-9 w-9 rounded-md text-white transition"> class="hamburger-button inline-flex items-center justify-center h-9 w-9 rounded-md text-white transition">
&#9776; &#9776;
</button> </button>
<!-- título -->
<h1 class="text-lg font-semibold tracking-wide select-none" :style="{ color: 'var(--primary-color)' }">Núcleo</h1>
</header> </header>
</template> </template>
<style scoped> <style scoped>
.hamburger-button { .hamburger-button {
background-color: var(--primary-color); background-color: var(--primary-color);
color: white; /* Assuming primary-color is dark enough for white text */
padding: 0.5rem; /* Increased padding */
border-radius: 0.375rem; /* Consistent border radius */
transition: background-color 0.2s ease-in-out, filter 0.2s ease-in-out;
line-height: 1; /* Ensure icon is centered if it's text-based */
} }
.hamburger-button:hover { .hamburger-button:hover {
filter: brightness(1.1); /* Slight lighten/darken based on primary color */ filter: brightness(1.15); /* Slightly more noticeable hover brightness */
}
.hamburger-button:focus {
outline: 2px solid var(--primary-color); /* Simple outline for focus */
outline-offset: 2px; /* Offset outline slightly */
}
.hamburger-button:focus-visible { /* More modern focus indication */
outline: 2px solid var(--primary-color);
outline-offset: 2px;
} }
/* Alternative hover if primary is very light or very dark, requiring specific color adjustment */
/* .hamburger-button:hover { background-color: var(--primary-color-hover); } */
/* Ensure --primary-color-hover is defined or calculated based on --primary-color if this approach is used */
</style> </style>