Class: TwitterBootstrapMarkup::PageHeader

Inherits:
Tag
  • Object
show all
Defined in:
lib/twitter_bootstrap_markup/page_header.rb

Constant Summary

Constants included from Popover

TwitterBootstrapMarkup::Popover::POSITIONS

Constants included from Tooltip

Tooltip::POSITIONS

Instance Attribute Summary

Attributes inherited from Tag

#attributes, #children, #name

Instance Method Summary collapse

Methods inherited from Tag

#append, block, inline, #prepend, #to_s

Methods included from SidePosition

#pull_left, #pull_right

Methods included from Popover

#popover

Methods included from Tooltip

#tooltip

Constructor Details

#initialize(title, subtitle = nil) ⇒ PageHeader

Returns a new instance of PageHeader.



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/twitter_bootstrap_markup/page_header.rb', line 4

def initialize(title, subtitle=nil)
  super(:div, :class => 'page-header') do
    append do
      Tag.block(:h1) do
        append title
        append Tag.block(:small, "  #{subtitle}") {} if subtitle
      end
    end

  end
end