- page.page_blocks.order(:order).each do |block| %hr %div.container-fluid %div.row %div{ id: block.div_id } - if block.name %h2 = block.name - block.thumbnails.each do |thumb| %div.thumbnail.col-md-4.col-sm-6 - if thumb.image = image_tag thumb.image.file - else = image_tag '/images/default.jpg' %h4 = link_to raw(thumb.content), thumb.link - block.text_boxes.each do |box| %p = raw box.content - block.image_boxes.each do |box| %div.image-box - if box.image = image_tag box.image.file - else = image_tag '/images/default.jpg' %h3 = link_to box.heading, box.link - block.blog_feeds.each do |feed| - @articles.limit(feed.limit).each do |post| %div.post{ onclick: "window.location='/articles/#{post.id}';", style: 'cursor: pointer' } %div.image-post = image_tag post.image.file if post.image %h2.center = post.title = post.created_at.strftime("%B %d") %p = raw HTML_Truncator.truncate(post.content, 50) %div - post.tags.each do |tag| = link_to tag, blog_path(tag), class: 'btn btn-default btn-xs' - block.contact_fields.each do |contact| = raw contact.content = form_for PagesCms::Contact.new, url: contacts_path, method: :post do |f| = f.text_field :name, placeholder: 'your name', class: 'form-control' = f.text_field :email, placeholder: 'your email', class: 'form-control' = f.text_area :message, placeholder: 'your message', class: 'form-control', rows: 10
= f.submit 'Send Message', class: 'btn btn-primary'