* Migrate to esbuild WIP * Add exclude * Remove redundant file * Move file * Move to javascript_include_tag * Lint fix * WIP * WIP * Add watch mode to esbuild WIP * Get jest working * Remove babel * Revert "Remove babel" This reverts commit 6da35260aa19d6f97f586deb66c0ecaf48433b73. * More WIP * Got image to load * WIP * Resolve audit * Lint fix * WIP * Fix jest spec * [CI] Remove asset-restore for test build stage * Production compliant * Temp disable sourcemap * Update glob * Add esbuild helper to stimulus * Import fragment * Temp disable coverage to see failing tests * Fix broken spec * Address lint * Set proper es6 target * Use esbuild for everything * wait what * Revert "Set proper es6 target" This reverts commit 98f5278093421baa8ffe2ca580845b01c1a1eadf. * Revert "Use esbuild for everything" This reverts commit 0ac46738f07ffcb6af095ccb1ffa5e439b7fefa3. * Replace uglifier with terser * New compiled assets version * Remvoe honeybadger-io/webpack * Remove cypress coverage checks for now * Update jsconfig.json * Update docker-compose * Remove public/packs-test from ci cache
64 lines
2.8 KiB
Text
64 lines
2.8 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 !user_signed_in? %>
|
|
<% @sidebar_billboard_first = Billboard.for_display(area: "feed_first", user_signed_in: user_signed_in?) %>
|
|
<% if @sidebar_billboard_first %>
|
|
<%= render partial: "shared/billboard", locals: { billboard: @sidebar_billboard_first, data_context_type: BillboardEvent::CONTEXT_TYPE_HOME } %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%# This second-billboard should be shown between 2nd and 3rd article. %>
|
|
<% second_billboard_position = 2 %>
|
|
|
|
<% if @pinned_article %>
|
|
<% second_billboard_position -= 1 %>
|
|
<%= 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 %>
|
|
<% second_billboard_position -= 1 %>
|
|
<%= render partial: "articles/single_story", locals: { story: @featured_story, featured: true, pinned: false } %>
|
|
<% end %>
|
|
|
|
<div id="article-index-podcast-div"></div>
|
|
|
|
<%# This third-billboard should be shown between 7th and 8th article. %>
|
|
<% third_billboard_position = second_billboard_position + 5 %>
|
|
|
|
<div class="substories" id="substories">
|
|
<% if @stories.any? %>
|
|
<% @stories.each_with_index do |story, i| %>
|
|
<% if !user_signed_in? && i == second_billboard_position %>
|
|
<% @sidebar_billboard_second = Billboard.for_display(area: "feed_second", user_signed_in: user_signed_in?) %>
|
|
<% if @sidebar_billboard_second %>
|
|
<%= render partial: "shared/billboard", locals: { billboard: @sidebar_billboard_second, data_context_type: BillboardEvent::CONTEXT_TYPE_HOME } %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<% if !user_signed_in? && i == third_billboard_position %>
|
|
<% @sidebar_billboard_third = Billboard.for_display(area: "feed_third", user_signed_in: user_signed_in?) %>
|
|
<% if @sidebar_billboard_third %>
|
|
<%= render partial: "shared/billboard", locals: { billboard: @sidebar_billboard_third, data_context_type: BillboardEvent::CONTEXT_TYPE_HOME } %>
|
|
<% end %>
|
|
<% end %>
|
|
<% if story.id != @featured_story.id && story.id != @pinned_article&.id %>
|
|
<%= render partial: "articles/single_story", locals: { story: story, featured: false, pinned: false } %>
|
|
<% else %>
|
|
<% third_billboard_position += 1 %>
|
|
<% end %>
|
|
<% 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_include_tag "homePageFeedShortcuts", "feedPreviewCards", defer: true %>
|