docbrown/app/views/users/_main_feed.html.erb
Ben Halpern dcbb188cf1
Add pinned articles box to profiles (#3269)
* Initial pins work

* Add pin box to profiles

* Fix test snapshot spacing and optimize svg

* Fix listings spacing
2019-06-24 15:18:29 -04:00

21 lines
772 B
Text

<% if @pinned_stories.any? %>
<div class="pinned-articles">
<div class="pinned-articles-indicator"><img src="<%= asset_path("pushpin.svg") %>" alt="pin" /> Pinned</div>
<% @pinned_stories.each do |story| %>
<%= render "articles/single_story", story: story %>
<% end %>
</div>
<% end %>
<% @stories.each_with_index do |story, i| %>
<%= render "articles/single_story", story: story %>
<% if i == 0 && @comments.any? %>
<%= render "users/comments_section" %>
<% end %>
<% end %>
<% if !@stories.any? && @comments.any? %>
<%= render "users/comments_section" %>
<% end %>
<% if @stories.size > 1 %>
<div class="placeholder-div"></div>
<% end %>
<div class="single-article-small-pic" id="article-index-hidden-div" style="display:none"></div>