new cards
This commit is contained in:
@ -6,17 +6,19 @@ module Merged
|
||||
"merged/view/" + section.template
|
||||
end
|
||||
|
||||
# background image as inline style
|
||||
def bg(section)
|
||||
return "" if section.image.blank?
|
||||
puts "--#{Image.image_root}/#{section.image}--"
|
||||
img = asset_url( "#{Image.image_root}/#{section.image}" )
|
||||
"background-image: url('#{img}');"
|
||||
end
|
||||
def image_for(section , classes)
|
||||
image_tag("#{Image.image_root}/#{section.image}" , class: classes)
|
||||
end
|
||||
def has_button(section)
|
||||
section.content['button']
|
||||
|
||||
# works for with sections and cards that respond to .image
|
||||
def image_for(element , classes)
|
||||
return "" if element.image.blank?
|
||||
image_tag("#{Image.image_root}/#{element.image}" , class: classes)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user