|
30 | 30 | </head> |
31 | 31 | <body> |
32 | 32 | <%= if @current_user do %> |
| 33 | + <nav class="z-10 sticky top-0 bg-white border-b border-gray-200 shadow-sm"> |
| 34 | + <div class="max-w-7xl mx-auto px-4"> |
| 35 | + <div class="relative flex items-center justify-between h-16"> |
| 36 | + |
| 37 | + <div class="flex-1 flex items-center sm:items-stretch sm:justify-start"> |
| 38 | + |
| 39 | + <div class="flex-shrink-0 flex items-center"> |
| 40 | + <%= link to: Routes.home_index_path(@conn, :index), class: "flex-shrink-0 flex items-center" do %> |
| 41 | + <img class="block h-8 w-auto" src="/logo.svg" alt="Logo"> |
| 42 | + <% end %> |
| 43 | + </div> |
| 44 | + </div> |
| 45 | + |
| 46 | + <div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0"> |
| 47 | + |
| 48 | + <%= link "Favourites", to: Routes.favourites_index_path(@conn, :index), class: "text-slate-600 block px-4 py-2 text-sm hover:text-slate-800 hover:underline" %> |
| 49 | + |
| 50 | + <div class="ml-3 relative"> |
| 51 | + <button phx-click={JS.toggle(to: "#profile-dropdown")} phx-click-away={JS.hide(to: "#profile-dropdown")} type="button" class="bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-slate-500"> |
| 52 | + <span class="flex-shrink-0 inline-block relative"> |
| 53 | + <span class="inline-block h-8 w-8 rounded-full overflow-hidden bg-gray-100"> |
| 54 | + <svg class="h-full w-full text-gray-300" fill="currentColor" viewBox="0 0 24 24"> |
| 55 | + <path d="M24 20.993V24H0v-2.996A14.977 14.977 0 0112.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 11-8 0 4 4 0 018 0z" /> |
| 56 | + </svg> |
| 57 | + </span> |
| 58 | + <span class="bg-green-400 absolute top-0 right-0 block h-2.5 w-2.5 rounded-full ring-2 ring-white" aria-hidden="true"></span> |
| 59 | + </span> |
| 60 | + </button> |
| 61 | + |
| 62 | + <div id="profile-dropdown" class="hidden origin-top-right absolute right-0 mt-2 w-36 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"> |
| 63 | + <div class="py-1"> |
| 64 | + <%= link "Settings", to: Routes.settings_index_path(@conn, :index), class: "text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100" %> |
| 65 | + <%= link "Log out", to: Routes.user_session_path(@conn, :delete), method: :delete, class: "text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100" %> |
| 66 | + </div> |
| 67 | + </div> |
| 68 | + </div> |
| 69 | + |
| 70 | + </div> |
| 71 | + </div> |
| 72 | + </div> |
| 73 | + </nav> |
33 | 74 |
|
34 | 75 | <%= @inner_content %> |
35 | 76 | <% else %> |
|
0 commit comments