File size: 1,861 Bytes
fa5264e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class CustomNavbar extends HTMLElement {
    connectedCallback() {
        this.attachShadow({ mode: 'open' });
        this.shadowRoot.innerHTML = `
            <style>
                nav {
                    background-color: #ffffff;
                    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
                    padding: 1rem;
                }
                .container {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    max-width: 1200px;
                    margin: 0 auto;
                }
                .logo {
                    font-weight: bold;
                    font-size: 1.25rem;
                    color: #1e40af;
                }
                .nav-links {
                    display: flex;
                    gap: 1.5rem;
                }
                .nav-link {
                    color: #4b5563;
                    text-decoration: none;
                    font-weight: 500;
                }
                .nav-link:hover {
                    color: #1e40af;
                }
                @media (max-width: 640px) {
                    .nav-links {
                        gap: 1rem;
                    }
                }
            </style>
            <nav>
                <div class="container">
                    <div class="logo">TouchTask</div>
                    <div class="nav-links">
                        <a href="#" class="nav-link"><i data-feather="home"></i></a>
                        <a href="#" class="nav-link"><i data-feather="calendar"></i></a>
                        <a href="#" class="nav-link"><i data-feather="settings"></i></a>
                    </div>
                </div>
            </nav>
        `;
    }
}

customElements.define('custom-navbar', CustomNavbar);