wiki/lib/wiki_web/templates/layout/app.html.eex

36 lines
1.4 KiB
Elixir
Raw Normal View History

2020-07-30 00:49:51 +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-08-03 15:16:10 +00:00
<title><%= assigns[:page_title] || "Wiki" %></title>
2020-07-30 00:49:51 +00:00
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
<script defer type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
</head>
<body>
<header>
<section class="container">
<nav role="navigation">
<ul>
2020-08-02 21:46:18 +00:00
<li><a href="/">Home</a></li>
2020-08-02 23:42:38 +00:00
<%= if @current_user do %>
<li><%= link "New Page", to: Routes.page_path(@conn, :new) %></li>
2020-08-15 19:51:52 +00:00
<li><%= link "Random", to: Routes.page_path(@conn, :random) %></li>
2020-08-02 23:42:38 +00:00
<% end %>
2020-07-30 00:49:51 +00:00
<%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
<li><%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %></li>
<% end %>
</ul>
<%= render "_user_menu.html", assigns %>
</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>
<%= @inner_content %>
</main>
</body>
</html>