| class TestHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| width: 100%; | |
| background-color: white; | |
| box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); | |
| } | |
| .header-container { | |
| max-width: 1400px; | |
| margin: 0 auto; | |
| padding: 1rem 2rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .logo { | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| color: #3b82f6; | |
| display: flex; | |
| align-items: center; | |
| } | |
| .logo-icon { | |
| margin-right: 0.5rem; | |
| } | |
| .nav-links { | |
| display: flex; | |
| gap: 1.5rem; | |
| } | |
| .nav-link { | |
| color: #64748b; | |
| font-weight: 500; | |
| transition: color 0.2s; | |
| } | |
| .nav-link:hover { | |
| color: #3b82f6; | |
| } | |
| .user-menu { | |
| display: flex; | |
| align-items: center; | |
| gap: 1rem; | |
| } | |
| .avatar { | |
| width: 40px; | |
| height: 40px; | |
| border-radius: 50%; | |
| background-color: #e2e8f0; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: #64748b; | |
| font-weight: 600; | |
| } | |
| @media (max-width: 768px) { | |
| .nav-links { | |
| display: none; | |
| } | |
| .mobile-menu-button { | |
| display: block; | |
| } | |
| } | |
| </style> | |
| <div class="header-container"> | |
| <a href="/" class="logo"> | |
| <i data-feather="grid" class="logo-icon"></i> | |
| Jira-like Test Management | |
| </a> | |
| <div class="nav-links"> | |
| <a href="#" class="nav-link">Dashboard</a> | |
| <a href="#" class="nav-link">Test Cases</a> | |
| <a href="#" class="nav-link">Test Runs</a> | |
| <a href="#" class="nav-link">Reports</a> | |
| <a href="#" class="nav-link">Settings</a> | |
| </div> | |
| <div class="user-menu"> | |
| <div class="avatar">JD</div> | |
| </div> | |
| </div> | |
| `; | |
| } | |
| } | |
| customElements.define('test-header', TestHeader); |