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

41 lines
1.3 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">
<%= if is_list(subreddit) do %>
<a href="/m/<%= Enum.join(subreddit, "+") %>"><%= Enum.join(subreddit, ", ") %></a>
<% else %>
<a href="/r/<%= subreddit %>"><%= subreddit %></a>
<% end %>
</li>
2023-10-01 22:33:41 +00:00
<li class="breadcrumb-item active" aria-current="page"><%= date %></li>
</ol>
</nav>
2023-10-02 10:59:52 +00:00
<h2>
<%= if is_list(subreddit) and length(subreddit) > 1 do %>
Multi-Reddit
2023-10-02 10:59:52 +00:00
<% else %>
<%= subreddit %>
<% end %>
</h2>
2023-05-17 22:13:55 +00:00
2023-08-14 11:07:38 +00:00
<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 %>/<%= post.date %>/<%= post.id %>"><%= post.title %></a></h5>
2023-08-14 11:07:38 +00:00
<h6 class="card-subtitle mb-2 text-body-secondary">
2023-10-18 11:29:55 +00:00
<small>
<%= BdfrBrowser.RenderUtils.post_type_icon(post.url) %>
<%= post.num_comments %> comment(s)
-
<%= BdfrBrowser.RenderUtils.format_date(post.posted_at, :short) %></small>
2023-08-14 11:07:38 +00:00
</h6>
2023-05-17 22:13:55 +00:00
</div>
</div>
2023-08-14 11:07:38 +00:00
<% end %>
</div>
</div>