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

90 lines
3.5 KiB
Elixir
Raw Permalink Normal View History

<!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"/>
2021-08-28 15:58:22 +00:00
<title><%= title(assigns) %></title>
<%= csrf_meta_tag() %>
<link phx-track-static rel="stylesheet" href="<%= Routes.static_path(@conn, "/assets/app.css") %>"/>
<script defer phx-track-static type="text/javascript" src="<%= Routes.static_path(@conn, "/assets/app.js") %>"></script>
</head>
<body>
<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>
<%= @inner_content %>
</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>
2022-09-14 02:25:11 +00:00
<a href="<%= Routes.group_path(@conn, :show, group.id) %>" class="nav-link"><%= 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>
</body>
</html>