Skip to content

Commit

Permalink
[BUGFIX] add video (internal, vimeo, youtube) support for different n…
Browse files Browse the repository at this point in the history
…ews list views (#501)

* [BUGFIX] Video (internal, vimeo, youtube) added to news list view needs styling.

* [BUGFIX] Video (internal, vimeo, youtube) added to news list view needs styling. #2

* [BUGFIX] Video (internal, vimeo, youtube) added to news list view needs styling. #3

* [BUGFIX] reverse use of MediaVideoObjectFit in MediaContainer
  • Loading branch information
pxamike authored and dmh committed Apr 8, 2019
1 parent 3422e9d commit 45cc3c3
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers">
<div class="mediaelement">
<div class="mediaelement-video">
<f:media class="object-fit" file="{mediaElement}" width="{settings.detail.media.video.width}" height="{settings.detail.media.video.height}"/>
</div>

<f:if condition="{mediaElement.description}">
<div class="medialement-alternative-content">
<p class="news-img-caption">
{mediaElement.description}
</p>
</div>
</f:if>
</div>
</html>
5 changes: 4 additions & 1 deletion Resources/Private/Extensions/News/Partials/List/Cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
</div>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 4">
<f:media file="{mediaElement}" additionalConfig="{loop: '0', autoplay: '0'}"/>
<div class="news-cards__media-preview"
style="height:{f:if(condition:settings.media.maxHeight, then: settings.media.maxHeight, else: settings.list.media.image.maxHeight)}px">
<f:media file="{mediaElement}" width="768" class="object-fit" additionalConfig="{loop: '0', autoplay: '0'}"/>
</div>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 5">
<div class="news-cards__media-preview"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
</div>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 4">
<f:render partial="Detail/MediaVideo" arguments="{mediaElement: mediaElement}"/>
<div class="news-carousel__media-preview">
<f:render partial="Detail/MediaVideoObjectFit" arguments="{mediaElement: mediaElement}"/>
</div>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 5">
<div class="news-carousel__media-preview">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@
<f:alias map="{mediaElement: '{newsItem.mediaPreviews.0}'}">
<f:if condition="{mediaElement.originalResource.type} == 2">
<div class="news-simple-list__media-preview">
<f:media file="{mediaElement}" class="object-fit"/>
<f:media file="{mediaElement}" class="object-fit" />
</div>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 4">
<f:media file="{mediaElement}" additionalConfig="{loop: '0', autoplay: '0'}" />
<div class="news-simple-list__media-preview">
<f:media file="{mediaElement}" class="object-fit" additionalConfig="{loop: '0', autoplay: '0'}" />
</div>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 5">
<div class="news-simple-list__media-preview">
<f:media file="{mediaElement}" class="object-fit"/>
<f:media file="{mediaElement}" class="object-fit" />
</div>
</f:if>
</f:alias>
Expand Down
8 changes: 5 additions & 3 deletions Resources/Private/Extensions/News/Partials/List/Timeline.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,17 @@ <h2 class="news-timeline__header">{currentYear}</h2>
<f:alias map="{mediaElement: '{newsItem.mediaPreviews.0}'}">
<f:if condition="{mediaElement.originalResource.type} == 2">
<div class="news-timeline__media-preview">
<f:media file="{mediaElement}" class="object-fit"/>
<f:media file="{mediaElement}" class="object-fit" />
</div>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 4">
<f:media file="{mediaElement}" additionalConfig="{loop: '0', autoplay: '0'}" />
<div class="news-timeline__media-preview">
<f:media file="{mediaElement}" class="object-fit" additionalConfig="{loop: '0', autoplay: '0'}" />
</div>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 5">
<div class="news-timeline__media-preview">
<f:media file="{mediaElement}" class="object-fit"/>
<f:media file="{mediaElement}" class="object-fit" />
</div>
</f:if>
</f:alias>
Expand Down
9 changes: 8 additions & 1 deletion Resources/Public/css/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion Resources/Public/less/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -3952,6 +3952,12 @@
clear: both;
}

.news iframe,
.news video {
border: 0;
display: block;
}

.news .nav ul {
float: left;
display: inline;
Expand Down Expand Up @@ -4491,7 +4497,9 @@
.news-carousel__media-preview {
margin-bottom: 20px;

img {
img,
iframe,
video {
min-height: 180px;
}
}
Expand Down
6 changes: 6 additions & 0 deletions felayout_t3kit/dev/styles/main/plugins/news/news.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
clear: both;
}

.news iframe,
.news video {
border: 0;
display: block;
}

.news .nav ul {
float: left;
display: inline;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
.news-carousel__media-preview {
margin-bottom: 20px;

img {
img,
iframe,
video {
min-height: 180px;
}
}
Expand Down

0 comments on commit 45cc3c3

Please sign in to comment.