Skip to content

Commit

Permalink
move alerts to inside of page content
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshull committed Jul 15, 2024
1 parent 5643e1a commit c46dfa0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion lib/dotcom_web/templates/alert/_item.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
<%= if @alert.description do %>
<div class="c-alert-item__bottom c-alert-item__bottom--<%= @alert.priority %>">
<%= if @alert.image do %>
<img src="<%= @alert.image %>" alt="<%= @alert.image_alternative_text %>" class="w-100" />
<a href="<%= @alert.image %>" target="_blank">
<img src="<%= @alert.image %>" alt="<%= @alert.image_alternative_text %>" class="w-100" />
</a>
<% end %>
<div class="c-alert-item__description">
<%= format_alert_description(@alert.description) %>
Expand Down
4 changes: 0 additions & 4 deletions lib/dotcom_web/templates/cms/page/_diversions.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<%# Main Content %>
<div class="c-cms__body">
<%= render_page_content(@page, @conn) %>

<hr />

<%= DotcomWeb.AlertView.render("group.html", alerts: Map.get(@conn.assigns, :alerts, []), date_time: Map.get(@conn.assigns, :date_time, Timex.now())) %>
</div>

<%# Sidebar Right %>
Expand Down
2 changes: 2 additions & 0 deletions lib/dotcom_web/templates/cms/page/_generic.html.eex
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="page-section">
<%= Dotcom.ContentRewriter.rewrite(@page.body, @conn) %>

<%= DotcomWeb.AlertView.render("group.html", alerts: Map.get(@conn.assigns, :alerts, []), date_time: Map.get(@conn.assigns, :date_time, Timex.now())) %>

<%= for paragraph <- @page.paragraphs do %>
<%= render_paragraph(paragraph, @conn) %>
<% end %>
Expand Down

0 comments on commit c46dfa0

Please sign in to comment.