diff --git a/app/assets/images/header/logo-ds-narrow.svg b/app/assets/images/header/logo-ds-narrow.svg new file mode 100644 index 000000000..eda8aa5eb --- /dev/null +++ b/app/assets/images/header/logo-ds-narrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/stylesheets/new_design/new_header.scss b/app/assets/stylesheets/new_design/new_header.scss index 6e05e288a..59378c36f 100644 --- a/app/assets/stylesheets/new_design/new_header.scss +++ b/app/assets/stylesheets/new_design/new_header.scss @@ -23,13 +23,23 @@ $landing-breakpoint: 1040px; .header-logo { display: inline-block; - margin-right: 4 * $default-spacer; - img { - height: 34px; + .header-logo-wide { + margin-right: 4 * $default-spacer; + } - @media (max-width: $landing-breakpoint) { - height: 18px; + .header-logo-narrow { + display: none; + } + + @media (max-width: $landing-breakpoint) { + .header-logo-wide { + display: none; + } + + .header-logo-narrow { + display: inline; + margin-right: 0; } } } diff --git a/app/views/layouts/_new_header.haml b/app/views/layouts/_new_header.haml index 616ade33b..a01812504 100644 --- a/app/views/layouts/_new_header.haml +++ b/app/views/layouts/_new_header.haml @@ -6,7 +6,8 @@ .flex.align-center = link_to root_path_for_profile(nav_bar_profile), class: "header-logo" do - %img{ src: image_url("header/logo-ds.svg"), alt: "demarches-simplifiees.fr" } + = image_tag "header/logo-ds.svg", alt: "demarches-simplifiees.fr", class: "header-logo-wide" + = image_tag "header/logo-ds-narrow.svg", alt: "demarches-simplifiees.fr", class: "header-logo-narrow" - if nav_bar_profile == :gestionnaire && gestionnaire_signed_in? - current_url = request.path_info