Module: DevicesHelper

Defined in:
app/helpers/devices_helper.rb

Instance Method Summary collapse

Instance Method Details

#device_imac(options = {}, &block) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/helpers/devices_helper.rb', line 3

def device_imac(options={}, &block)
  (:div, class: "md-imac md-glare") do
    concat((:div, class: "md-body") do
      concat((:div, class: "md-top") do
        if block_given?
          concat((:div, nil, class: "md-camera"))
          concat((:div, capture(&block), class: 'md-screen'))
        else
          concat((:div, nil, class: "md-camera"))
          concat((:div, nil, class: 'md-screen'))
        end
      end)
    end)

    concat((:div, class: "md-base") do
      concat  :div, nil, class: "md-stand"
      concat  :div, nil, class: "md-foot"
    end)
  end
end

#device_ipad(options = {}, &block) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'app/helpers/devices_helper.rb', line 38

def device_ipad(options={}, &block)
  (:div, class: "md-ipad md-black-device md-glare") do
    concat((:div, class: "md-body") do
      concat((:div, nil, class: "md-front-camera"))
      if block_given?
        concat((:div, capture(&block), class: 'md-screen'))
      else
        concat((:div, nil, class: 'md-screen'))
      end
      concat((:button, nil, class: "md-home-button"))
    end)
  end
end

#device_iphone(options = {}, &block) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'app/helpers/devices_helper.rb', line 52

def device_iphone(options={}, &block)
  (:div, class: "md-iphone-5 md-black-device md-glare") do
    concat((:div, class: "md-body") do
      concat((:div, nil, class: "md-buttons"))
      concat((:div, nil, class: "md-front-camera"))
      concat((:div, nil, class: "md-top-speaker"))
      if block_given?
        concat((:div, capture(&block), class: 'md-screen'))
      else
        concat((:div, nil, class: 'md-screen'))
      end
      concat((:button, nil, class: "md-home-button"))
    end)
  end
end

#device_macbook(options = {}, &block) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'app/helpers/devices_helper.rb', line 24

def device_macbook(options={}, &block)
  (:div, class: "md-macbook-pro md-glare") do
    concat((:div, class: "md-lid") do
      if block_given?
        concat((:div, capture(&block), class: 'md-screen'))
      else
        concat((:div, nil, class: 'md-screen'))
      end
    end)

    concat((:div, nil, class: "md-base"))
  end
end