From da80b795773b6e0b076a5f9b9ac4f2ce452dcb3d Mon Sep 17 00:00:00 2001 From: "alex.bowen" Date: Wed, 11 Sep 2024 00:09:09 +0100 Subject: [PATCH 1/4] updated design for header search open/close button --- .../_layout-super-navigation-header.scss | 50 +++++++++++++++---- .../_layout_super_navigation_header.html.erb | 13 +++-- config/locales/en.yml | 3 +- 3 files changed, 51 insertions(+), 15 deletions(-) diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss b/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss index fc0fd621bd..6d3e3a61a3 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss @@ -4,7 +4,6 @@ $chevron-indent-spacing: 7px; $black-bar-height: 50px; -$search-width-or-height: $black-bar-height; $pseudo-underline-height: 3px; $button-pipe-colour: darken(govuk-colour("mid-grey"), 20%); @@ -609,11 +608,11 @@ $after-button-padding-left: govuk-spacing(4); border: 0; color: govuk-colour("white"); cursor: pointer; - height: $search-width-or-height; + height: $black-bar-height; padding: govuk-spacing(3); position: relative; - width: $search-width-or-height; - @include govuk-font($size: 19, $weight: "bold", $line-height: 20px); + width: 130px; + @include govuk-font($size: 16, $weight: "bold", $line-height: 20px); @include focus-and-focus-visible { @include govuk-focused-text; @@ -741,7 +740,14 @@ $after-button-padding-left: govuk-spacing(4); top: 0; .gem-c-layout-super-navigation-header__open-button & { - display: block; + display: inline-block; + } +} + +.gem-c-layout-super-navigation-header__search-toggle-button--blue-background { + .gem-c-layout-super-navigation-header__navigation-top-toggle-close-icon, + .gem-c-layout-super-navigation-header__search-toggle-button-link-text-close { + color: $govuk-link-colour; } } @@ -868,10 +874,34 @@ $after-button-padding-left: govuk-spacing(4); } } -.gem-c-layout-super-navigation-header__search-toggle-button--large-navbar { - padding-left: 24px; - padding-right: 24px; - width: 68px; +.gem-c-layout-super-navigation-header__search-item { + .gem-c-layout-super-navigation-header__search-toggle-button-link-text-open { + display: inline; + } + + .gem-c-layout-super-navigation-header__search-toggle-button-link-text-close { + display: none; + } + + .gem-c-layout-super-navigation-header__open-button { + .gem-c-layout-super-navigation-header__search-toggle-button-link-text-open { + display: none; + } + + .gem-c-layout-super-navigation-header__search-toggle-button-link-text-close { + display: inline; + } + } +} + +.gem-c-layout-super-navigation-header__search-toggle-button-link-text-open, +.gem-c-layout-super-navigation-header__search-toggle-button-link-text-close { + margin-left: govuk-spacing(1); + vertical-align: top; +} + +.gem-c-layout-super-navigation-header__search-toggle-button-link-text-close { + color: $govuk-text-colour; } .gem-c-layout-super-navigation-header__navigation-second-item-description { @@ -961,7 +991,7 @@ $after-button-padding-left: govuk-spacing(4); .gem-c-layout-super-navigation-header__search-toggle-button--large-navbar { height: $large-navbar-height; // to stop the search icon moving on hover - padding-bottom: 12px; + padding-bottom: 6px; } .gem-c-layout-super-navigation-header__button-container--large-navbar { diff --git a/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb b/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb index 1c87427d44..315b20e75a 100644 --- a/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +++ b/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb @@ -15,7 +15,8 @@ navigation_menu_heading = t("components.layout_super_navigation_header.navigation_menu_heading") navigation_search_heading = t("components.layout_super_navigation_header.navigation_search_heading") navigation_search_subheading = t("components.layout_super_navigation_header.navigation_search_subheading") - search_text = t("components.layout_super_navigation_header.search_text") + search_text = t("components.layout_super_navigation_header.search_text_html") + close_text = t("components.layout_super_navigation_header.close_text") hide_search_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.hide", :label => "search") show_search_menu_text = t("components.layout_super_navigation_header.menu_toggle_label.show", :label => "search") @@ -196,14 +197,15 @@ hidden: true, type: "button", }) do %> - - <%= search_text %> - + <%= render "govuk_publishing_components/components/search/search_icon", { classes: %w[gem-c-layout-super-navigation-header__search-toggle-button-link-icon], } %> + + <%= search_text %> + + + <%= close_text %> + <% end %> <%= link_to "/search", { diff --git a/config/locales/en.yml b/config/locales/en.yml index 3664b609bc..61787de6c0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -166,6 +166,7 @@ en: show_button: Show search top_level: Top level layout_super_navigation_header: + close_text: Close logo_link_title: Go to the GOV.UK homepage logo_text: GOV.UK menu_toggle_label: @@ -234,7 +235,7 @@ en: navigation_menu_heading: Navigation menu navigation_search_heading: Search and popular pages navigation_search_subheading: Search - search_text: Search GOV.UK + search_text_html: Search GOV.UK metadata: from: From history: History From a960ee47375c2b79b377d0331b0a2d17bc8f5740 Mon Sep 17 00:00:00 2001 From: "alex.bowen" Date: Wed, 11 Sep 2024 07:42:46 +0100 Subject: [PATCH 2/4] add missing translation keys to all locales that have been added to en --- config/locales/ar.yml | 3 ++- config/locales/az.yml | 3 ++- config/locales/be.yml | 3 ++- config/locales/bg.yml | 3 ++- config/locales/bn.yml | 3 ++- config/locales/cs.yml | 3 ++- config/locales/cy.yml | 3 ++- config/locales/da.yml | 3 ++- config/locales/de.yml | 3 ++- config/locales/dr.yml | 3 ++- config/locales/el.yml | 3 ++- config/locales/en.yml | 1 + config/locales/es-419.yml | 3 ++- config/locales/es.yml | 3 ++- config/locales/et.yml | 3 ++- config/locales/fa.yml | 3 ++- config/locales/fi.yml | 3 ++- config/locales/fr.yml | 3 ++- config/locales/gd.yml | 3 ++- config/locales/gu.yml | 3 ++- config/locales/he.yml | 3 ++- config/locales/hi.yml | 3 ++- config/locales/hr.yml | 3 ++- config/locales/hu.yml | 3 ++- config/locales/hy.yml | 3 ++- config/locales/id.yml | 3 ++- config/locales/is.yml | 3 ++- config/locales/it.yml | 3 ++- config/locales/ja.yml | 3 ++- config/locales/ka.yml | 3 ++- config/locales/kk.yml | 3 ++- config/locales/ko.yml | 3 ++- config/locales/lt.yml | 3 ++- config/locales/lv.yml | 3 ++- config/locales/ms.yml | 3 ++- config/locales/mt.yml | 3 ++- config/locales/nl.yml | 3 ++- config/locales/no.yml | 3 ++- config/locales/pa-pk.yml | 3 ++- config/locales/pa.yml | 3 ++- config/locales/pl.yml | 3 ++- config/locales/ps.yml | 3 ++- config/locales/pt.yml | 3 ++- config/locales/ro.yml | 3 ++- config/locales/ru.yml | 3 ++- config/locales/si.yml | 3 ++- config/locales/sk.yml | 3 ++- config/locales/sl.yml | 3 ++- config/locales/so.yml | 3 ++- config/locales/sq.yml | 3 ++- config/locales/sr.yml | 3 ++- config/locales/sv.yml | 3 ++- config/locales/sw.yml | 3 ++- config/locales/ta.yml | 3 ++- config/locales/th.yml | 3 ++- config/locales/tk.yml | 3 ++- config/locales/tr.yml | 3 ++- config/locales/uk.yml | 3 ++- config/locales/ur.yml | 3 ++- config/locales/uz.yml | 3 ++- config/locales/vi.yml | 3 ++- config/locales/zh-hk.yml | 3 ++- config/locales/zh-tw.yml | 3 ++- config/locales/zh.yml | 3 ++- 64 files changed, 127 insertions(+), 63 deletions(-) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index e78b8a8ef7..dd95904055 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -118,6 +118,7 @@ ar: show_button: إظهار البحث top_level: أفضل مستوى layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -130,7 +131,7 @@ ar: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: من history: المحفوظات diff --git a/config/locales/az.yml b/config/locales/az.yml index b68f147256..bab02e704e 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -115,6 +115,7 @@ az: show_button: Axtarışı göstər top_level: Yüksək səviyyəli layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ az: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: "...dan (dən)" history: Tarix diff --git a/config/locales/be.yml b/config/locales/be.yml index 2632b72b5b..67d3d93c70 100644 --- a/config/locales/be.yml +++ b/config/locales/be.yml @@ -121,6 +121,7 @@ be: show_button: Паказаць вынікі пошуку top_level: Верхні ўзровень layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -133,7 +134,7 @@ be: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: З history: Гiсторыя diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 0f97f59696..268bd27823 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -119,6 +119,7 @@ bg: show_button: Показване на търсенето top_level: Първо ниво layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -131,7 +132,7 @@ bg: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: От history: История diff --git a/config/locales/bn.yml b/config/locales/bn.yml index 0a4afc08d8..9e694ca1bd 100644 --- a/config/locales/bn.yml +++ b/config/locales/bn.yml @@ -116,6 +116,7 @@ bn: show_button: অনুসন্ধান দেখান top_level: শীর্ষ পর্যায় layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -128,7 +129,7 @@ bn: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: থেকে history: ইতিহাস diff --git a/config/locales/cs.yml b/config/locales/cs.yml index ffa5b375d0..938b54dd6d 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -120,6 +120,7 @@ cs: show_button: Zobrazit vyhledávání top_level: Nejvyšší úroveň layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -132,7 +133,7 @@ cs: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: 'Komu I:' history: Historie diff --git a/config/locales/cy.yml b/config/locales/cy.yml index 27628c7920..3e8f146a0e 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -119,6 +119,7 @@ cy: show_button: Dangos y chwiliad top_level: Lefel uchaf layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -131,7 +132,7 @@ cy: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Gan history: Hanes diff --git a/config/locales/da.yml b/config/locales/da.yml index 7037d7c142..f10617024f 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -116,6 +116,7 @@ da: show_button: Vis søgning top_level: Øverste niveau layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -128,7 +129,7 @@ da: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Fra history: Historie diff --git a/config/locales/de.yml b/config/locales/de.yml index 5b8f77a022..0f1d6c9cf4 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -119,6 +119,7 @@ de: show_button: Suche anzeigen top_level: Oberste Ebene layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -131,7 +132,7 @@ de: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Von history: Geschichte diff --git a/config/locales/dr.yml b/config/locales/dr.yml index 8cfd81268a..dbb6a20ffa 100644 --- a/config/locales/dr.yml +++ b/config/locales/dr.yml @@ -117,6 +117,7 @@ dr: show_button: جستجو را نمایش دهید top_level: سطح بالا layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -129,7 +130,7 @@ dr: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: از history: پیشینهء جستجو diff --git a/config/locales/el.yml b/config/locales/el.yml index aeb8c5a9b7..fd58f951ad 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -115,6 +115,7 @@ el: show_button: Εμφάνιση αναζήτησης top_level: Κορυφαίο επίπεδο layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ el: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Από history: Ιστορικό diff --git a/config/locales/en.yml b/config/locales/en.yml index 61787de6c0..2b620438e3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -166,6 +166,7 @@ en: show_button: Show search top_level: Top level layout_super_navigation_header: + close_text: Close close_text: Close logo_link_title: Go to the GOV.UK homepage logo_text: GOV.UK diff --git a/config/locales/es-419.yml b/config/locales/es-419.yml index b3ddbdf756..66dbef3df1 100644 --- a/config/locales/es-419.yml +++ b/config/locales/es-419.yml @@ -115,6 +115,7 @@ es-419: show_button: Mostrar búsqueda top_level: Nivel superior layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ es-419: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Desde history: Historial diff --git a/config/locales/es.yml b/config/locales/es.yml index 219611586a..a613fe9786 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -115,6 +115,7 @@ es: show_button: Mostrar búsqueda top_level: Nivel superior layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ es: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Desde history: Historial diff --git a/config/locales/et.yml b/config/locales/et.yml index ebbfbce631..b60928eeda 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -118,6 +118,7 @@ et: show_button: Kuva otsing top_level: Kõrgeim tase layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -130,7 +131,7 @@ et: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Alates history: Ajalugu diff --git a/config/locales/fa.yml b/config/locales/fa.yml index f762e5a215..a1a417c6cb 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -114,6 +114,7 @@ fa: show_button: نمایش جستجو top_level: سطح بالا layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -126,7 +127,7 @@ fa: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: از history: تاریخچه diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 92a075cc20..aa5216059f 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -117,6 +117,7 @@ fi: show_button: Näytä haku top_level: Huipputaso layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -129,7 +130,7 @@ fi: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Alkaen history: Historia diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 4f28f02e24..7e6b7c4674 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -115,6 +115,7 @@ fr: show_button: Afficher la recherche top_level: Niveau supérieur layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ fr: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: De history: Historique diff --git a/config/locales/gd.yml b/config/locales/gd.yml index d7fc407d96..c9fef93404 100644 --- a/config/locales/gd.yml +++ b/config/locales/gd.yml @@ -117,6 +117,7 @@ gd: show_button: Taispeáin cuardach top_level: Tús an taighde layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -129,7 +130,7 @@ gd: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: De history: Stairiúil diff --git a/config/locales/gu.yml b/config/locales/gu.yml index 91c4ec5c3d..75e7ede303 100644 --- a/config/locales/gu.yml +++ b/config/locales/gu.yml @@ -115,6 +115,7 @@ gu: show_button: સર્ચ બતાવો top_level: ઉચ્ચ સ્તર layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ gu: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: થી history: હિસ્ટરી diff --git a/config/locales/he.yml b/config/locales/he.yml index 678b070648..64c2c8fb75 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -115,6 +115,7 @@ he: show_button: הצג חיפוש top_level: רמה עליונה layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ he: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: מ- history: היסטוריה diff --git a/config/locales/hi.yml b/config/locales/hi.yml index d04e221209..1b16285322 100644 --- a/config/locales/hi.yml +++ b/config/locales/hi.yml @@ -115,6 +115,7 @@ hi: show_button: खोज दिखाएं top_level: शीर्ष स्तर layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ hi: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: से history: इतिहास diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 7ac4ea22e7..50bde1b98f 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -116,6 +116,7 @@ hr: show_button: Prikaži pretraživanje top_level: Najviša razina layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -128,7 +129,7 @@ hr: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Iz history: Istorija diff --git a/config/locales/hu.yml b/config/locales/hu.yml index aa9b3ddd34..73f99a1df7 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -118,6 +118,7 @@ hu: show_button: Keresés mutatása top_level: Legmagasabb szint layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -130,7 +131,7 @@ hu: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Feladó history: Előzmények diff --git a/config/locales/hy.yml b/config/locales/hy.yml index 480f12fe97..b342a6d798 100644 --- a/config/locales/hy.yml +++ b/config/locales/hy.yml @@ -119,6 +119,7 @@ hy: show_button: Ցուցադրել որոնումը top_level: Բարձր մակարդակ layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -131,7 +132,7 @@ hy: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Ումից՝ history: Պատմություն diff --git a/config/locales/id.yml b/config/locales/id.yml index e2ba950c01..add7a3c96e 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -115,6 +115,7 @@ id: show_button: Tampilkan pencarian top_level: Level teratas layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ id: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Dari history: Riwayat diff --git a/config/locales/is.yml b/config/locales/is.yml index 05118eeb2f..586c738d7b 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -115,6 +115,7 @@ is: show_button: Sýna leit top_level: Efsta stig layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ is: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Frá history: Saga diff --git a/config/locales/it.yml b/config/locales/it.yml index 60d48b3696..2005fac66f 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -115,6 +115,7 @@ it: show_button: Mostra ricerca top_level: Livello superiore layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ it: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Da history: Cronologia diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 61d9aff6b8..c921dc761a 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -111,6 +111,7 @@ ja: show_button: 検索を表示 top_level: 最上位レベル layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -123,7 +124,7 @@ ja: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: から history: 歴史 diff --git a/config/locales/ka.yml b/config/locales/ka.yml index 9d9cb69f22..13d3c99fa0 100644 --- a/config/locales/ka.yml +++ b/config/locales/ka.yml @@ -118,6 +118,7 @@ ka: show_button: ძებნის ჩვენება top_level: ტოპ დონე layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -130,7 +131,7 @@ ka: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: დან history: ისტორია diff --git a/config/locales/kk.yml b/config/locales/kk.yml index f40c1a8cbf..3b7d8641b5 100644 --- a/config/locales/kk.yml +++ b/config/locales/kk.yml @@ -115,6 +115,7 @@ kk: show_button: Іздеуді көрсету top_level: Жоғары деңгей layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ kk: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Кімнен history: Журнал diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 31f1670f3c..1e8d89da13 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -110,6 +110,7 @@ ko: show_button: top_level: layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -122,7 +123,7 @@ ko: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: history: diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 70ef90edf9..c8e36858fa 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -120,6 +120,7 @@ lt: show_button: Rodyti paiešką top_level: Aukščiausias lygis layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -132,7 +133,7 @@ lt: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Nuo history: Istorija diff --git a/config/locales/lv.yml b/config/locales/lv.yml index d6976377c2..153ce182a8 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -119,6 +119,7 @@ lv: show_button: Rādīt meklēšanu top_level: Augšējais līmenis layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -131,7 +132,7 @@ lv: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: 'No' history: Vēsture diff --git a/config/locales/ms.yml b/config/locales/ms.yml index 741e6d4c33..af6899f8e6 100644 --- a/config/locales/ms.yml +++ b/config/locales/ms.yml @@ -114,6 +114,7 @@ ms: show_button: Tunjuk carian top_level: Aras teratas layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -126,7 +127,7 @@ ms: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Daripada history: Sejarah diff --git a/config/locales/mt.yml b/config/locales/mt.yml index e82a2cfac9..da6b32dab2 100644 --- a/config/locales/mt.yml +++ b/config/locales/mt.yml @@ -117,6 +117,7 @@ mt: show_button: Uri t-tfittxija top_level: Livell ta' fuq nett layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -129,7 +130,7 @@ mt: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Minn history: Storja diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 487d48dc72..c4e630a968 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -115,6 +115,7 @@ nl: show_button: Zoekopdracht tonen top_level: Top niveau layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ nl: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Van history: Geschiedenis diff --git a/config/locales/no.yml b/config/locales/no.yml index 0dbfce79f4..863f955e20 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -115,6 +115,7 @@ show_button: Vis søk top_level: Toppnivå layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Fra history: Historie diff --git a/config/locales/pa-pk.yml b/config/locales/pa-pk.yml index 929d942017..256ff445a9 100644 --- a/config/locales/pa-pk.yml +++ b/config/locales/pa-pk.yml @@ -111,6 +111,7 @@ pa-pk: show_button: اپنی تلاش دکھاؤ top_level: اوچی تھاں دی layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -123,7 +124,7 @@ pa-pk: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: ایتھوں history: پچھلا کم diff --git a/config/locales/pa.yml b/config/locales/pa.yml index 8ccd73e6ab..21f73a8a02 100644 --- a/config/locales/pa.yml +++ b/config/locales/pa.yml @@ -115,6 +115,7 @@ pa: show_button: ਖੋਜ ਦਿਖਾਓ top_level: ਉੱਚ ਪੱਧਰ layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ pa: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: ਤੋਂ history: ਇਤਿਹਾਸ diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 3197e32163..9d23ebeedc 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -119,6 +119,7 @@ pl: show_button: Pokaż wyszukiwanie top_level: Najwyższy poziom layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -131,7 +132,7 @@ pl: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Od history: Historia diff --git a/config/locales/ps.yml b/config/locales/ps.yml index 87dba21423..b729dfa51c 100644 --- a/config/locales/ps.yml +++ b/config/locales/ps.yml @@ -112,6 +112,7 @@ ps: show_button: لټون ښکاره کړئ top_level: لوړ رتبه layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -124,7 +125,7 @@ ps: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: له history: تاریخ diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 8956f6d193..b02711bd4e 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -115,6 +115,7 @@ pt: show_button: Mostrar pesquisa top_level: Nível superior layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ pt: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: De history: Histórico diff --git a/config/locales/ro.yml b/config/locales/ro.yml index a8ac9cda14..8131759ff8 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -116,6 +116,7 @@ ro: show_button: Afișați căutarea top_level: Nivel superior layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -128,7 +129,7 @@ ro: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: De la history: Istoric diff --git a/config/locales/ru.yml b/config/locales/ru.yml index ac7f5f5cfc..bed20fada1 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -119,6 +119,7 @@ ru: show_button: Показать поиск top_level: Высший уровень layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -131,7 +132,7 @@ ru: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Из history: История diff --git a/config/locales/si.yml b/config/locales/si.yml index d136720f07..f48cfcc0f9 100644 --- a/config/locales/si.yml +++ b/config/locales/si.yml @@ -115,6 +115,7 @@ si: show_button: සෙවීම පෙන්වන්න top_level: ඉහළ මට්ටම layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ si: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: සිට history: ඉතිහාසය diff --git a/config/locales/sk.yml b/config/locales/sk.yml index b3c16fa7e8..12264bf0cd 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -120,6 +120,7 @@ sk: show_button: Zobraziť vyhľadávanie top_level: Najvyššia úroveň layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -132,7 +133,7 @@ sk: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Od history: História diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 91ca360f7b..a0429cfd6b 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -122,6 +122,7 @@ sl: show_button: Pokaži iskanje top_level: Najvišja raven layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -134,7 +135,7 @@ sl: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Od history: Zgodovina diff --git a/config/locales/so.yml b/config/locales/so.yml index 239751f74e..162b756d73 100644 --- a/config/locales/so.yml +++ b/config/locales/so.yml @@ -115,6 +115,7 @@ so: show_button: Muuji baadhista top_level: Heerka sare layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ so: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Laga bilaabo history: Taariikhda diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 5378f3188e..f77066f46b 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -115,6 +115,7 @@ sq: show_button: Shfaq kërkimin top_level: Niveli më i lartë layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ sq: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Nga history: Historia diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 8a0f9f43d8..9331bbee10 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -116,6 +116,7 @@ sr: show_button: Prikaži pretragu top_level: Najviši nivo layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -128,7 +129,7 @@ sr: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Od history: Istorija diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 24532c0ac1..417ae8f074 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -115,6 +115,7 @@ sv: show_button: Visa sökning top_level: Högsta nivå layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ sv: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Från history: Historia diff --git a/config/locales/sw.yml b/config/locales/sw.yml index ee97d0c545..d2b2eb8fb4 100644 --- a/config/locales/sw.yml +++ b/config/locales/sw.yml @@ -115,6 +115,7 @@ sw: show_button: Onyesha utafutaji top_level: Kiwango cha juu layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -127,7 +128,7 @@ sw: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Kuanzia history: Kumbukumbu diff --git a/config/locales/ta.yml b/config/locales/ta.yml index c6bee550ed..c34cdb15e7 100644 --- a/config/locales/ta.yml +++ b/config/locales/ta.yml @@ -116,6 +116,7 @@ ta: show_button: தேடலைக் காட்டு top_level: முதன்மை நிலை layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -128,7 +129,7 @@ ta: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: இதிலிருந்து history: வரலாறு diff --git a/config/locales/th.yml b/config/locales/th.yml index 05d739c8cf..f992b9e8ab 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -113,6 +113,7 @@ th: show_button: แสดงการค้นหา top_level: ระดับสูงสุด layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -125,7 +126,7 @@ th: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: จาก history: ประวัติ diff --git a/config/locales/tk.yml b/config/locales/tk.yml index f787b4fea4..6a0c0ee6f8 100644 --- a/config/locales/tk.yml +++ b/config/locales/tk.yml @@ -116,6 +116,7 @@ tk: show_button: Gözlegi görkez top_level: Ýokary dereje layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -128,7 +129,7 @@ tk: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: "-dan" history: Taryh diff --git a/config/locales/tr.yml b/config/locales/tr.yml index e4fb367b52..95b0029be1 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -116,6 +116,7 @@ tr: show_button: Aramayı göster top_level: Üst seviye layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -128,7 +129,7 @@ tr: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Şuradan history: Geçmiş diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 968c0caaff..e6fbbe6869 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -122,6 +122,7 @@ uk: show_button: Показати пошук top_level: Вищий рівень layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -134,7 +135,7 @@ uk: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Від history: Історія diff --git a/config/locales/ur.yml b/config/locales/ur.yml index e185067f6a..0d6213bda7 100644 --- a/config/locales/ur.yml +++ b/config/locales/ur.yml @@ -112,6 +112,7 @@ ur: show_button: تلاش دکھائیں top_level: اعلیٰ درجہ layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -124,7 +125,7 @@ ur: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: از history: ہسٹری diff --git a/config/locales/uz.yml b/config/locales/uz.yml index fb0f3008b0..140ce58d4a 100644 --- a/config/locales/uz.yml +++ b/config/locales/uz.yml @@ -117,6 +117,7 @@ uz: show_button: Излашни кўрсатиш top_level: Юқори даража layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -129,7 +130,7 @@ uz: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: дан history: Тарих diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 0c0bb11ebd..add85205e4 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -114,6 +114,7 @@ vi: show_button: Hiển thị tìm kiếm top_level: Mức cao nhất layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -126,7 +127,7 @@ vi: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: Từ history: Lịch sử diff --git a/config/locales/zh-hk.yml b/config/locales/zh-hk.yml index 21f9533c8b..7a2f4d7c59 100644 --- a/config/locales/zh-hk.yml +++ b/config/locales/zh-hk.yml @@ -113,6 +113,7 @@ zh-hk: show_button: 顯示搜尋項 top_level: 最高級別 layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -125,7 +126,7 @@ zh-hk: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: 來自 history: 過往記錄 diff --git a/config/locales/zh-tw.yml b/config/locales/zh-tw.yml index 18e3931ad8..a5971cf9ed 100644 --- a/config/locales/zh-tw.yml +++ b/config/locales/zh-tw.yml @@ -113,6 +113,7 @@ zh-tw: show_button: 展開搜尋 top_level: 最高層 layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -125,7 +126,7 @@ zh-tw: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: 從 history: 歷史 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index f3e480e89d..c48d5bff50 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -113,6 +113,7 @@ zh: show_button: 显示搜索 top_level: 最高级 layout_super_navigation_header: + close_text: Close logo_link_title: logo_text: menu_toggle_label: @@ -125,7 +126,7 @@ zh: navigation_menu_heading: navigation_search_heading: navigation_search_subheading: - search_text: + search_text_html: metadata: from: 从 history: 历史 From b5b7bc5c489bc802f65877b09f7d640c84cc1ae4 Mon Sep 17 00:00:00 2001 From: "alex.bowen" Date: Wed, 11 Sep 2024 09:30:50 +0100 Subject: [PATCH 3/4] add styles for visually hiding search button text on mobile --- .../components/_layout-super-navigation-header.scss | 13 ++++++++++++- .../layout-super-navigation-header-spec.js | 7 +++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss b/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss index 6d3e3a61a3..0caff01bfa 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss @@ -611,7 +611,7 @@ $after-button-padding-left: govuk-spacing(4); height: $black-bar-height; padding: govuk-spacing(3); position: relative; - width: 130px; + width: 57px; @include govuk-font($size: 16, $weight: "bold", $line-height: 20px); @include focus-and-focus-visible { @@ -638,6 +638,7 @@ $after-button-padding-left: govuk-spacing(4); border: 0; margin: 0; right: 0; + width: 130px; @include focus-not-focus-visible { border-bottom: 1px solid govuk-colour("dark-blue"); @@ -877,6 +878,9 @@ $after-button-padding-left: govuk-spacing(4); .gem-c-layout-super-navigation-header__search-item { .gem-c-layout-super-navigation-header__search-toggle-button-link-text-open { display: inline; + @include govuk-media-query($until: "desktop") { + @include govuk-visually-hidden; + } } .gem-c-layout-super-navigation-header__search-toggle-button-link-text-close { @@ -890,6 +894,9 @@ $after-button-padding-left: govuk-spacing(4); .gem-c-layout-super-navigation-header__search-toggle-button-link-text-close { display: inline; + @include govuk-media-query($until: "desktop") { + @include govuk-visually-hidden; + } } } } @@ -994,6 +1001,10 @@ $after-button-padding-left: govuk-spacing(4); padding-bottom: 6px; } + .gem-c-layout-super-navigation-header__open-button { + padding-bottom: 3px; + } + .gem-c-layout-super-navigation-header__button-container--large-navbar { top: -$large-navbar-height; } diff --git a/spec/javascripts/components/layout-super-navigation-header-spec.js b/spec/javascripts/components/layout-super-navigation-header-spec.js index 8ed39faf7c..ff66e3be6e 100644 --- a/spec/javascripts/components/layout-super-navigation-header-spec.js +++ b/spec/javascripts/components/layout-super-navigation-header-spec.js @@ -28,8 +28,8 @@ describe('The super header navigation', function () { ' ' + '