This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
bdfr-browser/priv/templates/http/index.eex

47 lines
1.2 KiB
Elixir

<h1>BDFR Browser</h1>
<div class="row text-center">
<div class="d-grid gap-2 col-12 mx-auto">
<a class="btn btn-outline-primary btn-lg" href="/chats" role="button">Chats</a>
</div>
</div>
<br>
<form method="get" action="/search" class="row">
<div class="col-8">
<input type="text" class="form-control" placeholder="Search term" name="search" />
</div>
<div class="col-4 text-end">
<button type="submit" class="btn btn-primary">Search</button>
</div>
</form>
<br>
<h2>Archived Subreddits</h2>
<div class="row text-center">
<div class="d-grid gap-2 col-12 mx-auto">
<%= for subreddit <- subreddits, not String.starts_with?(subreddit, "u_") do %>
<a class="btn btn-outline-secondary btn-lg" href="/r/<%= subreddit %>" role="button"><%= subreddit %></a>
<% end %>
</div>
</div>
<br>
<h2>Archived Users</h2>
<div class="row text-center">
<div class="d-grid gap-2 col-12 mx-auto">
<%= for user <- subreddits, String.starts_with?(user, "u_") do %>
<a class="btn btn-outline-secondary btn-lg" href="/user/<%= String.replace_leading(user, "u_", "") %>" role="button">
<%= String.replace_leading(user, "u_", "") %>
</a>
<% end %>
</div>
</div>
<br>