diff --git a/app/frontend/styles/_header.scss b/app/frontend/styles/_header.scss new file mode 100644 index 000000000..670aeb8e9 --- /dev/null +++ b/app/frontend/styles/_header.scss @@ -0,0 +1,23 @@ +.app-header { + border-bottom: govuk-spacing(2) solid $govuk-brand-colour; + + .govuk-header__logo { + @include govuk-media-query($from: desktop) { + width: 60%; + } + + @include govuk-media-query($from: 860px) { + width: 75%; + } + } + + .govuk-header__content { + @include govuk-media-query($from: desktop) { + width: 40%; + } + + @include govuk-media-query($from: 860px) { + width: 25%; + } + } +} diff --git a/app/frontend/styles/application.scss b/app/frontend/styles/application.scss index 8dd6fc1a3..1ad9cbdb6 100644 --- a/app/frontend/styles/application.scss +++ b/app/frontend/styles/application.scss @@ -20,6 +20,7 @@ $govuk-new-link-styles: true; @import "figure"; @import "filter"; @import "filter-layout"; +@import "header"; @import "input"; @import "related-navigation"; @import "section-skip-link"; @@ -53,11 +54,3 @@ $govuk-new-link-styles: true; width: 100%; } } - -.govuk-header__logo { - width: 80%; -} - -.govuk-header__content { - width: 20%; -} diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index f2c40fe13..c2e2576bd 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -43,15 +43,14 @@ <%= govuk_skip_link %> <%= govuk_header( - logotype: "GOV.UK", - service_name: t("service_name"), + classes: "app-header", service_url: current_user.nil? ? "/" : "/logs", + navigation_classes: "govuk-header__navigation--end" ) do |component| + component.product_name(name: t("service_name")) if current_user.nil? component.navigation_item(text: "Sign in", href: user_session_path) else - component.navigation_item(text: "Logs", href: case_logs_path) - component.navigation_item(text: "Your organisation", href: "/organisations/#{current_user.organisation.id}") component.navigation_item(text: "Your account", href: account_path) component.navigation_item(text: "Sign out", href: destroy_user_session_path) end diff --git a/db/schema.rb b/db/schema.rb index 8a8103a23..c06c0e7e4 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -305,12 +305,12 @@ ActiveRecord::Schema[7.0].define(version: 2022_04_11_092231) do t.string "last_sign_in_ip" t.integer "role" t.string "old_user_id" + t.string "phone" t.integer "failed_attempts", default: 0 t.string "unlock_token" t.datetime "locked_at", precision: nil t.boolean "is_dpo", default: false t.boolean "is_key_contact", default: false - t.string "phone" t.integer "second_factor_attempts_count", default: 0 t.string "encrypted_otp_secret_key" t.string "encrypted_otp_secret_key_iv"