module Voom::Presenters::DSL::Components::Mixins::Typography
Public Instance Methods
blank(level: 1, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 90 def blank(level: 1, **attributes, &block) self << Components::Typography.new(parent: self, type: :body, text: [' '], level: level, **attributes, &block) end
body(*text, level: 1, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 76 def body(*text, level: 1, **attributes, &block) self << Components::Typography.new(parent: self, type: :body, text: text, level: level, **attributes, &block) end
body2(*text, level: 2, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 81 def body2(*text, level: 2, **attributes, &block) body(*text, level: level, **attributes, &block) end
caption(*text, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 95 def caption(*text, **attributes, &block) self << Components::Typography.new(parent: self, type: :caption, text: text, **attributes, &block) end
headline(*text, level: nil, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 9 def headline(*text, level: nil, **attributes, &block) self << Components::Typography.new(parent: self, type: :headline, text: text, level: level || Settings.default(:headline, :level), **attributes, &block) end
headline1(*text, level: nil, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 15 def headline1(*text, level: nil, **attributes, &block) headline(*text, level: 1, **attributes, &block) end
Also aliased as: heading1
headline2(*text, level: nil, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 21 def headline2(*text, level: nil, **attributes, &block) headline(*text, level: 2, **attributes, &block) end
Also aliased as: heading2
headline3(*text, level: nil, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 27 def headline3(*text, level: nil, **attributes, &block) headline(*text, level: 3, **attributes, &block) end
Also aliased as: heading3
headline4(*text, level: nil, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 33 def headline4(*text, level: nil, **attributes, &block) headline(*text, level: 4, **attributes, &block) end
Also aliased as: heading4
headline5(*text, level: nil, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 39 def headline5(*text, level: nil, **attributes, &block) headline(*text, level: 5, **attributes, &block) end
Also aliased as: heading5
headline6(*text, level: nil, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 45 def headline6(*text, level: nil, **attributes, &block) headline(*text, level: 6, **attributes, &block) end
Also aliased as: heading6
link(text, url, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 109 def link(text, url, **attributes, &block) self << Components::Link.new(parent: self, text: text, url: url, **attributes, &block) end
overline(*text, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 100 def overline(*text, **attributes, &block) self << Components::Typography.new(parent: self, type: :overline, text: text, **attributes, &block) end
page_title(*text, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 72 def page_title(*text, **attributes, &block) self << Components::PageTitle.new(parent: self, text: text, level: 1, **attributes, &block) end
separator(**attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 105 def separator(**attributes, &block) self << Components::Separator.new(parent: self, **attributes, &block) end
subtitle(*text, level: 1, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 59 def subtitle(*text, level: 1, **attributes, &block) self << Components::Typography.new(parent: self, type: :subtitle, text: text, level: level, **attributes, &block) end
Also aliased as: subtitle1, subheading
subtitle2(*text, level: 2, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 66 def subtitle2(*text, level: 2, **attributes, &block) subtitle(*text, level: level, **attributes, &block) end
text(*text, level: 1, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 85 def text(*text, level: 1, **attributes, &block) return @text if defined? @text body(*text, level: 1, **attributes, &block) end
title(*text, level: nil, **attributes, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/mixins/typography.rb, line 55 def title(*text, level: nil, **attributes, &block) headline(text, level: level || Settings.default(:title, :level), **attributes, &block) end