Module: BootyboxContentHelper
- Defined in:
- app/helpers/bootybox_content_helper.rb
Instance Method Summary collapse
- #content_wrapper_row ⇒ Object
- #glyphicon(name) ⇒ Object
- #icon(css) ⇒ Object
- #row(options = {}) ⇒ Object
- #seperator ⇒ Object
- #slideshow_top_slide_wrapper(sub_el, options = {tag: :li}) ⇒ Object
Instance Method Details
#content_wrapper_row ⇒ Object
26 27 28 29 30 |
# File 'app/helpers/bootybox_content_helper.rb', line 26 def content_wrapper_row content_tag :div, id:'page-wrapper', class: 'content-wrapper-row' do yield end end |
#glyphicon(name) ⇒ Object
8 9 10 |
# File 'app/helpers/bootybox_content_helper.rb', line 8 def glyphicon(name) content_tag :span, " ".html_safe, :class => "glyphicon glyphicon-#{name}" end |
#icon(css) ⇒ Object
4 5 6 |
# File 'app/helpers/bootybox_content_helper.rb', line 4 def icon(css) content_tag :span, " ".html_safe, :class => "bb-icon #{css}" end |
#row(options = {}) ⇒ Object
32 33 34 35 36 |
# File 'app/helpers/bootybox_content_helper.rb', line 32 def row(={}) content_tag :div, class: ['row', [:class]].join(' ') do yield end end |
#seperator ⇒ Object
38 39 40 |
# File 'app/helpers/bootybox_content_helper.rb', line 38 def seperator "<hr></hr>".html_safe end |
#slideshow_top_slide_wrapper(sub_el, options = {tag: :li}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/helpers/bootybox_content_helper.rb', line 12 def (sub_el, = {tag: :li}) sub_el.sub_element_index == 0 ? item_active_class = "active" : item_active_class = "" element_view_for(sub_el, :tag => nil) do |el| content_tag [:tag], :class => "item #{item_active_class}", :style => "background: url('#{asset_path(sub_el.content_by_name(:image, :preview => session[:page_preview_mode]).essence.picture_url(:size => el.render(:image_format).strip, :crop => true))}') left top no-repeat; background-size: 100%", :title => "#{sub_el.content_by_name(:image, :preview => session[:page_preview_mode]).essence.alt_content}" do yield end end end |