denkGroot/Spina

View on GitHub
lib/generators/spina/templates/app/views/demo/pages/demo.html.haml

Summary

Maintainability
Test Coverage
%h1= current_page.title

%h5 Line
%p= content :line

%h5 Content
!= content :text

%h5 Image

- if has_content?(:image)
  %p= image_tag content(:image).variant(resize: "200x100")

%h5 Image collection

%ul
  - content(:image_collection)&.images&.each do |image|
    %li= image_tag image.variant(resize: '100x100')

%h5 Structure

%ul
  - content(:structure)&.structure_items&.each do |item|
    %li
      %h6 Title
      %p= item.content(:title)
      %h6 Description
      != item.content(:description)