Browse Source

Don't show search link if logged out

master
Shadowfacts 1 year ago
parent
commit
803fc4c36e
Signed by: shadowfacts GPG Key ID: 94A5AB95422746E5
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      lib/clacks_web/templates/layout/app.html.eex

+ 4
- 2
lib/clacks_web/templates/layout/app.html.eex View File

@ -13,12 +13,14 @@
<nav role="navigation">
<ul>
<li><a href="/"><%= instance_name() %></a></li>
<li><a href="<%= Routes.frontend_path(@conn, :search) %>">Search</a></li>
<%= if @conn.assigns[:user] do %>
<li><a href="<%= Routes.frontend_path(@conn, :search) %>">Search</a></li>
<% end %>
</ul>
<ul>
<%= if @conn.assigns[:user] do %>
<li>
Logged in as <a href="<%= Routes.actor_path(@conn, :get, @conn.assigns[:user].username) %>"><%= @conn.assigns[:user].username %></a>.
Logged in as <a href="<%= Routes.actor_path(@conn, :get, @user.username) %>"><%= @user.username %></a>.
</li>
<li>
<%= form_for @conn, Routes.login_path(@conn, :logout), [method: :post], fn f -> %>


Loading…
Cancel
Save