File size: 1,212 Bytes
b93a74d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
class CustomNavbar extends HTMLElement {
  connectedCallback() {
    this.attachShadow({ mode: 'open' });
    this.shadowRoot.innerHTML = `
      <style>
        nav {
          background: white;
          box-shadow: 0 1px 3px rgba(0,0,0,0.1);
          padding: 1rem 2rem;
          display: flex;
          justify-content: space-between;
          align-items: center;
        }
        .logo {
          font-weight: bold;
          font-size: 1.25rem;
          color: #3b82f6;
        }
        .logo span {
          color: #10b981;
        }
        .actions {
          display: flex;
          gap: 1rem;
        }
        button {
          padding: 0.5rem 1rem;
          border-radius: 0.375rem;
          font-weight: 500;
        }
        .primary {
          background: #3b82f6;
          color: white;
        }
        .secondary {
          border: 1px solid #e5e7eb;
        }
      </style>
      <nav>
        <div class="logo">Crew<span>Control</span></div>
        <div class="actions">
          <button class="secondary">Docs</button>
          <button class="primary">New Agent</button>
        </div>
      </nav>
    `;
  }
}
customElements.define('custom-navbar', CustomNavbar);