1+ ---
2+ import logotype from " ../assets/logotype.svg?url" ;
3+ ---
4+
5+ <style >
6+ .header-gradient {
7+ background: transparent;
8+ }
9+
10+ .nav-pill {
11+ background: rgba(255, 255, 255, 0.12);
12+ color: white;
13+ padding: 12px 28px;
14+ border-radius: 9999px;
15+ font-weight: 500;
16+ text-decoration: none;
17+ transition: all 0.3s ease;
18+ display: inline-flex;
19+ align-items: center;
20+ }
21+
22+ .nav-pill:hover {
23+ background: rgba(255, 255, 255, 0.2);
24+ transform: translateY(-2px);
25+ }
26+
27+ .nav-pill-solid {
28+ background: white;
29+ color: black;
30+ padding: 12px 28px;
31+ border-radius: 9999px;
32+ font-weight: 600;
33+ text-decoration: none;
34+ transition: all 0.3s ease;
35+ display: inline-flex;
36+ align-items: center;
37+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
38+ }
39+
40+ .nav-pill-solid:hover {
41+ transform: translateY(-2px);
42+ box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
43+ }
44+
45+ .mobile-menu {
46+ transform: translateX(-100%);
47+ transition: transform 0.3s ease;
48+ }
49+
50+ .mobile-menu.open {
51+ transform: translateX(0);
52+ }
53+
54+ .hamburger {
55+ display: none;
56+ flex-direction: column;
57+ cursor: pointer;
58+ padding: 4px;
59+ }
60+
61+ @media (max-width: 767px) {
62+ .hamburger {
63+ display: flex;
64+ }
65+ }
66+
67+ .hamburger span {
68+ width: 25px;
69+ height: 3px;
70+ background: white;
71+ margin: 3px 0;
72+ transition: 0.3s;
73+ }
74+
75+ .hamburger.open span:nth-child(1) {
76+ transform: rotate(-45deg) translate(-5px, 6px);
77+ }
78+
79+ .hamburger.open span:nth-child(2) {
80+ opacity: 0;
81+ }
82+
83+ .hamburger.open span:nth-child(3) {
84+ transform: rotate(45deg) translate(-5px, -6px);
85+ }
86+ </style >
87+
88+ <header class =" header-gradient fixed top-0 left-0 right-0 z-50 px-4 py-4" >
89+ <div class =" max-w-7xl mx-auto flex items-center justify-between" >
90+ <!-- Logo -->
91+ <div class =" flex items-center" >
92+ <img
93+ src ={ logotype }
94+ alt =" Stupido Hackettino"
95+ class =" h-8 w-auto"
96+ />
97+ </div >
98+
99+ <!-- Desktop Navigation -->
100+ <div class =" hidden md:flex items-center ml-auto" >
101+ <a href =" #about" class =" nav-pill mr-3" >
102+ About
103+ </a >
104+ <a href =" #agenda" class =" nav-pill mr-3" >
105+ Agenda
106+ </a >
107+ <a href =" #venue" class =" nav-pill mr-3" >
108+ Venue
109+ </a >
110+ <a href =" #sponsor" class =" nav-pill mr-3" >
111+ Sponsor
112+ </a >
113+ <a href =" #schedule" class =" nav-pill mr-5" >
114+ Schedule
115+ </a >
116+ <a href =" #sponsor" class =" nav-pill-solid" >
117+ <span >Sponsor</span >
118+ <div class =" ml-2 w-6 h-6 bg-blue-600 rounded-full flex items-center justify-center" >
119+ <svg class =" w-3 h-3 text-white transform rotate-45" fill =" none" stroke =" currentColor" viewBox =" 0 0 24 24" >
120+ <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M13 7l5 5m0 0l-5 5m5-5H6" ></path >
121+ </svg >
122+ </div >
123+ </a >
124+ </div >
125+
126+ <!-- Mobile Menu Button -->
127+ <button
128+ id =" mobile-menu-button"
129+ class =" hamburger md:hidden"
130+ aria-label =" Toggle menu"
131+ >
132+ <span ></span >
133+ <span ></span >
134+ <span ></span >
135+ </button >
136+ </div >
137+
138+ <!-- Mobile Navigation -->
139+ <div id =" mobile-menu" class =" mobile-menu md:hidden fixed inset-y-0 left-0 w-80 bg-gray-900 bg-opacity-95 backdrop-blur-sm z-40" >
140+ <div class =" flex flex-col h-full" >
141+ <div class =" flex items-center justify-between p-4 border-b border-gray-700" >
142+ <img
143+ src ={ logotype }
144+ alt =" Stupido Hackettino"
145+ class =" h-8 w-auto"
146+ />
147+ <button
148+ id =" mobile-menu-close"
149+ class =" text-white text-2xl"
150+ aria-label =" Close menu"
151+ >
152+ ×
153+ </button >
154+ </div >
155+
156+ <nav class =" flex-1 px-4 py-6" >
157+ <div class =" space-y-6" >
158+ <a href =" #about" class =" mobile-nav-link block text-white text-lg font-medium hover:text-gray-300" >
159+ About
160+ </a >
161+ <a href =" #agenda" class =" mobile-nav-link block text-white text-lg font-medium hover:text-gray-300" >
162+ Agenda
163+ </a >
164+ <a href =" #venue" class =" mobile-nav-link block text-white text-lg font-medium hover:text-gray-300" >
165+ Venue
166+ </a >
167+ <a href =" #sponsor" class =" mobile-nav-link block text-white text-lg font-medium hover:text-gray-300" >
168+ Sponsor
169+ </a >
170+ <a href =" #schedule" class =" mobile-nav-link block text-white text-lg font-medium hover:text-gray-300" >
171+ Schedule
172+ </a >
173+ </div >
174+
175+ <div class =" mt-8" >
176+ <a
177+ href =" #sponsor"
178+ class =" sponsor-button inline-flex items-center w-full justify-center px-6 py-3 rounded-full text-white font-semibold shadow-lg"
179+ >
180+ <span >Sponsor</span >
181+ <svg class =" ml-2 w-4 h-4" fill =" none" stroke =" currentColor" viewBox =" 0 0 24 24" >
182+ <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M13 7l5 5m0 0l-5 5m5-5H6" ></path >
183+ </svg >
184+ </a >
185+ </div >
186+ </nav >
187+ </div >
188+ </div >
189+ </header >
190+
191+ <script >
192+ // Mobile menu functionality
193+ document.addEventListener('DOMContentLoaded', () => {
194+ const mobileMenuButton = document.getElementById('mobile-menu-button');
195+ const mobileMenu = document.getElementById('mobile-menu');
196+ const mobileMenuClose = document.getElementById('mobile-menu-close');
197+ const mobileNavLinks = document.querySelectorAll('.mobile-nav-link');
198+
199+ function toggleMobileMenu() {
200+ mobileMenu?.classList.toggle('open');
201+ mobileMenuButton?.classList.toggle('open');
202+ }
203+
204+ function closeMobileMenu() {
205+ mobileMenu?.classList.remove('open');
206+ mobileMenuButton?.classList.remove('open');
207+ }
208+
209+ mobileMenuButton?.addEventListener('click', toggleMobileMenu);
210+ mobileMenuClose?.addEventListener('click', closeMobileMenu);
211+
212+ // Close menu when clicking on nav links
213+ mobileNavLinks.forEach(link => {
214+ link.addEventListener('click', closeMobileMenu);
215+ });
216+
217+ // Close menu when clicking outside
218+ document.addEventListener('click', (e) => {
219+ const isClickInsideMenu = mobileMenu?.contains(e.target as Node);
220+ const isClickOnMenuButton = mobileMenuButton?.contains(e.target as Node);
221+
222+ if (!isClickInsideMenu && !isClickOnMenuButton && mobileMenu?.classList.contains('open')) {
223+ closeMobileMenu();
224+ }
225+ });
226+
227+ // Smooth scrolling for navigation links
228+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
229+ anchor.addEventListener('click', function (e) {
230+ e.preventDefault();
231+ const target = document.querySelector(this.getAttribute('href') as string);
232+ if (target) {
233+ target.scrollIntoView({
234+ behavior: 'smooth',
235+ block: 'start'
236+ });
237+ }
238+ });
239+ });
240+ });
241+ </script >
0 commit comments