-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Services and information and Featured sections are now in a grid layout. Font size of the header of the promotion slot cards has been changed to 's', the same size as those in the Services and information section. This is part of a live test of several incremental changes being made to the homepage.
- Loading branch information
1 parent
55d69d5
commit ab3f8f1
Showing
6 changed files
with
174 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,111 @@ | ||
<section class="homepage-section homepage-section__government-activity"> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full govuk-grid-column-two-thirds-from-desktop" data-module="gem-track-click ga4-link-tracker"> | ||
<div class="homepage-section__heading"> | ||
<div class="homepage-section__heading-wrapper"> | ||
<div class="homepage-section__container"> | ||
<div class="homepage-section__heading"> | ||
<div class="homepage-section__heading-wrapper"> | ||
<%= render "govuk_publishing_components/components/heading", { | ||
font_size: "m", | ||
text: t("homepage.index.government_activity"), | ||
data_attributes: { | ||
ga4_scroll_marker: true, | ||
}, | ||
} %> | ||
</div> | ||
|
||
<%= render "govuk_publishing_components/components/lead_paragraph", { | ||
text: t("homepage.index.government_activity_description"), | ||
margin_bottom: 0 | ||
} %> | ||
</div> | ||
|
||
<ul class="homepage-services-and-info__list"> | ||
<% t("homepage.government_activity").each_with_index do | item, index | %> | ||
<%= render partial: "homepage/chevron_card", locals: { | ||
description: item[:description], | ||
link: item[:link], | ||
title: item[:title], | ||
track_action: "governmentactivityLink", | ||
index_values: { | ||
index_section: 3, | ||
index_link: index + 1, | ||
index_section_count: 6, | ||
}, | ||
index_total: t("homepage.government_activity").length, | ||
section: t("homepage.index.government_activity", locale: :en) | ||
} %> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
<div class="govuk-grid-column-full govuk-grid-column-one-third-from-desktop"> | ||
<div class="homepage-section__heading"> | ||
<%= render "govuk_publishing_components/components/heading", { | ||
font_size: "m", | ||
text: t("homepage.index.government_activity"), | ||
text: t("homepage.index.departments_and_organisations"), | ||
data_attributes: { | ||
ga4_scroll_marker: true, | ||
}, | ||
} %> | ||
</div> | ||
|
||
<%= render "govuk_publishing_components/components/lead_paragraph", { | ||
text: t("homepage.index.government_activity_description"), | ||
margin_bottom: 0 | ||
} %> | ||
</div> | ||
|
||
<ul class="homepage-services-and-info__list"> | ||
<% t("homepage.government_activity").each_with_index do | item, index | %> | ||
<%= render partial: "homepage/chevron_card", locals: { | ||
description: item[:description], | ||
link: item[:link], | ||
title: item[:title], | ||
track_action: "governmentactivityLink", | ||
index_values: { | ||
index_section: 3, | ||
index_link: index + 1, | ||
index_section_count: 6, | ||
<%# | ||
The "big number" component links below are hardcoded separately (i.e. not in a loop in this instance) and therefore their 'index' properties are also hardcoded. If a new "big number" component is added or removed, this will need to be reflected in the 'index_link' and 'index_total' properties to ensure that they remain accurate for tracking/analytics purposes. | ||
%> | ||
<div class="homepage-section__depts" data-module="gem-track-click ga4-link-tracker"> | ||
<%= render "govuk_publishing_components/components/big_number", { | ||
number: t("homepage.index.ministerial_departments_count"), | ||
label: t("homepage.index.ministerial_departments"), | ||
href: "/government/organisations#ministerial_departments", | ||
margin_bottom: 6, | ||
data_attributes: { | ||
"track-category": "homepageClicked", | ||
"track-action": "departmentsLink", | ||
"track-label": "/government/organisations#ministerial_departments", | ||
"track-dimension": "#{t("homepage.index.ministerial_departments_count")} #{t("homepage.index.ministerial_departments")}", | ||
"track-dimension-index": 29, | ||
"track-value": 1, | ||
"ga4_link": { | ||
"event_name": "navigation", | ||
"type": "homepage", | ||
"index": { | ||
"index_section": 4, | ||
"index_link": 1, | ||
"index_section_count": 6, | ||
}, | ||
"index_total": 2, | ||
"section": t("homepage.index.departments_and_organisations", locale: :en), | ||
"text": "#{t("homepage.index.ministerial_departments_count")} #{t("homepage.index.ministerial_departments", locale: :en)}" | ||
} | ||
}, | ||
index_total: t("homepage.government_activity").length, | ||
section: t("homepage.index.government_activity", locale: :en) | ||
} %> | ||
<% end %> | ||
</ul> | ||
</div> | ||
|
||
<div class="govuk-grid-column-full govuk-grid-column-one-third-from-desktop"> | ||
<div class="homepage-section__heading"> | ||
<%= render "govuk_publishing_components/components/heading", { | ||
font_size: "m", | ||
text: t("homepage.index.departments_and_organisations"), | ||
data_attributes: { | ||
ga4_scroll_marker: true, | ||
}, | ||
} %> | ||
</div> | ||
|
||
<%# | ||
The "big number" component links below are hardcoded separately (i.e. not in a loop in this instance) and therefore their 'index' properties are also hardcoded. If a new "big number" component is added or removed, this will need to be reflected in the 'index_link' and 'index_total' properties to ensure that they remain accurate for tracking/analytics purposes. | ||
%> | ||
<div class="homepage-section__depts" data-module="gem-track-click ga4-link-tracker"> | ||
<%= render "govuk_publishing_components/components/big_number", { | ||
number: t("homepage.index.ministerial_departments_count"), | ||
label: t("homepage.index.ministerial_departments"), | ||
href: "/government/organisations#ministerial_departments", | ||
margin_bottom: 6, | ||
data_attributes: { | ||
"track-category": "homepageClicked", | ||
"track-action": "departmentsLink", | ||
"track-label": "/government/organisations#ministerial_departments", | ||
"track-dimension": "#{t("homepage.index.ministerial_departments_count")} #{t("homepage.index.ministerial_departments")}", | ||
"track-dimension-index": 29, | ||
"track-value": 1, | ||
"ga4_link": { | ||
"event_name": "navigation", | ||
"type": "homepage", | ||
"index": { | ||
"index_section": 4, | ||
"index_link": 1, | ||
"index_section_count": 6, | ||
}, | ||
"index_total": 2, | ||
"section": t("homepage.index.departments_and_organisations", locale: :en), | ||
"text": "#{t("homepage.index.ministerial_departments_count")} #{t("homepage.index.ministerial_departments", locale: :en)}" | ||
} | ||
}, | ||
} %> | ||
<%= render "govuk_publishing_components/components/big_number", { | ||
number: t("homepage.index.other_agencies_count"), | ||
label: t("homepage.index.other_agencies"), | ||
href: "/government/organisations#agencies_and_other_public_bodies", | ||
margin_bottom: 6, | ||
data_attributes: { | ||
"track-category": "homepageClicked", | ||
"track-action": "departmentsLink", | ||
"track-label": "/government/organisations#agencies_and_other_public_bodies", | ||
"track-dimension": "#{t("homepage.index.other_agencies_count")} #{t("homepage.index.other_agencies")}", | ||
"track-dimension-index": 29, | ||
"track-value": 1, | ||
"ga4_link": { | ||
"event_name": "navigation", | ||
"type": "homepage", | ||
"index": { | ||
"index_section": 4, | ||
"index_link": 2, | ||
"index_section_count": 6, | ||
}, | ||
"index_total": 2, | ||
"section": t("homepage.index.departments_and_organisations", locale: :en), | ||
"text": "#{t("homepage.index.other_agencies_count")} #{t("homepage.index.other_agencies", locale: :en)}" | ||
} | ||
}, | ||
} %> | ||
</div> | ||
</div> | ||
<%= render "govuk_publishing_components/components/big_number", { | ||
number: t("homepage.index.other_agencies_count"), | ||
label: t("homepage.index.other_agencies"), | ||
href: "/government/organisations#agencies_and_other_public_bodies", | ||
margin_bottom: 6, | ||
data_attributes: { | ||
"track-category": "homepageClicked", | ||
"track-action": "departmentsLink", | ||
"track-label": "/government/organisations#agencies_and_other_public_bodies", | ||
"track-dimension": "#{t("homepage.index.other_agencies_count")} #{t("homepage.index.other_agencies")}", | ||
"track-dimension-index": 29, | ||
"track-value": 1, | ||
"ga4_link": { | ||
"event_name": "navigation", | ||
"type": "homepage", | ||
"index": { | ||
"index_section": 4, | ||
"index_link": 2, | ||
"index_section_count": 6, | ||
}, | ||
"index_total": 2, | ||
"section": t("homepage.index.departments_and_organisations", locale: :en), | ||
"text": "#{t("homepage.index.other_agencies_count")} #{t("homepage.index.other_agencies", locale: :en)}" | ||
} | ||
}, | ||
} %> | ||
</div> | ||
</div> | ||
</div> | ||
</section> |
Oops, something went wrong.