Sha256: a90c4098949035c5420308d99d7a319d78cae064527b5f81ce028aa2514fff19

Contents?: true

Size: 436 Bytes

Versions: 3

Compression:

Stored size: 436 Bytes

Contents

module AppFrame::LayoutHelper
  def sidenav
    @sidenav ||= render 'sidenav'
  end
  
  def sidenav?
    sidenav.present?
  end
  
  def sidebar
    @sidebar ||= render 'sidebar'
  end
  
  def sidebar?
    sidebar.present?
  end
  
  def content_cols
    @content_cols = 12
    #@content_cols -= 2 if sidenav?
    @content_cols -= 2 if sidebar?  
    @content_cols
  end
  
  def body_class
    "with-sidenav" if sidenav?
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
app_frame-0.6.1 app/helpers/app_frame/layout_helper.rb
app_frame-0.5.8 app/helpers/app_frame/layout_helper.rb
app_frame-0.5.7 app/helpers/app_frame/layout_helper.rb