-
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.
- Loading branch information
1 parent
4f2cf25
commit 987ee83
Showing
11 changed files
with
212 additions
and
84 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@import "govuk_publishing_components/individual_component_support"; | ||
|
||
.app-c-homepage-header { | ||
background-color: $govuk-brand-colour; | ||
padding-bottom: govuk-spacing(7); | ||
padding-top: govuk-spacing(4); | ||
@include govuk-typography-common; | ||
|
||
@include govuk-media-query($from: desktop) { | ||
padding-bottom: govuk-spacing(8); | ||
padding-top: govuk-spacing(6); | ||
} | ||
} | ||
|
||
.app-c-homepage-header__title { | ||
@include govuk-typography-weight-bold; | ||
color: govuk-colour("white"); | ||
font-size: 40px; | ||
font-size: govuk-px-to-rem(40); | ||
line-height: 1.2; | ||
padding-bottom: govuk-spacing(2); | ||
margin: 0; | ||
|
||
@include govuk-media-query($from: desktop) { | ||
font-size: 69px; | ||
font-size: govuk-px-to-rem(69); | ||
} | ||
} | ||
|
||
.app-c-homepage-header__intro { | ||
@include govuk-typography-weight-bold; | ||
|
||
color: #d2e2f1; | ||
font-size: 40px; | ||
font-size: govuk-px-to-rem(40); | ||
margin: 0; | ||
padding-bottom: govuk-spacing(2); | ||
line-height: 1.07; | ||
|
||
@include govuk-media-query($from: desktop) { | ||
font-size: 69px; | ||
font-size: govuk-px-to-rem(69); | ||
} | ||
} | ||
|
||
.app-c-homepage-header__search { | ||
@include govuk-media-query($from: mobile) { | ||
@include govuk-grid-column($width: two-thirds); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@import "govuk_publishing_components/individual_component_support"; | ||
|
||
.homepage-inverse-header { | ||
background-color: $govuk-brand-colour; | ||
padding-bottom: govuk-spacing(7); | ||
padding-top: govuk-spacing(8); | ||
@include govuk-typography-common; | ||
|
||
@include govuk-media-query($from: desktop) { | ||
padding-bottom: govuk-spacing(8); | ||
padding-top: govuk-spacing(9); | ||
} | ||
} | ||
|
||
.homepage-inverse-header__title { | ||
@include govuk-typography-weight-bold; | ||
color: govuk-colour("white"); | ||
font-size: 32px; | ||
font-size: govuk-px-to-rem(32); | ||
line-height: 1.2; | ||
margin: 0; | ||
padding-bottom: govuk-spacing(6); | ||
|
||
@include govuk-media-query($from: desktop) { | ||
font-size: 48px; | ||
font-size: govuk-px-to-rem(48); | ||
} | ||
} | ||
|
||
.homepage-inverse-header__intro { | ||
color: govuk-colour("white"); | ||
font-size: 19px; | ||
font-size: govuk-px-to-rem(19); | ||
margin: 0; | ||
padding-bottom: govuk-spacing(2); | ||
|
||
@include govuk-media-query($from: desktop) { | ||
font-size: 24px; | ||
font-size: govuk-px-to-rem(24); | ||
} | ||
} | ||
|
||
.homepage-inverse-header__intro--bold { | ||
@include govuk-typography-weight-bold; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<% | ||
add_app_component_stylesheet("homepage_header") | ||
|
||
title ||= t('homepage.index.intro_title.short_text') | ||
intro_text ||= t('homepage.index.intro_html') | ||
button_text ||= t("homepage.index.search_button") | ||
search_label ||= t("homepage.index.search_label") | ||
%> | ||
|
||
<header class="app-c-homepage-header"> | ||
<div class="govuk-width-container"> | ||
<div class="app-c-homepage-header__title-container"> | ||
<h1 class="app-c-homepage-header__title" data-ga4-scroll-marker> | ||
<%= title %> | ||
</h1> | ||
<p class="app-c-homepage-header__intro homepage-inverse-header__intro--bold"> | ||
<%= intro_text %> | ||
</p> | ||
</div> | ||
<div class="govuk-grid-row"> | ||
<div class="app-c-homepage-header__search"> | ||
<form | ||
action="/search" | ||
method="get" | ||
role="search" | ||
data-module="ga4-form-tracker" | ||
data-ga4-form-include-text | ||
data-ga4-form='{"event_name": "search", "type": "homepage", "url": "/search/all", "section": "Search", "action": "search"}' | ||
> | ||
<%= render "govuk_publishing_components/components/search", { | ||
button_text: button_text, | ||
margin_bottom: 0, | ||
size: "large", | ||
label_size: "s", | ||
label_margin_bottom: 3, | ||
inline_label: false, | ||
label_text: search_label, | ||
homepage: true, | ||
on_govuk_blue: true, | ||
margin_top: 7, | ||
data_attributes: { | ||
track_category: "homepageClicked", | ||
track_action: "searchSubmitted", | ||
track_label: "/search/all", | ||
track_dimension_index: 29, | ||
track_dimension: "Search GOV.UK", | ||
ga4_scroll_marker: true, | ||
}, | ||
} %> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</header> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<% | ||
add_app_component_stylesheet("inverse_header") | ||
|
||
title ||= t('homepage.index.intro_title.html') | ||
intro_text ||= t('homepage.index.intro_html') | ||
intro_simpler ||= t('homepage.index.intro_simpler') | ||
%> | ||
|
||
<header class="homepage-inverse-header"> | ||
<div class="govuk-width-container"> | ||
<h1 class="homepage-inverse-header__title" data-ga4-scroll-marker> | ||
<%= title %> | ||
</h1> | ||
<p class="homepage-inverse-header__intro"><%= intro_text %></p> | ||
<p class="homepage-inverse-header__intro homepage-inverse-header__intro--bold"><%= intro_simpler %></p> | ||
</div> | ||
</header> |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: Homepage header | ||
description: Header for pages with a coloured background | ||
accessibility_criteria: Elements must have sufficient color contrast | ||
examples: | ||
default: | ||
data: |
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,2 +1,6 @@ | ||
<%= render "homepage/inverse_header" %> | ||
<% if @new_design %> | ||
<%= render "components/homepage_header" %> | ||
<% else %> | ||
<%= render "components/inverse_header" %> | ||
<% end %> | ||
<%= render "homepage/links_and_search" %> |
This file was deleted.
Oops, something went wrong.
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