<h2><a href="<%= post.url %>"><%= post.title %></a></h2>
<p>
<small><a href="https://reddit.com/user/<%= post.author %>"><%= post.author %></a></small>
-
<small><%= DateTime.to_iso8601(post.posted_at) %></small>
<a href="https://reddit.com<%= post.permalink %>">Open reddit</a>
</p>
<%= unless Enum.empty?(media.images) do %>
<div id="carouselImages" class="carousel slide">
<div class="carousel-inner">
<%= for {img, i} <- Enum.with_index(media.images) do %>
<div class="carousel-item <%= if i == 0, do: "active" %>">
<img src="<%= img %>" class="d-block w-100">
</div>
<% end %>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselImages" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselImages" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
<br>
<%= unless Enum.empty?(media.videos) do %>
<div class="row">
<%= for video <- media.videos do %>
<video controls loop>
<source src="<%= video %>" type="video/mp4">
</video>
<%= for comment when is_nil(comment.parent_id) <- post.comments do %>
<div class="row" style="margin-bottom: 4px;">
<%= EEx.eval_file(comment_template, comment: comment, level: 0, comment_template: comment_template) %>