Module: Trestle::ContainerHelper

Defined in:
app/helpers/trestle/container_helper.rb

Defined Under Namespace

Classes: Context

Instance Method Summary collapse

Instance Method Details

#container(&block) ⇒ Object


3
4
5
6
7
8
9
10
11
# File 'app/helpers/trestle/container_helper.rb', line 3

def container(&block)
  context = Context.new(self)
  content = capture(context, &block)

  (:div, class: "main-content-container") do
    concat (:div, content, class: "main-content")
    concat (:aside, context.sidebar, class: "main-content-sidebar") unless context.sidebar.blank?
  end
end