This commit is contained in:
BoHung Chiu 2023-07-04 14:01:17 +08:00
parent 8341365785
commit c5add605f9
1 changed files with 3 additions and 1 deletions
app/views/admin/ad_banners

View File

@ -225,8 +225,10 @@
<% banner.ad_images.can_display.desc(:created_at).each do |image| %>
<% if image.exchange_item == '1' %>
<div class="slide-img" style=" background: url('<%= image.file.thumb.url %>'); background-size: cover; background-position: center;"></div>
<% elsif image.video_snapshot %>
<div class="slide-img" style=" background: url('<%= image.video_snapshot %>'); background-size: cover; background-position: center;"></div>
<% elsif image.exchange_item == '2' %>
<div class="slide-img" style=" background: url('https://img.youtube.com/vi/<%= image.youtube.to_s[-11,11] %>/hqdefault.jpg'); background-size: cover; background-position: center;"></div>
<div class="slide-img" style=" background: url('<%= image.youtube_thumb %>'); background-size: cover; background-position: center;"></div>
<% end %>
<% end %>
<% else %>