Sha256: 83381c42812665823eadf2a8d0f2416d93e4654e21febf568eec5f46ffdf01b2
Contents?: true
Size: 1.06 KB
Versions: 12
Compression:
Stored size: 1.06 KB
Contents
<% background_color = component[:attributes][:bgcolor] || "rgba(255, 255, 255, 0)" background_images = [] background_positions = [] background_sizes = [] if component[:attributes] && component[:attributes].has_key?(:backgrounds) # retro-compatibility component[:attributes][:backgrounds].each do |item| image_data = item[:image] if image_data && image_data[:id] blob_id = image_data[:id] blob = ActiveStorage::Blob.find blob_id url = "url(#{url_for(blob)})" position = "#{item[:posh]} #{item[:posv]}" background_images << url background_positions << position background_sizes << item[:size] end end end %> <div class="row <%= promethee_class_for component %>" style="background-color: <%= background_color %>; <%= background_images.count > 0 ? "background-repeat: no-repeat; background-image: #{background_images.join(', ')}; background-position: #{background_positions.join(', ')}; background-size: #{background_sizes.join(', ')};" : '' %>"> <%= render 'promethee/show/components', components: component[:children] %> </div>
Version data entries
12 entries across 12 versions & 1 rubygems