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/_comment.eex
2023-05-18 00:13:55 +02:00

24 lines
767 B
Elixir

<div style="padding-left: <%= level * 5%>px;">
<div class="card">
<div class="card-body">
<blockquote class="blockquote mb-0">
<%= if comment.author == "AutoModerator" do %>
<p><small>Hidden AutoModerator comment</small></p>
<% else %>
<%= Earmark.as_html!(comment.body) %>
<% end %>
<footer class="blockquote-footer">
<%= comment.author %>,
<small><%= trunc(comment.created_utc) |> DateTime.from_unix!() |> DateTime.to_iso8601() %></small>
</footer>
</blockquote>
</div>
</div>
<br>
</div>
<%= for reply <- comment.replies do %>
<%= EEx.eval_file(comment_template, comment: reply, level: level + 1, comment_template: comment_template) %>
<% end %>