includes poll image on polls index
This commit is contained in:
@@ -1629,6 +1629,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.image-container {
|
||||||
|
background: #fafafa;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.poll {
|
||||||
|
|
||||||
|
&.with-image {
|
||||||
|
padding: 0 $line-height / 2 0 0;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 100%;
|
||||||
|
max-width: none;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.poll,
|
.poll,
|
||||||
.poll-question {
|
.poll-question {
|
||||||
border: 1px solid $border;
|
border: 1px solid $border;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<% poll_group.each do |poll| %>
|
<% poll_group.each do |poll| %>
|
||||||
<div class="poll">
|
<div class="poll with-image">
|
||||||
<% if poll.answerable_by?(current_user) && poll.votable_by?(current_user) %>
|
<% if poll.answerable_by?(current_user) && poll.votable_by?(current_user) %>
|
||||||
<%= link_to poll,
|
<%= link_to poll,
|
||||||
class: "icon-poll-answer can-answer",
|
class: "icon-poll-answer can-answer",
|
||||||
@@ -34,10 +34,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="row" data-equalizer>
|
<div class="row" data-equalizer>
|
||||||
<div class="small-12 medium-3 column" data-equalizer-watch>
|
<div class="small-12 medium-3 column">
|
||||||
<!-- PENDING TO REPLACE THIS BLOCK WITH POLL MAIN IMAGE -->
|
<div class="image-container" data-equalizer-watch>
|
||||||
<div style="background: #eee; width: 100%; height: 100%; display: block; margin: -12px;"> </div>
|
<% if poll.image.present? %>
|
||||||
<!-- /. PENDING TO REPLACE THIS BLOCK WITH POLL MAIN IMAGE -->
|
<%= image_tag poll.image_url(:large), alt: poll.image.title %>
|
||||||
|
<% else %>
|
||||||
|
<div class="no-image"></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="small-12 medium-6 column" data-equalizer-watch>
|
<div class="small-12 medium-6 column" data-equalizer-watch>
|
||||||
<div class="dates"></div>
|
<div class="dates"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user