| class CustomNavbar extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| width: 100%; | |
| } | |
| nav { | |
| background-color: white; | |
| box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); | |
| } | |
| .nav-container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 1rem; | |
| } | |
| .nav-logo { | |
| font-weight: 700; | |
| font-size: 1.25rem; | |
| color: #1f2937; | |
| } | |
| .nav-link { | |
| color: #4b5563; | |
| transition: color 0.2s; | |
| } | |
| .nav-link:hover { | |
| color: #3b82f6; | |
| } | |
| @media (max-width: 768px) { | |
| .nav-links { | |
| display: none; | |
| } | |
| .mobile-menu-button { | |
| display: block; | |
| } | |
| } | |
| </style> | |
| <nav> | |
| <div class="nav-container flex justify-between items-center px-4 py-3"> | |
| <a href="/" class="nav-logo flex items-center"> | |
| <i data-feather="code" class="w-5 h-5 mr-2"></i> | |
| Code Canvas | |
| </a> | |
| <div class="nav-links space-x-6 hidden md:flex"> | |
| <a href="#" class="nav-link">Features</a> | |
| <a href="#" class="nav-link">Templates</a> | |
| <a href="#" class="nav-link">Docs</a> | |
| <a href="#" class="nav-link">Pricing</a> | |
| </div> | |
| <div class="hidden md:flex space-x-4"> | |
| <a href="#" class="px-4 py-2 rounded-lg text-gray-600 hover:text-gray-800">Sign In</a> | |
| <a href="#" class="px-4 py- |