18 lines
993 B
Text
18 lines
993 B
Text
<%- # License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
|
|
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -%>
|
|
<div class='u-marginBottom--15 u-relative'>
|
|
<% has_video = @campaign.vimeo_video_id || @campaign.youtube_video_id %>
|
|
<% text = has_video ? t('campaigns.admin.edit_video') : t('campaigns.admin.add_video') %>
|
|
|
|
<% if @campaign.vimeo_video_id %>
|
|
<div class='campaignMedia-video' if-branded='background, lightest'>
|
|
<iframe src="https://player.vimeo.com/video/<%= @campaign.vimeo_video_id %>" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
|
</div>
|
|
<% elsif @campaign.youtube_video_id %>
|
|
<div class='campaignMedia-video' if-branded='background, lightest'>
|
|
<%= render 'components/media/youtube_iframe', id: @campaign.youtube_video_id %>
|
|
</div>
|
|
<% elsif @campaign.main_image.attached? %>
|
|
<%= image_tag @campaign.main_image_by_size(:normal), class: 'campaignMedia-image' %>
|
|
<% end %>
|
|
</div>
|