diff --git a/app/assets/images/search-icon--black.svg b/app/assets/images/search-icon--black.svg new file mode 100644 index 000000000..fc1ed50dc --- /dev/null +++ b/app/assets/images/search-icon--black.svg @@ -0,0 +1,4 @@ + diff --git a/app/assets/images/search-icon.svg b/app/assets/images/search-icon.svg new file mode 100644 index 000000000..262236ad0 --- /dev/null +++ b/app/assets/images/search-icon.svg @@ -0,0 +1,4 @@ + diff --git a/app/assets/stylesheets/components/_super-navigation-header.scss b/app/assets/stylesheets/components/_super-navigation-header.scss new file mode 100644 index 000000000..e9d7ef2da --- /dev/null +++ b/app/assets/stylesheets/components/_super-navigation-header.scss @@ -0,0 +1,96 @@ +$breakpoint: 769px; + +.app-c-super-navigation-header, +.app-c-super-navigation-header__container { + border-bottom: 0; + margin-bottom: 0; + padding-top: 0; +} + +.app-c-super-navigation-header__header-logo { + padding-top: govuk-spacing(2) + 4; + padding-bottom: govuk-spacing(2); + margin-bottom: 0; +} + +.app-c-super-navigation-header__content { + @include govuk-media-query($from: $breakpoint) { + text-align: right; + } +} + +.app-c-super-navigation-header__items { + margin-bottom: 0; + + &.govuk-header__navigation { + @include govuk-media-query($from: $breakpoint) { + display: flex; + justify-content: flex-end; + } + } +} + +.app-c-super-navigation-header__item { + display: flex; + margin-right: 0; + padding: 0; + + @include govuk-media-query($from: $breakpoint) { + display: inline-flex; + } +} + +.app-c-super-navigation-header__item-link { + padding: govuk-spacing(4) 0; + width: 100%; + + @include govuk-media-query($from: $breakpoint) { + padding: govuk-spacing(3) + 2; + width: auto; + } +} + +// Search + +.app-c-super-navigation-header__item--search { + @include govuk-media-query($from: $breakpoint) { + height: 55px; + width: 55px; + padding: 0; + margin-right: govuk-spacing(3); + background-color: govuk-colour('blue'); + } +} + +.app-c-super-navigation-header__item-link--search { + @include govuk-media-query($from: $breakpoint) { + background-image: image-url("search-icon.svg"); + background-position: 50%; + background-size: 35%; + background-repeat: no-repeat; + display: inherit; + width: 55px; + + &:focus { + background-image: image-url("search-icon--black.svg"); + } + } +} + +.app-c-super-navigation-header__item-link-text--search { + @include govuk-media-query($from: $breakpoint) { + display: block; + text-indent: -5000px; + overflow: hidden; + } +} + +.app-c-super-navigation-header__menu-button { + font-size: 19px; + font-weight: bold; + line-height: 1.3; + border-left: 1px solid govuk-colour("mid-grey"); + border-right: 1px solid govuk-colour("mid-grey"); + padding: govuk-spacing(3) govuk-spacing(4); + top: 0; +} diff --git a/app/assets/stylesheets/header-footer-only.scss b/app/assets/stylesheets/header-footer-only.scss index d4a7462ed..aaa27dc34 100644 --- a/app/assets/stylesheets/header-footer-only.scss +++ b/app/assets/stylesheets/header-footer-only.scss @@ -13,6 +13,7 @@ $govuk-use-legacy-palette: false; @import "components/emergency-banner"; @import "components/global-bar"; +@import "components/super-navigation-header"; @import "components/survey"; // basic styles for HTML5 and other elements diff --git a/app/views/components/super-navigation-header/_header-content.html.erb b/app/views/components/super-navigation-header/_header-content.html.erb new file mode 100644 index 000000000..f9466b9b3 --- /dev/null +++ b/app/views/components/super-navigation-header/_header-content.html.erb @@ -0,0 +1,21 @@ +
diff --git a/app/views/components/super-navigation-header/_header-logo.html.erb b/app/views/components/super-navigation-header/_header-logo.html.erb new file mode 100644 index 000000000..0b3e498e5 --- /dev/null +++ b/app/views/components/super-navigation-header/_header-logo.html.erb @@ -0,0 +1,33 @@ + diff --git a/app/views/components/super-navigation-header/_super-navigation-header.html.erb b/app/views/components/super-navigation-header/_super-navigation-header.html.erb new file mode 100644 index 000000000..0d95731bb --- /dev/null +++ b/app/views/components/super-navigation-header/_super-navigation-header.html.erb @@ -0,0 +1,10 @@ +<% + navigation_links = YAML.load(File.read(File.join(File.dirname(__FILE__),"/navigation-links.yml"))) +%> + +