|
5 | 5 | <!-- Mobile menu button--> |
6 | 6 | <button |
7 | 7 | type="button" |
8 | | - class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-brand-black-400 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white" |
| 8 | + class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-brand-black-400 focus:outline-none" |
9 | 9 | aria-controls="mobile-menu" |
10 | 10 | aria-expanded="false" |
| 11 | + @click="toggleCollapse" |
11 | 12 | > |
12 | 13 | <span class="sr-only">Open main menu</span> |
13 | 14 | <!-- |
14 | 15 | Icon when menu is closed. |
15 | | -
|
16 | 16 | Heroicon name: outline/menu |
17 | | -
|
18 | | - Menu open: "hidden", Menu closed: "block" |
19 | 17 | --> |
20 | 18 | <svg |
| 19 | + ref="menuClosedIcon" |
21 | 20 | class="block h-6 w-6" |
22 | 21 | xmlns="http://www.w3.org/2000/svg" |
23 | 22 | fill="none" |
|
34 | 33 | </svg> |
35 | 34 | <!-- |
36 | 35 | Icon when menu is open. |
37 | | -
|
38 | 36 | Heroicon name: outline/x |
39 | | -
|
40 | | - Menu open: "block", Menu closed: "hidden" |
41 | 37 | --> |
42 | 38 | <svg |
| 39 | + ref="menuOpenIcon" |
43 | 40 | class="hidden h-6 w-6" |
44 | 41 | xmlns="http://www.w3.org/2000/svg" |
45 | 42 | fill="none" |
|
113 | 110 | </div> |
114 | 111 | </div> |
115 | 112 | <div |
116 | | - class="absolute inset-y-0 right-0 flex items-center sm:static sm:inset-auto pr-2 sm:pr-0" |
| 113 | + class="absolute inset-y-0 right-0 flex items-center sm:static sm:inset-auto" |
117 | 114 | > |
118 | 115 | <router-link |
119 | 116 | :to="{ name: 'EventsCreate' }" |
120 | | - class="flex items-center px-3 py-2 rounded-md ring-2 ring-brand-blue bg-brand-black-900 hover:bg-brand-black text-gray-300 hover:text-white" |
| 117 | + class="flex items-center px-2 sm:px-3 py-2 rounded-md sm:ring-2 sm:ring-brand-blue bg-brand-black sm:hover:bg-brand-blue text-gray-300 hover:text-white" |
121 | 118 | > |
122 | 119 | <svg |
123 | 120 | class="h-6 w-6 mr-1" |
|
134 | 131 | d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" |
135 | 132 | /> |
136 | 133 | </svg> |
137 | | - <span class="pl-1 pr-0.5 text-sm md:text-base">Add an event</span> |
| 134 | + <span class="pl-1 pr-0.5 hidden sm:block text-sm md:text-base" |
| 135 | + >Add an event</span |
| 136 | + > |
138 | 137 | </router-link> |
139 | 138 |
|
140 | 139 | <!-- Profile dropdown --> |
|
197 | 196 | </div> |
198 | 197 |
|
199 | 198 | <!-- Mobile menu, show/hide based on menu state. --> |
200 | | - <div class="sm:hidden" id="mobile-menu"> |
| 199 | + <div ref="mobileMenu" class="hidden sm:hidden"> |
201 | 200 | <div class="px-2 pt-2 pb-3 space-y-1"> |
202 | | - <!-- |
203 | | - Current: "bg-gray-800 text-white" |
204 | | - Default: "text-gray-300 hover:bg-brand-black-400 hover:text-white" |
205 | | - --> |
206 | 201 | <router-link |
207 | 202 | :to="{ name: 'Events' }" |
| 203 | + @click="$router.push({ name: 'Events' }); toggleCollapse()" |
208 | 204 | class="text-gray-300 hover:bg-brand-black-400 hover:text-white block px-3 py-2 rounded-md text-base font-medium" |
209 | 205 | >Events</router-link |
210 | 206 | > |
211 | 207 | <router-link |
212 | 208 | :to="{ name: 'Spaces' }" |
| 209 | + @click="$router.push({ name: 'Spaces' }); toggleCollapse()" |
213 | 210 | class="text-gray-300 hover:bg-brand-black-400 hover:text-white block px-3 py-2 rounded-md text-base font-medium" |
214 | 211 | >Spaces</router-link |
215 | 212 | > |
216 | 213 | <router-link |
217 | 214 | :to="{ name: 'Heroes' }" |
| 215 | + @click="$router.push({ name: 'Heroes' }); toggleCollapse()" |
218 | 216 | class="text-gray-300 hover:bg-brand-black-400 hover:text-white block px-3 py-2 rounded-md text-base font-medium" |
219 | 217 | >Heroes</router-link |
220 | 218 | > |
|
0 commit comments