File size: 1,365 Bytes
6bdd29e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class AdminNavbar extends HTMLElement {
  connectedCallback() {
    this.attachShadow({ mode: 'open' });
    this.shadowRoot.innerHTML = `
      <style>
        nav {
          background: #4f46e5;
          color: white;
          padding: 1rem 2rem;
          display: flex;
          justify-content: space-between;
          align-items: center;
          box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .logo {
          font-weight: bold;
          font-size: 1.5rem;
        }
        ul {
          display: flex;
          gap: 2rem;
          list-style: none;
        }
        a {
          color: white;
          text-decoration: none;
          font-weight: 500;
          transition: all 0.3s ease;
        }
        a:hover {
          opacity: 0.8;
        }
        .active {
          border-bottom: 2px solid white;
        }
      </style>
      <nav>
        <div class="logo">LunchBox Commander</div>
        <ul>
          <li><a href="/admin/dashboard.html" class="active">Dashboard</a></li>
          <li><a href="/admin/orders.html">Orders</a></li>
          <li><a href="/admin/products.html">Products</a></li>
          <li><a href="/admin/reports.html">Reports</a></li>
          <li><a href="/admin/settings.html">Settings</a></li>
        </ul>
      </nav>
    `;
  }
}
customElements.define('admin-navbar', AdminNavbar);