Sha256: ba125684e8f1807aa73f7ae403e76c281194101340c6b8244931070cade5e5f3

Contents?: true

Size: 1.22 KB

Versions: 65

Compression:

Stored size: 1.22 KB

Contents

# frozen_string_literal: true
# Methods added to this helper will be available to all templates in the hosting
# application
module Blacklight
  # A module for useful methods used in layout configuration
  module LayoutHelperBehavior
    ##
    # Classes added to a document's show content div
    # @return [String]
    def show_content_classes
      "#{main_content_classes} show-document"
    end

    ##
    # Attributes to add to the <html> tag (e.g. lang and dir)
    # @return [Hash]
    def html_tag_attributes
      { lang: I18n.locale }
    end

    ##
    # Classes added to a document's sidebar div
    # @return [String]
    def show_sidebar_classes
      sidebar_classes
    end

    ##
    # Classes used for sizing the main content of a Blacklight page
    # @return [String]
    def main_content_classes
      'col-lg-9'
    end

    ##
    # Classes used for sizing the sidebar content of a Blacklight page
    # @return [String]
    def sidebar_classes
      'page-sidebar col-lg-3'
    end

    ##
    # Class used for specifying main layout container classes. Can be
    # overwritten to return 'container-fluid' for Bootstrap full-width layout
    # @return [String]
    def container_classes
      'container'
    end
  end
end

Version data entries

65 entries across 65 versions & 2 rubygems

Version Path
blacklight-7.38.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.37.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.36.2 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.36.1 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.36.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.35.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.34.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.33.1 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.33.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.32.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.31.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.30.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.29.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.28.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.27.1 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.27.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.26.1 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.26.0 app/helpers/blacklight/layout_helper_behavior.rb
blacklight-7.25.3 app/helpers/blacklight/layout_helper_behavior.rb