gettext topbar
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
<header class="mb-4 px-8 py-4 w-full bg-primary-400">
|
||||
<%= render("topbar.html", assigns) %>
|
||||
</header>
|
||||
|
||||
<div class="mx-8 my-2 flex flex-col space-y-4 text-center">
|
||||
<%= if get_flash(@conn, :info) do %>
|
||||
<p class="alert alert-info" role="alert">
|
||||
@ -14,5 +15,6 @@
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= @inner_content %>
|
||||
</main>
|
||||
|
@ -15,6 +15,7 @@
|
||||
>
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="m-0 p-0 w-full h-full">
|
||||
<%= @inner_content %>
|
||||
</body>
|
||||
|
@ -1,34 +1,42 @@
|
||||
<nav role="navigation">
|
||||
<div class="flex flex-row justify-between items-center space-x-4 overflow-x-hidden">
|
||||
<%= link to: Routes.live_path(CanneryWeb.Endpoint, HomeLive) do %>
|
||||
<h1 class="leading-5 text-xl text-white hover:underline">Cannery</h1>
|
||||
<h1 class="leading-5 text-xl text-white hover:underline">
|
||||
Cannery
|
||||
</h1>
|
||||
<% end %>
|
||||
|
||||
<ul class="flex flex-col sm:flex-row flex-wrap justify-center items-center
|
||||
space-x-4 text-lg text-white text-ellipsis">
|
||||
<%# user settings %>
|
||||
<%= if assigns |> Map.has_key?(:current_user) && @current_user do %>
|
||||
<li>
|
||||
<%= link @current_user.email, class: "hover:underline",
|
||||
to: Routes.user_settings_path(CanneryWeb.Endpoint, :edit) %>
|
||||
<%= link(@current_user.email,
|
||||
class: "hover:underline",
|
||||
to: Routes.user_settings_path(CanneryWeb.Endpoint, :edit)
|
||||
) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link to: Routes.user_session_path(CanneryWeb.Endpoint, :delete), method: :delete,
|
||||
data: [confirm: "Are you sure you want to log out?"] do %>
|
||||
<%= link to: Routes.user_session_path(CanneryWeb.Endpoint, :delete),
|
||||
method: :delete,
|
||||
data: [confirm: dgettext("prompts", "Are you sure you want to log out?")] do %>
|
||||
<i class="fas fa-sign-out-alt"></i>
|
||||
<% end %>
|
||||
</li>
|
||||
<% else %>
|
||||
<%= if Accounts.allow_registration?() do %>
|
||||
<li>
|
||||
<%= link "Register", class: "hover:underline",
|
||||
to: Routes.user_registration_path(CanneryWeb.Endpoint, :new) %>
|
||||
<%= link(dgettext("actions", "Register"),
|
||||
class: "hover:underline",
|
||||
to: Routes.user_registration_path(CanneryWeb.Endpoint, :new)
|
||||
) %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li>
|
||||
<%= link "Log in", class: "hover:underline",
|
||||
to: Routes.user_session_path(CanneryWeb.Endpoint, :new) %>
|
||||
<%= link(dgettext("actions", "Log in"),
|
||||
class: "hover:underline",
|
||||
to: Routes.user_session_path(CanneryWeb.Endpoint, :new)
|
||||
) %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
Reference in New Issue
Block a user