Module: BootstrapLeather::TypographyHelper

Included in:
ApplicationHelper
Defined in:
app/helpers/bootstrap_leather/typography_helper.rb

Overview

Typography

Instance Method Summary collapse

Instance Method Details

#dl(list, html_options = {}) ⇒ Object Also known as: description_list, definition_list



26
27
28
29
30
31
32
33
34
# File 'app/helpers/bootstrap_leather/typography_helper.rb', line 26

def dl(list, html_options = {})
  render(
    partial: 'bootstrap_leather/typography/dl',
    locals: {
      list: list,
      html_options: html_options
    }
  )
end

#render_h1(html_options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'app/helpers/bootstrap_leather/typography_helper.rb', line 6

def render_h1(html_options = {})
  page_title = []
  page_title << content_for(:title)
  if content_for(:subtitle)
    page_title << (:small, content_for(:subtitle))
  end
   :h1, page_title.compact.join(' ').html_safe, html_options
end

#render_page_header(html_options = {}) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'app/helpers/bootstrap_leather/typography_helper.rb', line 15

def render_page_header(html_options = {})
  render(
    partial: 'bootstrap_leather/typography/page_header',
    locals: {
      title: content_for(:title),
      subtitle: content_for(:subtitle),
      html_options: html_options
    }
  )
end