Module: DevicesHelper
- Defined in:
- app/helpers/devices_helper.rb
Instance Method Summary collapse
- #device_imac(options = {}, &block) ⇒ Object
- #device_ipad(options = {}, &block) ⇒ Object
- #device_iphone(options = {}, &block) ⇒ Object
- #device_macbook(options = {}, &block) ⇒ Object
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(={}, &block) content_tag(:div, class: "md-imac md-glare") do concat(content_tag(:div, class: "md-body") do concat(content_tag(:div, class: "md-top") do if block_given? concat(content_tag(:div, nil, class: "md-camera")) concat(content_tag(:div, capture(&block), class: 'md-screen')) else concat(content_tag(:div, nil, class: "md-camera")) concat(content_tag(:div, nil, class: 'md-screen')) end end) end) concat(content_tag(:div, class: "md-base") do concat content_tag :div, nil, class: "md-stand" concat content_tag :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(={}, &block) content_tag(:div, class: "md-ipad md-black-device md-glare") do concat(content_tag(:div, class: "md-body") do concat(content_tag(:div, nil, class: "md-front-camera")) if block_given? concat(content_tag(:div, capture(&block), class: 'md-screen')) else concat(content_tag(:div, nil, class: 'md-screen')) end concat(content_tag(: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(={}, &block) content_tag(:div, class: "md-iphone-5 md-black-device md-glare") do concat(content_tag(:div, class: "md-body") do concat(content_tag(:div, nil, class: "md-buttons")) concat(content_tag(:div, nil, class: "md-front-camera")) concat(content_tag(:div, nil, class: "md-top-speaker")) if block_given? concat(content_tag(:div, capture(&block), class: 'md-screen')) else concat(content_tag(:div, nil, class: 'md-screen')) end concat(content_tag(: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(={}, &block) content_tag(:div, class: "md-macbook-pro md-glare") do concat(content_tag(:div, class: "md-lid") do if block_given? concat(content_tag(:div, capture(&block), class: 'md-screen')) else concat(content_tag(:div, nil, class: 'md-screen')) end end) concat(content_tag(:div, nil, class: "md-base")) end end |