<% solr_documents_grid_block.with_solr_helper(self) %>
<% if solr_documents_grid_block.documents? %> <% solr_documents_grid_block.each_document.each_with_index do |(block_options, document), index| %>
<% if block_options[:thumbnail_image_url].present? %>
<%= link_to_document(document, image_tag(block_options[:thumbnail_image_url]), counter: -1) %>
<% elsif block_options[:iiif_tilesource_base].present? %>
<%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!400,400/0/default.jpg'), counter: -1) %>
<% elsif has_thumbnail? document %>
<%= render_thumbnail_tag(document, {}, document_counter: -1) %>
<% end %>
<% end %> <% end %>
<% if solr_documents_grid_block.text? %>
<% unless solr_documents_grid_block.title.blank? %>

<%= solr_documents_grid_block.title %>

<% end %> <%= sir_trevor_markdown solr_documents_grid_block.text %>
<% end %>