<li class="my-2" id="<%= dom_id(file) %>">
  <% if file.variable? %>
    <%= link_to image_tag(file.variant(resize_and_pad: [300, 300, background: "#F7F8F9"]), class: "bg-light img-thumbnail img-fluid"), file, target: "_blank" %>
  <% else %>
    <div class="border rounded bg-light text-muted d-flex justify-content-center align-items-center fix-h-and-w">
      <%= link_to file, target: "_blank" do %>
        <%= fa_icon("file", style: "font-size: 2rem") %>
        <div class="mt-2"><%= file.filename %></div>
      <% end %>
    </div>
  <% end %>
</li>
