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/subreddit.eex

53 lines
1.5 KiB
Elixir
Raw Normal View History

2023-10-01 22:33:41 +00:00
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Overview</a></li>
2023-10-02 10:59:52 +00:00
<li class="breadcrumb-item active" aria-current="page">
<%= if is_list(subreddit) do %>
<%= Enum.join(subreddit, ", ") %>
<% else %>
<%= subreddit %>
<% end %>
</li>
2023-10-01 22:33:41 +00:00
</ol>
</nav>
2023-10-02 10:59:52 +00:00
<h2>
<%= if is_list(subreddit) do %>
Multi-Reddit
2023-10-02 10:59:52 +00:00
<% else %>
<%= subreddit %>
<% end %>
</h2>
2023-08-14 11:07:38 +00:00
<form method="get" action="/search" class="row">
<div class="col-8">
<input type="text" class="form-control" placeholder="Search term" name="search" />
</div>
<%= if is_list(subreddit) do %>
<%= for s <- subreddit do %>
<input type="hidden" name="subreddit[]" value="<%= s %>" />
<% end %>
<% else %>
<input type="hidden" name="subreddit[]" value="<%= subreddit %>" />
<% end %>
<div class="col-4 text-end">
<button type="submit" class="btn btn-primary">Search</button>
</div>
</form>
<br>
2023-08-14 11:07:38 +00:00
<div class="row text-center">
<div class="d-grid gap-2 col-12 mx-auto">
<%= for date <- dates do %>
2023-10-02 10:59:52 +00:00
<%= if is_list(subreddit) do %>
<a class="btn btn-outline-secondary btn-lg" href="/m/<%= Enum.join(subreddit, "+") %>/<%= date %>" role="button"><%= date %></a>
<% else %>
<a class="btn btn-outline-secondary btn-lg" href="/r/<%= subreddit %>/<%= date %>" role="button"><%= date %></a>
<% end %>
2023-08-14 11:07:38 +00:00
<% end %>
</div>
</div>