| class CustomNavbar extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| z-index: 50; | |
| background-color: var(--primary); | |
| color: white; | |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); | |
| } | |
| .container { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: 0.75rem 1rem; | |
| max-width: 100%; | |
| } | |
| .logo { | |
| font-weight: 600; | |
| font-size: 1.25rem; | |
| display: flex; | |
| align-items: center; | |
| } | |
| .logo-icon { | |
| margin-right: 0.5rem; | |
| } | |
| .actions { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| } | |
| .action-btn { | |
| background-color: rgba(255, 255, 255, 0.1); | |
| border-radius: 0.375rem; | |
| padding: 0.5rem; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| cursor: pointer; | |
| transition: background-color 0.2s; | |
| } | |
| .action-btn:hover { | |
| background-color: rgba(255, 255, 255, 0.2); | |
| } | |
| .dark-mode-toggle { | |
| background-color: transparent; | |
| border: none; | |
| color: inherit; | |
| cursor: pointer; | |
| } | |
| </style> | |
| <div class="container"> | |
| <div class="logo"> | |
| <i class="logo-icon" data-feather="message-square"></i> | |
| <span>ChatVerse</span> | |
| </div> | |
| <div class="actions"> | |
| <button class="action-btn" id="voice-btn" title="Voice Input"> | |
| <i data-feather="mic"></i> | |
| </button> | |
| <span id="voice-status" class="text-xs"></span> | |
| <button class="action-btn" id="screen-share-btn" title="Share Screen"> | |
| <i data-feather="monitor"></i> | |
| </button> | |
| <button class="dark-mode-toggle action-btn" id="dark-mode-toggle" title="Toggle Dark Mode"> | |
| <i data-feather="moon"></i> | |
| </button> | |