Sha256: 67bcb8df94fbfc1c855a2a0f0a0887b9a9cd45eea13968d11f22b37b936f6c44
Contents?: true
Size: 1.15 KB
Versions: 19
Compression:
Stored size: 1.15 KB
Contents
<% background_color = component[:attributes].dig(:bgcolor, :value)&.to_s || "rgba(255, 255, 255, 0)" backgrounds = component[:attributes].dig(:backgrounds, :value) background_images = [] background_positions = [] background_sizes = [] has_background = !(background_color =~ /rgba\(\s*255\s*,\s*255\s*,\s*255\s*,\s*0\s*\)/) if backgrounds backgrounds.each do |item| blob = blob_from_data item.dig(:image, :value) if blob url = "url(#{url_for(blob)})" position = "#{item.dig(:posh, :value)} #{item.dig(:posv, :value)}" background_images << url background_positions << position background_sizes << item.dig(:size, :value) end end end %> <div class="row <%= promethee_class_for component %><%= ' promethee__component__row--background' if has_background %>" 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
19 entries across 19 versions & 1 rubygems