class UiBibz::Ui::Core::Boxes::Components::CardImage
Create a card image
Attributes¶ ↑
-
content
- Content of element -
options
- Options of element -
html_options
- Html Options of element
Options¶ ↑
You can add HTML attributes using the html_options
. You can pass arguments in options attribute:
-
position
- Symbol (top
,bottom
)
Signatures¶ ↑
UiBibz::Ui::Core::Boxes::CardImage.new(content, options = nil, html_options = nil) UiBibz::Ui::Core::Boxes::CardImage.new(options = nil, html_options = nil) do content end
Examples¶ ↑
UiBibz::Ui::Core::Boxes::CardImage.new.render UiBibz::Ui::Core::Boxes::CardImage.new do "/assets/images/test.png" end.render
Public Instance Methods
pre_render()
click to toggle source
Render html tag
# File lib/ui_bibz/ui/core/boxes/components/card_image.rb, line 39 def pre_render # image_tag content, html_options if options[:pack] image_pack_tag content, html_options else image_tag content, html_options end end
Private Instance Methods
component_html_classes()
click to toggle source
# File lib/ui_bibz/ui/core/boxes/components/card_image.rb, line 50 def component_html_classes position end
position()
click to toggle source
# File lib/ui_bibz/ui/core/boxes/components/card_image.rb, line 54 def position "card-img-#{@options[:position] || :top}" if @options[:position] end