Skip to content

Commit 3cfa0d4

Browse files
committed
Revert "fix: move navigation to live view"
This reverts commit ec3edd9.
1 parent ec3edd9 commit 3cfa0d4

File tree

2 files changed

+41
-42
lines changed

2 files changed

+41
-42
lines changed
Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1 @@
1-
<nav class="z-10 sticky top-0 bg-white border-b border-gray-200 shadow-sm">
2-
<div class="max-w-7xl mx-auto px-4">
3-
<div class="relative flex items-center justify-between h-16">
4-
5-
<div class="flex-1 flex items-center sm:items-stretch sm:justify-start">
6-
7-
<div class="flex-shrink-0 flex items-center">
8-
<%= live_redirect to: Routes.home_index_path(@socket, :index), class: "flex-shrink-0 flex items-center" do %>
9-
<img class="block h-8 w-auto" src="/logo.svg" alt="Logo">
10-
<% end %>
11-
</div>
12-
</div>
13-
14-
<div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">
15-
16-
<%= live_redirect "Favourites", to: Routes.favourites_index_path(@socket, :index), class: "text-slate-600 block px-4 py-2 text-sm hover:text-slate-800 hover:underline" %>
17-
18-
<div class="ml-3 relative">
19-
<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">
20-
<span class="flex-shrink-0 inline-block relative">
21-
<span class="inline-block h-8 w-8 rounded-full overflow-hidden bg-gray-100">
22-
<svg class="h-full w-full text-gray-300" fill="currentColor" viewBox="0 0 24 24">
23-
<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" />
24-
</svg>
25-
</span>
26-
<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>
27-
</span>
28-
</button>
29-
30-
<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">
31-
<div class="py-1">
32-
<%= live_redirect "Settings", to: Routes.settings_index_path(@socket, :index), class: "text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100" %>
33-
<%= link "Log out", to: Routes.user_session_path(@socket, :delete), method: :delete, class: "text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100" %>
34-
</div>
35-
</div>
36-
</div>
37-
38-
</div>
39-
</div>
40-
</div>
41-
</nav>
42-
431
<%= @inner_content %>

lib/media_server_web/templates/layout/root.html.heex

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,47 @@
3030
</head>
3131
<body>
3232
<%= 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>
3374

3475
<%= @inner_content %>
3576
<% else %>

0 commit comments

Comments
 (0)