Skip to content

Commit

Permalink
[BUGFIX] revert - news extension list view: update no-image-markup (#380
Browse files Browse the repository at this point in the history
)
  • Loading branch information
dmh committed Feb 16, 2018
1 parent bd63164 commit 288c495
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
12 changes: 6 additions & 6 deletions Resources/Private/Extensions/News/Partials/List/SimpleList.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
<f:if condition="{newsItem.mediaPreviews}">
<!-- media preview element -->
<f:then>
<div class="col-12 col-sm-3 news-simple-list__media-preview">
<div class="col-12 col-sm-3 news-simple-list__media-preview">
<n:link newsItem="{newsItem}" settings="{settings}" additionalAttributes="{aria-label: '{f:translate(key:\'news.more-link.linktext\', extensionName:\'Theme_t3kit\')}{newsItem.title}'}" title="{f:translate(key:'news.more-link.linktext', extensionName:'Theme_t3kit')}{newsItem.title}">
<f:alias map="{mediaElement: '{newsItem.mediaPreviews.0}'}">
<f:if condition="{mediaElement.originalResource.type} == 2">
<f:media file="{mediaElement}" width="270"/>
<f:media file="{mediaElement}" width="270"/>
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 4">
<f:media file="{mediaElement}" additionalConfig="{loop: '0', autoplay: '0'}" />
</f:if>
<f:if condition="{mediaElement.originalResource.type} == 5">
<f:media file="{mediaElement}" width="270"/>
<f:media file="{mediaElement}" width="270"/>
</f:if>
</f:alias>
</n:link>
Expand All @@ -44,9 +44,9 @@
<f:else>
<f:if condition="{settings.displayDummyIfNoMedia}">
<div class="news-simple-list__img-wrap col-12 col-sm-3">
<n:link class="no-media-element" newsItem="{newsItem}" settings="{settings}" title="{f:translate(key:'news.more-link.linktext', extensionName:'Theme_t3kit')}{newsItem.title}">
<f:image src="{settings.list.media.dummyImage}" additionalAttributes="{role: 'presentation'}" class="img-responsive" title="" alt="" maxWidth="270"/>
</n:link>
<div class="no-media-element">
<div class="news-simple-list__media-preview" style="background-image:url('{f:uri.image(src: settings.list.media.dummyImage, treatIdAsReference: 1)}');"></div>
</div>
</div>
</f:if>
</f:else>
Expand Down
10 changes: 1 addition & 9 deletions felayout_t3kit/dev/styles/main/plugins/news/newsSimpleList.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,15 @@
flex-direction: column;
min-height: 266px;

img {
.img-responsive {
margin-bottom: 15px;
max-width: 100%;
}

a {
display: inline-block;
}
}

// max-width:100% is not working in IE so we can set the image width to 100% here
.IE {
.news-simple-list__item img {
width: 100%;
}
}

// use custom width instead of bootstrap media query;
// evaluated by testing the ideal value
@media (min-width: 540px) {
Expand Down

0 comments on commit 288c495

Please sign in to comment.