2019-09-28 22:30:55 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8"/>
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
2020-04-25 16:30:47 +00:00
|
|
|
<title><%= assigns[:page_title] || instance_name() %></title>
|
2019-09-28 22:30:55 +00:00
|
|
|
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
<section class="container">
|
|
|
|
<nav role="navigation">
|
|
|
|
<ul>
|
2020-01-16 02:24:35 +00:00
|
|
|
<li><a href="/"><%= instance_name() %></a></li>
|
2020-04-26 20:52:03 +00:00
|
|
|
<%= if @conn.assigns[:user] do %>
|
|
|
|
<li><a href="<%= Routes.frontend_path(@conn, :search) %>">Search</a></li>
|
|
|
|
<% end %>
|
2020-01-16 02:24:35 +00:00
|
|
|
</ul>
|
|
|
|
<ul>
|
2020-04-25 16:30:47 +00:00
|
|
|
<%= if @conn.assigns[:user] do %>
|
|
|
|
<li>
|
2020-04-26 20:52:03 +00:00
|
|
|
Logged in as <a href="<%= Routes.actor_path(@conn, :get, @user.username) %>"><%= @user.username %></a>.
|
2020-04-25 16:30:47 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
2020-04-27 02:57:47 +00:00
|
|
|
<%= form_tag Routes.login_path(@conn, :logout), [method: :post] do %>
|
2020-01-16 02:24:35 +00:00
|
|
|
<%= submit "Log Out", class: "btn-link" %>
|
|
|
|
<% end %>
|
2020-04-25 16:30:47 +00:00
|
|
|
</li>
|
|
|
|
<% else %>
|
|
|
|
<li>
|
2020-01-16 02:24:35 +00:00
|
|
|
<a href="<%= login_path(@conn) %>">Log In</a>
|
2020-04-25 16:30:47 +00:00
|
|
|
</li>
|
|
|
|
<% end %>
|
2019-09-28 22:30:55 +00:00
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</section>
|
|
|
|
</header>
|
|
|
|
<main role="main" class="container">
|
2020-04-26 21:47:42 +00:00
|
|
|
<%= if get_flash(@conn, :info) do %>
|
|
|
|
<p class="flash-info" role="alert"><%= get_flash(@conn, :info) %></p>
|
|
|
|
<% end %>
|
|
|
|
<%= if get_flash(@conn, :error) do %>
|
|
|
|
<p class="flash-error" role="alert"><%= get_flash(@conn, :error) %></p>
|
|
|
|
<% end %>
|
2019-09-28 22:30:55 +00:00
|
|
|
<%= render @view_module, @view_template, assigns %>
|
|
|
|
</main>
|
|
|
|
<script type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|