Current section

Files

Jump to
fun_with_flags_ui lib fun_with_flags ui templates index.html.eex
Raw

lib/fun_with_flags/ui/templates/index.html.eex

<!DOCTYPE html>
<html lang="en">
<%= _head(conn: @conn, title: "List") %>
<body>
<nav id="fwf-top-bar" class="navbar navbar-inverse navbar-toggleable-xl">
<a class="navbar-brand" href="https://github.com/tompave/fun_with_flags">FunWithFlags</a>
<div class="collapse navbar-collapse">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="">all flags</a>
</li>
</ul>
<a href="<%= path(@conn, "/new") %>" class="btn btn-secondary">New Flag</a>
</div>
</nav>
<div class="container mt-3">
<div class="row d-none d-md-flex">
<div class="col">
<table class="table table-hover">
<thead class="thead-default">
<tr>
<th>name</th>
<th>status</th>
<th>gates</th>
</tr>
</thead>
<tbody>
<%= for flag <- @flags do %>
<tr>
<td>
<a href="<%= path(@conn, "/flags/#{url_safe(flag.name)}") %>">
<%= html_escape(flag.name) %>
</a>
</td>
<td>
<%= html_smart_status_for(flag) %>
</td>
<td>
<%= html_gate_list(flag) %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
<div class="container d-flex flex-column d-md-none">
<%= for flag <- @flags do %>
<div class="card mb-3">
<div class="card-body">
<h5 class="card-title">
<a href="<%= path(@conn, "/flags/#{url_safe(flag.name)}") %>">
<%= html_escape(flag.name) %>
</a>
</h5>
<div class="d-flex flex-column gap-2">
<div>
<strong>Status:</strong>
<%= html_smart_status_for(flag) %>
</div>
<div>
<strong>Gates:</strong>
<%= html_gate_list(flag) %>
</div>
</div>
</div>
</div>
<% end %>
</div>
</body>
</html>