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 02:28:30 +00:00
|
|
|
<li><a href="<%= Routes.frontend_path(@conn, :search) %>">Search</a></li>
|
2020-01-16 02:24:35 +00:00
|
|
|
</ul>
|
|
|
|
<ul>
|
2020-04-25 16:30:47 +00:00
|
|
|
<%= 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>.
|
|
|
|
</li>
|
|
|
|
<li>
|
2020-01-16 02:24:35 +00:00
|
|
|
<%= form_for @conn, Routes.login_path(@conn, :logout), [method: :post], fn f -> %>
|
|
|
|
<%= 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">
|
|
|
|
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
|
|
|
|
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
|
|
|
|
<%= render @view_module, @view_template, assigns %>
|
|
|
|
</main>
|
|
|
|
<script type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|