Module: Blacklight::LayoutHelperBehavior

Included in:
BlacklightHelperBehavior
Defined in:
app/helpers/blacklight/layout_helper_behavior.rb

Overview

A module for useful methods used in layout configuration

Instance Method Summary collapse

Instance Method Details

#container_classesString

Class used for specifying main layout container classes. Set config.full_width_layout to true to use a fluid layout.

Returns:

  • (String)


46
47
48
# File 'app/helpers/blacklight/layout_helper_behavior.rb', line 46

def container_classes
  blacklight_config.full_width_layout ? 'container-fluid' : 'container'
end

#html_tag_attributesHash

Attributes to add to the <html> tag (e.g. lang and dir)

Returns:

  • (Hash)


17
18
19
# File 'app/helpers/blacklight/layout_helper_behavior.rb', line 17

def html_tag_attributes
  { lang: I18n.locale }
end

#main_content_classesString

Classes used for sizing the main content of a Blacklight page

Returns:

  • (String)


31
32
33
# File 'app/helpers/blacklight/layout_helper_behavior.rb', line 31

def main_content_classes
  'col-lg-9'
end

#show_content_classesString

Classes added to a document’s show content div

Returns:

  • (String)


10
11
12
# File 'app/helpers/blacklight/layout_helper_behavior.rb', line 10

def show_content_classes
  "#{main_content_classes} show-document"
end

#show_sidebar_classesString

Classes added to a document’s sidebar div

Returns:

  • (String)


24
25
26
# File 'app/helpers/blacklight/layout_helper_behavior.rb', line 24

def show_sidebar_classes
  sidebar_classes
end

Classes used for sizing the sidebar content of a Blacklight page

Returns:

  • (String)


38
39
40
# File 'app/helpers/blacklight/layout_helper_behavior.rb', line 38

def sidebar_classes
  'page-sidebar col-lg-3'
end