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

101 lines
4.7 KiB
Elixir
Raw Normal View History

2019-02-11 22:22:35 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
2019-04-01 16:24:22 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<title>Frenzy</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
2019-02-11 22:22:35 +00:00
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
2019-11-09 18:21:45 +00:00
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/open-iconic-bootstrap.min.css") %>"/>
2019-02-11 22:22:35 +00:00
</head>
<body>
<header>
2019-11-09 18:21:45 +00:00
<main class="main mt-4" role="main">
2019-04-01 16:24:22 +00:00
<div class="container">
2019-11-09 18:21:45 +00:00
<label class="sidebar-toggle" for="show-sidebar">
<span class="oi oi-menu" title="Open Menu"></span>
</label>
2019-04-01 16:24:22 +00:00
<%= if get_flash(@conn, :info) do %>
<p class="alert alert-primary" role="alert"><%= get_flash(@conn, :info) %></p>
<% end %>
<%= if get_flash(@conn, :error) do %>
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
<% end %>
<%= render @view_module, @view_template, assigns %>
</div>
2019-02-11 22:22:35 +00:00
</main>
2019-11-09 18:21:45 +00:00
<input id="show-sidebar" type="checkbox" style="display: none;">
<div class="container-fluid sidebar-container">
<div class="row">
<div class="col-sm-6 col-md-3 py-2 sidebar">
<label for="show-sidebar" class="mt-2 sidebar-toggle">
<span class="oi oi-x" title="Close Menu"></span>
</label>
<div class="d-flex flex-column sidebar-nav">
<ul class="nav flex-column">
<li class="nav-item">
<h1 class="sidebar-title">
<a href="/" class="nav-link">Frenzy</a>
</h1>
</li>
<%= unless is_nil(@conn.assigns[:user]) do %>
<li class="nav-item">
<h3 class="sidebar-title">
<a href="<%= Routes.group_path(@conn, :index) %>" class="nav-link">Groups</a>
</h3>
</li>
<%= for group <- user_groups(@user) do %>
<li class="nav-item">
<details open="">
<summary>
<a href="<%= Routes.group_path(@conn, :show, group.id) %>"><%= group.title %></a>
</summary>
<ul class="nav flex-column">
<%= for feed <- group.feeds do %>
2019-11-10 19:37:06 +00:00
<li class="nav-item feed-nav-item">
<a href="<%= Routes.feed_path(@conn, :show, feed.id) %>" class="nav-link">
<%= if feed.favicon do %>
<img src="<%= feed.favicon %>" alt="<%= feed.title %> favicon" class="favicon">
<% end %>
<%= feed.title %>
</a>
2019-11-09 18:21:45 +00:00
</li>
<% end %>
</ul>
</details>
</li>
<% end %>
<li class="nav-item">
<h3 class="sidebar-title">
<a href="<%= Routes.pipeline_path(@conn, :index) %>" class="nav-link">Pipelines</a>
</h3>
</li>
<% end %>
</ul>
<ul class="nav flex-column mt-auto">
<%= unless is_nil(@conn.assigns[:user]) do %>
<li class="nav-item"><a href="<%= Routes.account_path(@conn, :show) %>" class="nav-link">Account</a></li>
<li class="nav-item"><a href="<%= Routes.login_path(@conn, :logout) %>" class="nav-link">Log Out</a></li>
<% end %>
</ul>
</div>
</div>
<div class="col sidebar-background"><label for="show-sidebar"></label></div>
</div>
</div>
2019-04-01 16:24:22 +00:00
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
2019-02-11 22:22:35 +00:00
<script type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
</body>
</html>