Module: BootyboxContentHelper

Defined in:
app/helpers/bootybox_content_helper.rb

Instance Method Summary collapse

Instance Method Details

#content_wrapper_rowObject



26
27
28
29
30
# File 'app/helpers/bootybox_content_helper.rb', line 26

def content_wrapper_row
   :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)
   :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)
   :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(options={})
   :div, class: ['row', options[:class]].join(' ') do
    yield
  end
end

#seperatorObject



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 slideshow_top_slide_wrapper(sub_el, options = {tag: :li})
  sub_el.sub_element_index == 0 ? item_active_class = "active" : item_active_class = ""

  element_view_for(sub_el, :tag => nil) do |el|
     options[: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