mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Enable navbar toggling
This commit is contained in:
parent
44ffb9976d
commit
2748394565
1 changed files with 34 additions and 123 deletions
|
|
@ -7,17 +7,15 @@
|
|||
<div class="-ml-2 mr-2 flex items-center md:hidden">
|
||||
<!-- Mobile menu button -->
|
||||
<button
|
||||
:aria-expanded="isOpen ? 'true' : 'false'"
|
||||
class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:bg-gray-700 focus:text-white transition duration-150 ease-in-out"
|
||||
aria-label="Main menu"
|
||||
aria-expanded="false">
|
||||
@click="isOpen = !isOpen"
|
||||
>
|
||||
<!-- Icon when menu is closed. -->
|
||||
<!--
|
||||
Heroicon name: menu
|
||||
|
||||
Menu open: "hidden", Menu closed: "block"
|
||||
-->
|
||||
<svg
|
||||
class="block h-6 w-6"
|
||||
v-if="!isOpen"
|
||||
class="h-6 w-6"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor">
|
||||
|
|
@ -28,13 +26,9 @@
|
|||
d="M4 6h16M4 12h16M4 18h16" />
|
||||
</svg>
|
||||
<!-- Icon when menu is open. -->
|
||||
<!--
|
||||
Heroicon name: x
|
||||
|
||||
Menu open: "block", Menu closed: "hidden"
|
||||
-->
|
||||
<svg
|
||||
class="hidden h-6 w-6"
|
||||
v-if="isOpen"
|
||||
class="h-6 w-6"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor">
|
||||
|
|
@ -66,8 +60,9 @@
|
|||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0">
|
||||
<span class="rounded-md shadow-sm">
|
||||
<button
|
||||
type="button"
|
||||
<a
|
||||
role="button"
|
||||
href="https://github.com/ThatGuySam/doesitarm/issues"
|
||||
class="relative inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-md text-white bg-indigo-500 hover:bg-indigo-400 focus:outline-none focus:shadow-outline-indigo focus:border-indigo-600 active:bg-indigo-600 transition duration-150 ease-in-out">
|
||||
<!-- Heroicon name: plus -->
|
||||
<svg
|
||||
|
|
@ -79,74 +74,10 @@
|
|||
d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
<span>New Job</span>
|
||||
</button>
|
||||
<span>Submit App</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="hidden md:ml-4 md:flex-shrink-0 md:flex md:items-center">
|
||||
<button
|
||||
class="p-1 border-2 border-transparent text-gray-400 rounded-full hover:text-gray-300 focus:outline-none focus:text-gray-500 focus:bg-gray-100 transition duration-150 ease-in-out"
|
||||
aria-label="Notifications">
|
||||
<!-- Heroicon name: bell -->
|
||||
<svg
|
||||
class="h-6 w-6"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor">
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
<!-- Profile dropdown -->
|
||||
<div class="ml-3 relative">
|
||||
<div>
|
||||
<button
|
||||
id="user-menu"
|
||||
class="flex text-sm border-2 border-transparent rounded-full focus:outline-none focus:border-gray-300 transition duration-150 ease-in-out"
|
||||
aria-label="User menu"
|
||||
aria-haspopup="true">
|
||||
<img
|
||||
class="h-8 w-8 rounded-full"
|
||||
src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
|
||||
alt="">
|
||||
</button>
|
||||
</div>
|
||||
<!--
|
||||
Profile dropdown panel, show/hide based on dropdown state.
|
||||
|
||||
Entering: "transition ease-out duration-200"
|
||||
From: "transform opacity-0 scale-95"
|
||||
To: "transform opacity-100 scale-100"
|
||||
Leaving: "transition ease-in duration-75"
|
||||
From: "transform opacity-100 scale-100"
|
||||
To: "transform opacity-0 scale-95"
|
||||
-->
|
||||
<div class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg">
|
||||
<div
|
||||
class="py-1 rounded-md bg-white shadow-xs"
|
||||
role="menu"
|
||||
aria-orientation="vertical"
|
||||
aria-labelledby="user-menu">
|
||||
<a
|
||||
href="#"
|
||||
class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out"
|
||||
role="menuitem">Your Profile</a>
|
||||
<a
|
||||
href="#"
|
||||
class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out"
|
||||
role="menuitem">Settings</a>
|
||||
<a
|
||||
href="#"
|
||||
class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out"
|
||||
role="menuitem">Sign out</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -155,51 +86,26 @@
|
|||
|
||||
Menu open: "block", Menu closed: "hidden"
|
||||
-->
|
||||
<div class="hidden md:hidden">
|
||||
<div
|
||||
:class="[
|
||||
'md:hidden',
|
||||
isOpen ? 'block' : 'hidden'
|
||||
]"
|
||||
>
|
||||
<div class="px-2 pt-2 pb-3 sm:px-3">
|
||||
<a
|
||||
href="#"
|
||||
class="block px-3 py-2 rounded-md text-base font-medium text-white bg-gray-900 focus:outline-none focus:text-white focus:bg-gray-700 transition duration-150 ease-in-out"
|
||||
>Dashboard</a>
|
||||
<a
|
||||
href="#"
|
||||
class="mt-1 block px-3 py-2 rounded-md text-base font-medium text-gray-300 hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700 transition duration-150 ease-in-out">Team</a>
|
||||
<a
|
||||
href="#"
|
||||
class="mt-1 block px-3 py-2 rounded-md text-base font-medium text-gray-300 hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700 transition duration-150 ease-in-out">Projects</a>
|
||||
<a
|
||||
href="#"
|
||||
class="mt-1 block px-3 py-2 rounded-md text-base font-medium text-gray-300 hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700 transition duration-150 ease-in-out">Calendar</a>
|
||||
</div>
|
||||
<div class="pt-4 pb-3 border-t border-gray-700">
|
||||
<div class="flex items-center px-5 sm:px-6">
|
||||
<div class="flex-shrink-0">
|
||||
<img
|
||||
class="h-10 w-10 rounded-full"
|
||||
src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
|
||||
alt=""
|
||||
>
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<div class="text-base font-medium leading-6 text-white">Tom Cook</div>
|
||||
<div class="text-sm font-medium leading-5 text-gray-400">tom@example.com</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3 px-2 sm:px-3">
|
||||
<a
|
||||
href="#"
|
||||
class="block px-3 py-2 rounded-md text-base font-medium text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700 transition duration-150 ease-in-out"
|
||||
>Your Profile</a>
|
||||
<a
|
||||
href="#"
|
||||
class="mt-1 block px-3 py-2 rounded-md text-base font-medium text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700 transition duration-150 ease-in-out"
|
||||
>Settings</a>
|
||||
<a
|
||||
href="#"
|
||||
class="mt-1 block px-3 py-2 rounded-md text-base font-medium text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700 transition duration-150 ease-in-out"
|
||||
>Sign out</a>
|
||||
</div>
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
:href="item.url"
|
||||
:class="[
|
||||
'mt-1 block px-3 py-2 rounded-md text-base font-medium text-gray-300 hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700 transition duration-150 ease-in-out',
|
||||
($nuxt.$route.path === item.url) ? 'text-white bg-gray-900 hover:text-white' : 'text-gray-300 hover:bg-gray-700'
|
||||
]"
|
||||
>
|
||||
{{ item.label }}
|
||||
</a>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
|
@ -226,6 +132,11 @@ export default {
|
|||
// },
|
||||
])
|
||||
}
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
isOpen: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue