32 lines
1.7 KiB
PHP
32 lines
1.7 KiB
PHP
<div x-data="{ open: false }" class="relative hidden sm:flex sm:items-center sm:ms-6">
|
|
<button @click="open = !open" @click.away="open = false"
|
|
class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border rounded-md shadow-sm dark:text-gray-200 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none">
|
|
<span>{{ Auth::user()->name }}</span>
|
|
<svg class="w-4 h-4 ml-2" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
|
<path fill-rule="evenodd"
|
|
d="M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.25a.75.75 0 01-1.06 0L5.23 8.29a.75.75 0 01.02-1.08z"
|
|
clip-rule="evenodd" />
|
|
</svg>
|
|
</button>
|
|
|
|
<!-- Dropdown -->
|
|
<div x-show="open" x-cloak
|
|
class="absolute right-0 z-50 w-48 mt-2 origin-top-right bg-white border border-gray-200 rounded-lg shadow-lg dark:bg-gray-800 dark:border-gray-700">
|
|
<div class="py-1">
|
|
<a href="{{ route('profile.edit') }}"
|
|
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700">
|
|
{{ __('Profile') }}
|
|
</a>
|
|
|
|
<form method="POST" action="{{ route('logout') }}">
|
|
@csrf
|
|
<button type="submit"
|
|
class="block w-full px-4 py-2 text-sm text-left text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700"
|
|
onclick="event.preventDefault(); this.closest('form').submit();">
|
|
{{ __('Log Out') }}
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|