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_posts.eex

36 lines
1.1 KiB
Elixir

<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Overview</a></li>
<li class="breadcrumb-item">
<%= if is_list(subreddit) do %>
<a href="/m/<%= Enum.join(subreddit, "+") %>"><%= Enum.join(subreddit, ", ") %></a>
<% else %>
<a href="/r/<%= subreddit %>"><%= subreddit %></a>
<% end %>
</li>
<li class="breadcrumb-item active" aria-current="page"><%= date %></li>
</ol>
</nav>
<h2>
<%= if is_list(subreddit) do %>
Multi-Reddit
<% else %>
<%= subreddit %>
<% end %>
</h2>
<div class="row text-center">
<div class="d-grid gap-2 col-12 mx-auto">
<%= for post <- posts do %>
<div class="card">
<div class="card-body">
<h5 class="card-title"><a href="/r/<%= post.subreddit %>/<%= date %>/<%= post.id %>"><%= post.title %></a></h5>
<h6 class="card-subtitle mb-2 text-body-secondary">
<small><%= post.num_comments %> comment(s) - <%= DateTime.to_iso8601(post.posted_at) %></small>
</h6>
</div>
</div>
<% end %>
</div>
</div>