change code to take new filenames

This commit is contained in:
2022-12-17 15:00:47 +02:00
parent f7147f79e2
commit fc2c390fd1
7 changed files with 15 additions and 18 deletions

View File

@ -7,7 +7,7 @@ module Merged
def bg(section , clazz = "")
attributes = {class: clazz}
return attributes if section.image.blank?
img = asset_url( section.image.assert_name )
img = asset_url( section.image.asset_name )
attributes["style"] = "background-image: url('#{img}');"
if(section.option("fixed") == "on")
attributes[:class] = attributes[:class] + " bg-fixed"
@ -18,7 +18,8 @@ module Merged
# works for with sections and cards that respond to .image
def image_for(element , classes = "")
return "" if element.image.blank?
image_tag(element.image.assert_name , class: classes)
image = element.image
image_tag(image.asset_name , alt: image.name , class: classes )
end
end