* Ensure spam doesn't hit logged-out /latest * Restore load-bearing constant * Narrow selector avoids the new 'latest' banner * Test scenario for signed-in low-score content * Remove false-negative test * Actual test for the logged-in scenario * Signed-in users get poor quality content * Feeds (RSS) use an entirely different query * Pass @stories * Update tests with new minimum score
38 lines
1.4 KiB
Text
38 lines
1.4 KiB
Text
<% if should_show_latest_spam_suppression?(@stories) %>
|
|
<div class="crayons-story">
|
|
<p class="crayons-story__body">
|
|
<%= t "views.articles.sign_in_for_full_latest_html",
|
|
link: sign_up_path(state: "new-user") %>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if @pinned_article %>
|
|
<%= render partial: "articles/single_story", locals: { story: @pinned_article, pinned: true, featured: @pinned_article.id == @featured_story.id } %>
|
|
<% end %>
|
|
|
|
<% if @featured_story.id && @pinned_article&.id != @featured_story.id %>
|
|
<%= render partial: "articles/single_story", locals: { story: @featured_story, featured: true, pinned: false } %>
|
|
<% end %>
|
|
|
|
<div id="article-index-podcast-div"></div>
|
|
|
|
<div class="substories" id="substories">
|
|
<% if @stories.any? %>
|
|
<% @stories.each_with_index do |story, i| %>
|
|
<% next if story.id == @featured_story.id %>
|
|
<% next if story.id == @pinned_article&.id %>
|
|
|
|
<% if !user_signed_in? && i == 4 %>
|
|
<%= render "stories/sign_in_invitation" %>
|
|
<% end %>
|
|
<%= render partial: "articles/single_story", locals: { story: story, featured: false, pinned: false } %>
|
|
<% 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>
|
|
<% end %>
|
|
</div>
|
|
|
|
<%= javascript_packs_with_chunks_tag "homePageFeedShortcuts", "feedPreviewCards", defer: true %>
|