Adds gradient overlapping card image

This commit is contained in:
decabeza
2018-06-22 18:01:12 +02:00
parent c710e31b4a
commit 79eea245a4
2 changed files with 16 additions and 0 deletions

View File

@@ -2667,6 +2667,21 @@ table {
padding: $line-height / 2 0;
}
}
.figure-card {
figcaption {
z-index: 3;
}
.gradient {
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.01) 1%, rgba(0, 0, 0, 1) 100%);
height: 100%;
position: absolute;
width: 100%;
z-index: 2;
}
}
}
.feeds-list {

View File

@@ -1,6 +1,7 @@
<div id="<%= dom_id(card) %>" class="card small-12 medium-6 column margin-bottom end <%= 'large-4' unless feed_processes_enabled? %>" data-equalizer-watch>
<%= link_to card.link_url do %>
<figure class="figure-card">
<div class="gradient"></div>
<% if card.image.present? %>
<%= image_tag(card.image_url(:large), alt: card.image.title) %>
<% end %>