<%= number[:label] %>:
<%= number[:number] %>
<%= number[:label] %>:
<%= number[:number] %>
diff --git a/app/assets/stylesheets/views/_contact.scss b/app/assets/stylesheets/views/_contact.scss index 30853e764..1c94c339e 100644 --- a/app/assets/stylesheets/views/_contact.scss +++ b/app/assets/stylesheets/views/_contact.scss @@ -2,4 +2,13 @@ .add-title-margin { @include responsive-top-margin; } + + // FIXME: Overrides specific govspeak heading styles while h3s & h4s look similar + // Govspeak component renders h3s and h4s at the same font size with different margins + // Reduce the visual importance of specific h4s by making them a normal font weight. + // This gives content correct visual hierarchy and semantics + // `normal-weight` is not a class used by the govspeak component + .govuk-govspeak .normal-weight { + font-weight: normal; + } } diff --git a/app/presenters/contact_presenter.rb b/app/presenters/contact_presenter.rb index 251a3d5c7..91331c5c9 100644 --- a/app/presenters/contact_presenter.rb +++ b/app/presenters/contact_presenter.rb @@ -72,7 +72,7 @@ def phone end def phone_body - content_item["details"]["more_info_phone_number"].html_safe + content_item.dig("details", "more_info_phone_number").try(:html_safe) end def post @@ -95,7 +95,7 @@ def post end def post_body - content_item["details"]["more_info_post_address"].html_safe + content_item.dig("details", "more_info_post_address").try(:html_safe) end def email @@ -112,7 +112,7 @@ def email end def email_body - content_item["details"]["more_info_email_address"].html_safe + content_item.dig("details", "more_info_email_address").try(:html_safe) end def show_webchat? diff --git a/app/views/content_items/contact.html.erb b/app/views/content_items/contact.html.erb index 1bd2997ba..48c2412b1 100644 --- a/app/views/content_items/contact.html.erb +++ b/app/views/content_items/contact.html.erb @@ -44,27 +44,26 @@ <% if @content_item.phone.any? %>
<%= number[:label] %>:
<%= number[:number] %>
<%= number[:label] %>:
<%= number[:number] %>