101 lines
4.7 KiB
Elixir
101 lines
4.7 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, 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">
|
|
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
|
|
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/open-iconic-bootstrap.min.css") %>"/>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<main class="main mt-4" role="main">
|
|
<div class="container">
|
|
<label class="sidebar-toggle" for="show-sidebar">
|
|
<span class="oi oi-menu" title="Open Menu"></span>
|
|
</label>
|
|
<%= 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>
|
|
</main>
|
|
<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 %>
|
|
<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>
|
|
</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>
|
|
|
|
<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>
|
|
<script type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
|
|
</body>
|
|
</html>
|