_layouts/feature.html in appscms-tools-theme-3.4.3 vs _layouts/feature.html in appscms-tools-theme-3.4.4
- old
+ new
@@ -255,14 +255,28 @@
<div class="col-md-9 mx-auto">
<div class="row">
{%- endif -%}
<div class="col-md-6 order-0">
- {%- if featureData.HOW_TO_CONTENT.YoutubeVideoUrl -%}
+ {%- if featureData.HOW_TO_CONTENT.YoutubeVideoUrl.size > 0 -%}
<div class="how-to-video-wrapper">
- <iframe width="500" height="315" src="https://www.youtube.com/embed/{{featureData.HOW_TO_CONTENT.YoutubeVideoUrl}}?autoplay=1&mute=1">
+ {% assign video_url = featureData.HOW_TO_CONTENT.YoutubeVideoUrl %}
+ {% assign params = video_url | split: "?" | last | split: "&" %}
+ {% for param in params %}
+ {% if param contains "v=" %}
+ {% assign video_id = param | split: "=" | last %}
+ {% endif %}
+ {% endfor %}
+
+ {%- if site.monumetricId -%}
+ <iframe class="mb-5" width="400" height="315" src="https://www.youtube.com/embed/{{video_id}}?autoplay=1&mute=1" allowfullscreen>
</iframe>
+ {%- else -%}
+ <iframe class="mb-5" width="500" height="315" src="https://www.youtube.com/embed/{{video_id}}?autoplay=1&mute=1" allowfullscreen>
+ </iframe>
+ {%- endif -%}
+
</div>
{%- else -%}
<div class="how-to-img-wrapper">
<img class="how-to-leftimg" height="180px" width="300px"
src="{{featureData.HOW_TO_CONTENT.logoImageUrl}}" loading="lazy"
@@ -329,11 +343,11 @@
</div>
</div>
</div>
</div>
</section>
- {%- endif -%} {%- endif -%} {%- include share/socialshare.html -%}
- {%- include Rating/rating.html -%}
+ {%- endif -%} {%- endif -%} {%- include share/socialshare.html -%}
+ {%- include Rating/rating.html -%}
{%- if featureData.infographics.size > 0 -%}
{%- include infographics/infographics.html -%}
{%- endif -%}
{%- include /Usp/usp.html -%} {%- if
featureData.display_formats -%}
\ No newline at end of file