File size: 4,100 Bytes
82aef84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
decb1ad
82aef84
 
decb1ad
82aef84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
class CustomNavbar extends HTMLElement {
    connectedCallback() {
        this.attachShadow({ mode: 'open' });
        this.shadowRoot.innerHTML = `
            <style>
                nav {
                    background-color: white;
                    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
                }
                
                .nav-link {
                    position: relative;
                }
                
                .nav-link::after {
                    content: '';
                    position: absolute;
                    bottom: -4px;
                    left: 0;
                    width: 0;
                    height: 2px;
                    background-color: #d946ef;
                    transition: width 0.3s ease;
                }
                
                .nav-link:hover::after {
                    width: 100%;
                }
                
                .mobile-menu {
                    max-height: 0;
                    overflow: hidden;
                    transition: max-height 0.3s ease-out;
                }
                
                .mobile-menu.open {
                    max-height: 500px;
                }
            </style>
            <nav class="sticky top-0 z-50">
                <div class="container mx-auto px-4 py-4">
                    <div class="flex justify-between items-center">
                        <a href="#" class="text-2xl font-bold text-gray-800">
                            <span class="text-fuchsia-600">Umesh</span> Shelare
                        </a>
                        
                        <!-- Desktop Navigation -->
                        <div class="hidden md:flex items-center space-x-8">
                            <a href="#about" class="nav-link text-gray-600 hover:text-gray-900">About</a>
                            <a href="#system-design" class="nav-link text-gray-600 hover:text-gray-900">System Design</a>
                            <a href="#projects" class="nav-link text-gray-600 hover:text-gray-900">Projects</a>
                            <a href="#contact" class="nav-link text-gray-600 hover:text-gray-900">Contact</a>
<a href="#" class="px-4 py-2 bg-fuchsia-600 text-white rounded-lg hover:bg-fuchsia-700 transition-colors">Resume</a>
                        </div>
                        
                        <!-- Mobile menu button -->
                        <button class="md:hidden focus:outline-none" id="mobile-menu-button">
                            <i data-feather="menu" class="text-gray-800"></i>
                        </button>
                    </div>
                    
                    <!-- Mobile Navigation -->
                    <div class="mobile-menu md:hidden" id="mobile-menu">
                        <div class="pt-4 pb-2 space-y-2">
                            <a href="#about" class="block px-3 py-2 rounded-md text-gray-600 hover:bg-fuchsia-50">About</a>
                            <a href="#projects" class="block px-3 py-2 rounded-md text-gray-600 hover:bg-fuchsia-50">Projects</a>
                            <a href="#contact" class="block px-3 py-2 rounded-md text-gray-600 hover:bg-fuchsia-50">Contact</a>
                            <a href="#" class="block px-3 py-2 text-center bg-fuchsia-600 text-white rounded-lg hover:bg-fuchsia-700">Resume</a>
                        </div>
                    </div>
                </div>
            </nav>
            <script>
                feather.replace();
                
                document.getElementById('mobile-menu-button').addEventListener('click', function() {
                    const menu = document.getElementById('mobile-menu');
                    menu.classList.toggle('open');
                    this.innerHTML = menu.classList.contains('open') 
                        ? '<i data-feather="x"></i>' 
                        : '<i data-feather="menu"></i>';
                    feather.replace();
                });
            </script>
        `;
    }
}

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