File size: 3,357 Bytes
03ffd7c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class CustomSidebar extends HTMLElement {
    connectedCallback() {
        this.attachShadow({ mode: 'open' });
        this.shadowRoot.innerHTML = `
            <style>
                .nav-link {
                    transition: all 0.2s ease;
                    padding: 0.75rem 1.5rem;
                }
                .nav-link:hover {
                    background-color: rgba(14, 165, 233, 0.15) !important;
                    color: white !important;
                }
                .nav-link.active {
                    background-color: rgba(14, 165, 233, 0.25) !important;
                    border-left-color: rgb(14, 165, 233);
                    color: white !important;
                }
                i {
                    width: 20px;
                    text-align: center;
                }
</style>
            <aside class="bg-gray-800 rounded-lg p-4 h-full">
                <nav class="space-y-1">
                    <a href="#" class="nav-link active flex items-center px-4 py-3 text-sm font-medium rounded-md border-l-4 border-primary-500">
                        <i data-feather="home" class="mr-3 text-primary-500"></i>
                        Dashboard
                    </a>
                    
                    <a href="#" class="nav-link flex items-center px-4 py-3 text-sm font-medium rounded-md border-l-4 border-transparent text-gray-300 hover:text-white">
                        <i data-feather="users" class="mr-3"></i>
                        Clients
                    </a>
                    
                    <a href="#" class="nav-link flex items-center px-4 py-3 text-sm font-medium rounded-md border-l-4 border-transparent text-gray-300 hover:text-white">
                        <i data-feather="briefcase" class="mr-3"></i>
                        Projects
                    </a>
                    
                    <a href="#" class="nav-link flex items-center px-4 py-3 text-sm font-medium rounded-md border-l-4 border-transparent text-gray-300 hover:text-white">
                        <i data-feather="calendar" class="mr-3"></i>
                        Calendar
                    </a>
                    
                    <a href="#" class="nav-link flex items-center px-4 py-3 text-sm font-medium rounded-md border-l-4 border-transparent text-gray-300 hover:text-white">
                        <i data-feather="file-text" class="mr-3"></i>
                        Invoices
                    </a>
                    
                    <a href="#" class="nav-link flex items-center px-4 py-3 text-sm font-medium rounded-md border-l-4 border-transparent text-gray-300 hover:text-white">
                        <i data-feather="bar-chart-2" class="mr-3"></i>
                        Analytics
                    </a>
                    
                    <div class="pt-4 border-t border-gray-700">
                        <a href="#" class="nav-link flex items-center px-4 py-3 text-sm font-medium rounded-md border-l-4 border-transparent text-gray-300 hover:text-white">
                            <i data-feather="settings" class="mr-3"></i>
                            Settings
                        </a>
                    </div>
                </nav>
            </aside>
        `;
    }
}

customElements.define('custom-sidebar', CustomSidebar);