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 48926e98d..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; } } } @@ -129,7 +139,8 @@ $landing-breakpoint: 1040px; padding: 9px; padding-right: 42px; float: right; - width: 300px; + max-width: 300px; + min-width: 90px; margin: 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