frenzy/lib/frenzy_web/templates/layout/app.html.eex

32 lines
1.2 KiB
Elixir

<!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"/>
<title>Frenzy · Phoenix Framework</title>
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
</head>
<body>
<header>
<section class="container">
<nav role="navigation">
<ul>
<li><a href="/">Frenzy</a></li>
<%= unless is_nil(@conn.assigns[:user]) do %>
<li><a href="<%= Routes.account_path(@conn, :show) %>">Account</a></li>
<li><a href="<%= Routes.login_path(@conn, :logout) %>">Log Out</a></li>
<% end %>
</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>