Module: Trestle::LayoutHelper

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

Constant Summary collapse

{
  "expanded"  => "sidebar-expanded",
  "collapsed" => "sidebar-collapsed"
}

Instance Method Summary collapse

Instance Method Details

#body_attributesObject


8
9
10
11
12
# File 'app/helpers/trestle/layout_helper.rb', line 8

def body_attributes
  {
    class: body_classes
  }.reject { |k, v| v.blank? }
end

#body_classesObject


14
15
16
17
18
# File 'app/helpers/trestle/layout_helper.rb', line 14

def body_classes
  [
    SIDEBAR_CLASSES[cookies["trestle:sidebar"]]
  ].compact
end