Skip to content

Commit

Permalink
add a page template for repositories layout (DLC-1157)
Browse files Browse the repository at this point in the history
  • Loading branch information
barmintor committed Sep 26, 2024
1 parent 2f5866c commit 11cf1cf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/views/repositories/page.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<%- cache [@subsite, @page] do -%>
<div id="content" class="row mx-auto">
<h2 class="text-center w-100"><%= @page.title %></h2>
<%= render Dcv::PageImageComponent.new(depictable: @page, blacklight_config: @subsite.blacklight_config) %>
<hr class="w-100">
<%- @page.site_text_blocks.sort { |a,b| a.sort_label <=> b.sort_label }.each do |text_block| -%>
<div class="inner">
<%- if text_block.label.present? -%>
<h3 class="text-center"><%= text_block.label %></h3>
<%- end -%>
<%= render Dcv::PageImageComponent.new(depictable: text_block, blacklight_config: @subsite.blacklight_config) %>
<%= controller.render_markdown(text_block.markdown) %>
</div>
<%- end -%>
</div>
<%- end -%>

0 comments on commit 11cf1cf

Please sign in to comment.