Files
Projektarbeit-MYP/backend/static/css/navbar-improved.css

423 lines
8.3 KiB
CSS

/* =============================================
MINIMAL RESPONSIVE NAVBAR - MYP PLATFORM
============================================= */
/* CSS Variables für einfache Anpassung */
:root {
--navbar-height: 3.5rem;
--navbar-bg: rgba(255, 255, 255, 0.9);
--navbar-border: rgba(229, 231, 235, 0.5);
--navbar-blur: 8px;
--nav-item-gap: 0.25rem;
--nav-item-padding: 0.5rem 0.75rem;
--button-size: 2rem;
--icon-size: 1rem;
}
.dark {
--navbar-bg: rgba(17, 24, 39, 0.9);
--navbar-border: rgba(55, 65, 81, 0.5);
}
/* Basis Navbar - Minimal */
.navbar {
position: sticky;
top: 0;
z-index: 50;
width: 100%;
height: var(--navbar-height);
background: var(--navbar-bg);
backdrop-filter: blur(var(--navbar-blur));
-webkit-backdrop-filter: blur(var(--navbar-blur));
border-bottom: 1px solid var(--navbar-border);
transition: all 0.15s ease;
}
/* Navbar Scroll State - Subtiler */
.navbar.scrolled {
--navbar-height: 3rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
/* Container - Vereinfacht */
.navbar > div {
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
max-width: 100%;
}
/* Navbar Brand - Kompakter */
.navbar-brand {
display: flex;
align-items: center;
gap: 0.5rem;
text-decoration: none;
flex-shrink: 0;
}
.navbar-brand svg {
width: 1.25rem;
height: 1.25rem;
}
.navbar-brand span {
font-size: 0.875rem;
font-weight: 600;
}
/* Desktop Navigation - Minimalistisch */
.navbar-menu-new {
display: none;
align-items: center;
gap: var(--nav-item-gap);
flex: 1;
justify-content: center;
padding: 0;
}
@media (min-width: 1024px) {
.navbar-menu-new {
display: flex;
}
}
/* Navigation Items - Klein und einfach */
.nav-item {
display: flex;
align-items: center;
gap: 0.375rem;
padding: var(--nav-item-padding);
border-radius: 0.375rem;
color: rgb(107, 114, 128);
text-decoration: none;
font-size: 0.8125rem;
font-weight: 500;
white-space: nowrap;
transition: color 0.15s ease, background-color 0.15s ease;
}
.dark .nav-item {
color: rgb(156, 163, 175);
}
/* Minimale Hover-Effekte */
.nav-item:hover {
color: rgb(59, 130, 246);
background: rgba(59, 130, 246, 0.05);
}
.dark .nav-item:hover {
color: rgb(147, 197, 253);
background: rgba(59, 130, 246, 0.1);
}
.nav-item.active {
color: rgb(59, 130, 246);
background: rgba(59, 130, 246, 0.08);
}
.dark .nav-item.active {
color: rgb(147, 197, 253);
background: rgba(59, 130, 246, 0.15);
}
/* Icons - Klein */
.nav-item i,
.nav-item svg {
width: var(--icon-size);
height: var(--icon-size);
flex-shrink: 0;
}
/* Mobile Menu Button - Minimal */
#mobileMenuToggle {
display: flex;
align-items: center;
justify-content: center;
width: var(--button-size);
height: var(--button-size);
padding: 0;
background: transparent;
border: none;
border-radius: 0.375rem;
cursor: pointer;
}
#mobileMenuToggle svg {
width: 1.25rem;
height: 1.25rem;
color: rgb(107, 114, 128);
}
.dark #mobileMenuToggle svg {
color: rgb(156, 163, 175);
}
@media (min-width: 1024px) {
#mobileMenuToggle {
display: none;
}
}
/* Rechte Navbar Sektion - Kompakt */
.navbar .flex.items-center {
gap: 0.5rem;
}
/* Notification & User Buttons - Minimal */
#notificationToggle,
#user-menu-button {
width: var(--button-size);
height: var(--button-size);
padding: 0;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: none;
border-radius: 0.375rem;
cursor: pointer;
transition: background-color 0.15s ease;
}
#notificationToggle:hover,
#user-menu-button:hover {
background: rgba(0, 0, 0, 0.05);
}
.dark #notificationToggle:hover,
.dark #user-menu-button:hover {
background: rgba(255, 255, 255, 0.05);
}
/* Button Icons */
#notificationToggle i {
font-size: var(--icon-size);
color: rgb(107, 114, 128);
}
.dark #notificationToggle i {
color: rgb(156, 163, 175);
}
/* User Avatar - Klein */
#user-menu-button .rounded-full {
width: 1.5rem;
height: 1.5rem;
font-size: 0.625rem;
}
/* Notification Badge - Minimal */
#notificationBadge {
position: absolute;
top: 0.25rem;
right: 0.25rem;
width: 0.75rem;
height: 0.75rem;
font-size: 0.5rem;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
}
/* Dark Mode Toggle - Ultra Minimal */
.dark-mode-toggle {
width: 2rem;
height: 1rem;
background: rgb(229, 231, 235);
border-radius: 0.5rem;
cursor: pointer;
border: none;
padding: 0;
position: relative;
transition: background-color 0.15s ease;
}
.dark .dark-mode-toggle {
background: rgb(55, 65, 81);
}
.dark-mode-toggle-slider {
position: absolute;
top: 0.125rem;
left: 0.125rem;
width: 0.75rem;
height: 0.75rem;
background: white;
border-radius: 50%;
transition: transform 0.15s ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.dark .dark-mode-toggle-slider {
transform: translateX(1rem);
}
/* Icon Größen in Toggle */
.dark-mode-toggle-icon {
font-size: 0.5rem;
}
/* Mobile Menu - Vereinfacht */
.mobile-menu-new {
position: fixed;
top: var(--navbar-height);
left: 0;
right: 0;
bottom: 0;
background: var(--navbar-bg);
backdrop-filter: blur(var(--navbar-blur));
-webkit-backdrop-filter: blur(var(--navbar-blur));
transform: translateX(-100%);
transition: transform 0.2s ease;
overflow-y: auto;
}
.mobile-menu-new.active {
transform: translateX(0);
}
/* Mobile Navigation Items - Einfacher */
.mobile-nav-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.875rem 1rem;
color: rgb(107, 114, 128);
text-decoration: none;
font-size: 0.875rem;
font-weight: 500;
transition: background-color 0.15s ease;
}
.dark .mobile-nav-item {
color: rgb(156, 163, 175);
}
.mobile-nav-item:active {
background: rgba(0, 0, 0, 0.03);
}
.dark .mobile-nav-item:active {
background: rgba(255, 255, 255, 0.03);
}
.mobile-nav-item.active {
color: rgb(59, 130, 246);
background: rgba(59, 130, 246, 0.05);
border-left: 2px solid rgb(59, 130, 246);
}
.dark .mobile-nav-item.active {
color: rgb(147, 197, 253);
background: rgba(59, 130, 246, 0.1);
}
.mobile-nav-item i,
.mobile-nav-item svg {
width: 1.125rem;
height: 1.125rem;
}
/* Dropdowns - Einfacher */
#notificationDropdown,
#user-dropdown {
position: absolute;
top: 100%;
right: 0;
margin-top: 0.25rem;
background: white;
border: 1px solid var(--navbar-border);
border-radius: 0.5rem;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
min-width: 16rem;
max-width: 90vw;
}
.dark #notificationDropdown,
.dark #user-dropdown {
background: rgb(17, 24, 39);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
/* Responsive Anpassungen */
@media (max-width: 640px) {
:root {
--navbar-height: 3rem;
--button-size: 1.75rem;
}
.navbar > div {
padding: 0 0.75rem;
}
.navbar-brand svg {
width: 1.125rem;
height: 1.125rem;
}
.navbar-brand span {
font-size: 0.8125rem;
}
.navbar-brand .text-xs {
display: none;
}
}
@media (max-width: 360px) {
:root {
--button-size: 1.625rem;
--icon-size: 0.875rem;
}
.navbar-brand span {
display: none;
}
}
/* Tablet - Nur Icons */
@media (min-width: 768px) and (max-width: 1023px) {
.nav-item {
padding: 0.5rem;
}
.nav-item span {
display: none;
}
}
/* Entferne alle Glassmorphism-Duplikate */
.navbar::before,
.navbar::after,
.glass-nav,
.glass-navbar {
display: none !important;
}
/* Focus States - Minimal */
.navbar *:focus-visible {
outline: 1px solid rgb(59, 130, 246);
outline-offset: 1px;
}
/* Performance */
@media (prefers-reduced-motion: reduce) {
* {
animation: none !important;
transition: none !important;
}
}
/* Touch Optimierung */
@media (hover: none) {
.nav-item:hover,
#notificationToggle:hover,
#user-menu-button:hover {
background: transparent;
}
}