File size: 1,930 Bytes
b9c61c0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
class CustomNavbar extends HTMLElement {
  connectedCallback() {
    this.attachShadow({ mode: 'open' });
    this.shadowRoot.innerHTML = `
      <style>
        nav {
          background: white;
          padding: 1rem 2rem;
          display: flex;
          justify-content: space-between;
          align-items: center;
          box-shadow: 0 1px 3px rgba(0,0,0,0.1);
          position: relative;
          z-index: 10;
        }
        .logo {
          color: #111827;
          font-weight: 700;
          font-size: 1.25rem;
          display: flex;
          align-items: center;
          gap: 0.5rem;
        }
        .logo-icon {
          color: #6366f1;
        }
        ul {
          display: flex;
          gap: 1.5rem;
          list-style: none;
          margin: 0;
          padding: 0;
        }
        a {
          color: #4b5563;
          text-decoration: none;
          font-weight: 500;
          transition: color 0.2s;
          display: flex;
          align-items: center;
          gap: 0.375rem;
        }
        a:hover {
          color: #6366f1;
        }
        .nav-icon {
          width: 18px;
          height: 18px;
        }
        @media (max-width: 640px) {
          nav {
            padding: 1rem;
            flex-direction: column;
            gap: 1rem;
          }
          ul {
            gap: 1rem;
          }
        }
      </style>
      <nav>
        <a href="/" class="logo">
          <i data-feather="ghost" class="logo-icon"></i>
          GhostSurf
        </a>
        <ul>
          <li><a href="/"><i data-feather="home" class="nav-icon"></i> Home</a></li>
          <li><a href="/about.html"><i data-feather="info" class="nav-icon"></i> About</a></li>
          <li><a href="/privacy.html"><i data-feather="shield" class="nav-icon"></i> Privacy</a></li>
        </ul>
      </nav>
    `;
  }
}
customElements.define('custom-navbar', CustomNavbar);