Improve feed image styles and move image to right

This commit is contained in:
decabeza
2019-03-05 00:02:49 +01:00
parent 0e1bf2188c
commit 05e4c344f2
2 changed files with 7 additions and 7 deletions

View File

@@ -2766,15 +2766,15 @@ table {
display: inline-block; display: inline-block;
height: rem-calc(120); height: rem-calc(120);
overflow: hidden; overflow: hidden;
width: 100%;
@include breakpoint(medium) { @include breakpoint(medium) {
height: rem-calc(96); height: rem-calc(96);
} }
img { img {
margin-left: rem-calc(-15);
max-width: none; max-width: none;
width: rem-calc(120); width: 100%;
} }
} }

View File

@@ -9,6 +9,11 @@
<% feed.items.each do |item| %> <% feed.items.each do |item| %>
<div class="<%= item.class.to_s.parameterize('_') %> row"> <div class="<%= item.class.to_s.parameterize('_') %> row">
<div class="feed-description small-12 column
<%= 'medium-6 large-9' if item.image.present? %>">
<strong><%= link_to item.title, url_for(item) %></strong><br>
<p><%= item.summary %></p>
</div>
<% if item.image.present? %> <% if item.image.present? %>
<div class="small-12 medium-6 large-3 column"> <div class="small-12 medium-6 large-3 column">
<div class="feed-image"> <div class="feed-image">
@@ -17,11 +22,6 @@
</div> </div>
</div> </div>
<% end %> <% end %>
<div class="feed-description small-12 medium-6 large-9 column
<%= item.image.present? ? '' : 'medium-offset-6 large-offset-3' %>">
<strong><%= link_to item.title, url_for(item) %></strong><br>
<p><%= item.summary %></p>
</div>
</div> </div>
<% end %> <% end %>
</div> </div>