app/views/layouts/tramway/landing/application.html.haml in tramway-landing-1.8.2.3 vs app/views/layouts/tramway/landing/application.html.haml in tramway-landing-1.8.2.4

- old
+ new

@@ -18,11 +18,12 @@ - if @blocks&.any? - headers = @blocks.select { |block| block.model.block_type.header? } - footers = @blocks.select { |block| block.model.block_type.footer? } - other_blocks = @blocks - headers - footers -# FIXME - = render "tramway/landing/blocks/block_types/header", block: headers.first + - if headers.first.present? + = render "tramway/landing/blocks/block_types/header", block: headers.first %main.mt-5 .container - other_blocks.each_with_index do |block, index| = render "tramway/landing/blocks/block_types/#{block.model.block_type}", block: block - if index < other_blocks.count - 1 @@ -32,6 +33,7 @@ - else .container-fluid = yield - if @blocks&.any? - footers = @blocks.select { |block| block.model.block_type.footer? } - = render "tramway/landing/blocks/block_types/footer", block: footers.first + - if footers.first.any? + = render "tramway/landing/blocks/block_types/footer", block: footers.first