Skip to content

Commit

Permalink
[TASK] add possibility to adjust image height using Max height input …
Browse files Browse the repository at this point in the history
…in news ext (News Carousel)
  • Loading branch information
ajdin99 authored and dmh committed Jan 22, 2019
1 parent 156833c commit a4d9d3b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
<f:alias map="{mediaElement: '{newsItem.mediaPreviews.0}'}">
<f:if condition="{mediaElement.originalResource.type} == 2">
<div class="news-carousel__media-preview">
<f:media file="{mediaElement}" class="object-fit"/>
<f:media file="{mediaElement}" class="object-fit" style="height:{f:if(condition:settings.media.maxHeight, then: settings.media.maxHeight, else: settings.list.media.image.maxHeight)}px"/>
</div>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 4">
<f:render partial="Detail/MediaVideo" arguments="{mediaElement: mediaElement}"/>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 5">
<div class="news-carousel__media-preview">
<f:media file="{mediaElement}" class="object-fit"/>
<f:media file="{mediaElement}" class="object-fit" style="height:{f:if(condition:settings.media.maxHeight, then: settings.media.maxHeight, else: settings.list.media.image.maxHeight)}px"/>
</div>
</f:if>
</f:alias>
Expand Down Expand Up @@ -54,7 +54,7 @@
<div class="no-media-element" aria-hidden="true">
<n:link newsItem="{newsItem}" settings="{settings}" title="{newsItem.title}">
<div class="news-carousel__media-preview">
<f:image src="{settings.list.media.dummyImage}" class="img-responsive object-fit" title="" alt="" />
<f:image src="{settings.list.media.dummyImage}" class="img-responsive object-fit" title="" alt="" style="height:{f:if(condition:settings.media.maxHeight, then: settings.media.maxHeight, else: settings.list.media.image.maxHeight)}px" />
</div>
</n:link>
</div>
Expand Down

0 comments on commit a4d9d3b

Please sign in to comment.