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

23 lines
876 B
Elixir

<div style="padding-left: <%= level * 5 %>px; margin-bottom: 2px;">
<div class="card">
<div class="card-body" style="padding: 8px;">
<blockquote class="blockquote mb-0" style="font-size: 1rem;">
<%= if comment.author == "AutoModerator" do %>
<p><small>Hidden AutoModerator comment</small></p>
<% else %>
<%= BdfrBrowser.RenderUtils.comment(comment.body) %>
<% end %>
<footer class="blockquote-footer">
<a href="/user/<%= comment.author %>"><%= comment.author %></a>,
<small><%= DateTime.to_iso8601(comment.posted_at) %></small>
</footer>
</blockquote>
</div>
</div>
</div>
<%= for reply <- BdfrBrowser.Comment.fetch_children!(comment) do %>
<%= EEx.eval_file(comment_template, comment: reply, level: level + 1, comment_template: comment_template) %>
<% end %>