| class CustomNavbar extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| nav { | |
| background: linear-gradient(135deg, #111827 0%, #1f2937 100%); | |
| padding: 1rem 2rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| border-bottom: 1px solid rgba(255, 255, 255, 0.1); | |
| } | |
| .logo { | |
| color: white; | |
| font-weight: bold; | |
| font-size: 1.5rem; | |
| background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| .nav-links { | |
| display: flex; | |
| gap: 1.5rem; | |
| list-style: none; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| .nav-link { | |
| color: rgba(255, 255, 255, 0.8); | |
| text-decoration: none; | |
| transition: all 0.3s ease; | |
| font-weight: 500; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| padding: 0.5rem 1rem; | |
| border-radius: 0.375rem; | |
| } | |
| .nav-link:hover { | |
| color: white; | |
| background: rgba(255, 255, 255, 0.1); | |
| } | |
| .nav-link.active { | |
| color: white; | |
| background: rgba(99, 102, 241, 0.2); | |
| } | |
| .nav-link i { | |
| width: 18px; | |
| height: 18px; | |
| } | |
| @media (max-width: 768px) { | |
| nav { | |
| flex-direction: column; | |
| padding: 1rem; | |
| } | |
| .nav-links { | |
| margin-top: 1rem; | |
| width: 100%; | |
| justify-content: space-around; | |
| } | |
| .nav-link { | |
| padding: 0.5rem; | |
| font-size: 0.875rem; | |
| } | |
| } | |
| </style> | |
| <nav> | |
| <a href="/" class="logo"> | |
| <i data-feather="book-open"></i> | |
| DoclingRag | |
| </a> | |
| <ul class="nav-links"> | |
| <li><a href="/" class="nav-link active"><i data-feather="home"></i> Home</a></li> | |
| <li><a href="/configure.html" class="nav-link"><i data-feather="settings"></i> Configure</a></li> | |
| <li><a href="/vector.html" class="nav-link"><i data-feather="database"></i> Vector Store</a></li> | |
| <li><a href="/analytics.html" class="nav-link"><i data-feather="bar-chart-2"></i> Analytics</a></li> | |
| <li><a href="/settings.html" class="nav-link"><i data-feather="user"></i> Account</a></li> | |
| </ul> | |
| </nav> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-navbar', CustomNavbar); |