diff --git a/app/assets/stylesheets/billboards.scss b/app/assets/stylesheets/billboards.scss index 89685b5f8..8f0b14aba 100644 --- a/app/assets/stylesheets/billboards.scss +++ b/app/assets/stylesheets/billboards.scss @@ -88,6 +88,17 @@ display: none; } +.body-billboard { + @media (max-width: $breakpoint-s) { + margin: 0 -4px 0; + padding: 7px 6px !important; + } + @media (min-width: $breakpoint-m) { + margin: 0 -14px 0; + } + +} + .hero-billboard { margin: var(--su-2) 0 0; h1, diff --git a/app/javascript/packs/admin/billboards.jsx b/app/javascript/packs/admin/billboards.jsx index eaa0057b5..60c1bb7e9 100644 --- a/app/javascript/packs/admin/billboards.jsx +++ b/app/javascript/packs/admin/billboards.jsx @@ -143,7 +143,9 @@ document.ready.then(() => { const articleSpecificPlacement = ['post_comments', 'post_sidebar', 'post_fixed_bottom']; const targetedTagPlacements = [ 'post_fixed_bottom', + 'post_body_bottom', 'post_comments', + 'post_comments_mid', 'post_sidebar', 'sidebar_right', 'sidebar_right_second', diff --git a/app/models/billboard.rb b/app/models/billboard.rb index cd5034424..bc74e733e 100644 --- a/app/models/billboard.rb +++ b/app/models/billboard.rb @@ -17,8 +17,10 @@ class Billboard < ApplicationRecord home_hero page_fixed_bottom post_fixed_bottom + post_body_bottom post_sidebar post_comments + post_comments_mid digest_first digest_second].freeze ALLOWED_PLACEMENT_AREAS_HUMAN_READABLE = ["Sidebar Left (First Position)", @@ -32,8 +34,10 @@ class Billboard < ApplicationRecord "Home Hero", "Fixed Bottom (Page)", "Fixed Bottom (Individual Post)", + "Below the post body", "Sidebar Right (Individual Post)", "Below the comment section", + "Midway through the comment section", "Digest Email First", "Digest Email Second"].freeze diff --git a/app/views/articles/_full_comment_area.html.erb b/app/views/articles/_full_comment_area.html.erb index ad69d25d5..c54f1ea1f 100644 --- a/app/views/articles/_full_comment_area.html.erb +++ b/app/views/articles/_full_comment_area.html.erb @@ -59,6 +59,7 @@
<% if @article.comments_count > 0 %> + <% @current_comment_index = 0 %> <%= render partial: "articles/comment_tree", collection: article_comment_tree(@article, @comments_to_show_count, @comments_order), as: :comment_node, diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index 3a65d3dcb..ae94628e3 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -195,6 +195,9 @@ collection: @collection, articles: @collection_articles %> <% end %> + <% if @article.long_markdown? %> +
+ <% end %>
<%= render "articles/full_comment_area" %> diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index 924ceceb4..26ae97e65 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -1,4 +1,8 @@ <% if comment && comment.user %> + <% if @current_comment_index.to_i > 6 && !@shown_billboard && comment.depth.zero? %> +
+ <% @shown_billboard = true %> + <% end %> <% if comment.depth < 3 %>
+
+ <%= render partial: "shared/billboard_header", locals: { billboard: billboard } %> +
+ <%= billboard.processed_html.html_safe %> +
+
<% else %>