ui(header): refine to fit with olivier design

This commit is contained in:
Martin 2022-08-22 10:43:11 +02:00 committed by mfo
parent 73f94b9635
commit af00936aac
8 changed files with 20 additions and 25 deletions

View file

@ -24,4 +24,4 @@ $blue-france-700: #00006D;
$blue-france-500: #000091;
$blue-france-400: #7F7FC8;
$g700: #383838;
$alt-blue-france: rgba(245, 245, 254, 1);

View file

@ -37,7 +37,7 @@ dt {
}
h1 {
font-size: 36px;
// font-size: 36px;
font-weight: bold;
}

View file

@ -2,7 +2,7 @@
@import "constants";
.sub-header {
background-color: $light-grey;
background-color: $alt-blue-france;
padding-top: $default-padding;
margin-bottom: $sub-header-bottom-margin;
border-bottom: 1px solid $border-grey;

View file

@ -7,6 +7,7 @@
.fr-collapse#breadcrumb-1
%ol.fr-breadcrumb__list
%li= link_to t('root', scope: [:layouts, :breadcrumb]), root_path, class: 'fr-breadcrumb__link'
- steps.each.with_index do |step, i|
- if i == steps.size - 1
%li{ aria: {current: "page"}}

View file

@ -1,13 +1,6 @@
<<<<<<< HEAD
%nav.fr-nav{ role: "navigation", "aria-label"=> t('menu_aria_label', scope: [:layouts]) }
.fr-nav__item
%button.fr-translate__btn.fr-btn{ "aria-controls" => "account", "aria-expanded" => "false", :title => t('my_account', scope: [:layouts]) }
=======
%nav.fr-nav{role: "navigation"}
.fr-nav__item
%button.fr-translate__btn.fr-btn.fr-btn--tertiary{"aria-controls" => "account", "aria-expanded" => "false", :title => t('my_account', scope: [:layouts])}
>>>>>>> 62ec6eeed (feat(header): switch to DSFR translate component and dropdown component)
= image_tag "icons/account-circle.svg", alt: t('my_account', scope: [:layouts]), width: 20, height: 20, loading: 'lazy'
&nbsp;
= " #{current_email}"

View file

@ -42,21 +42,22 @@
.fr-hidden-sm.fr-unhidden-lg.fr-link--sm= t('views.shared.account.already_user_question')
%li= link_to t('views.shared.account.signin'), new_user_session_path, class: "fr-btn"
%li
- if dossier.present? && nav_bar_profile == :user
= render partial: 'shared/help/help_dropdown_dossier', locals: { dossier: dossier }
%li
- if dossier.present? && nav_bar_profile == :user
= render partial: 'shared/help/help_dropdown_dossier', locals: { dossier: dossier }
- elsif procedure.present? && (nav_bar_profile == :user || nav_bar_profile == :guest)
= render partial: 'shared/help/help_dropdown_procedure', locals: { procedure: procedure }
- elsif procedure.present? && (nav_bar_profile == :user || nav_bar_profile == :guest)
= render partial: 'shared/help/help_dropdown_procedure', locals: { procedure: procedure }
- elsif nav_bar_profile == :instructeur
= render partial: 'shared/help/help_dropdown_instructeur'
- elsif nav_bar_profile == :instructeur
= render partial: 'shared/help/help_dropdown_instructeur'
- else
%li= render partial: 'shared/help/help_button'
- else
= render partial: 'shared/help/help_button'
- if localization_enabled?
= render partial: 'layouts/locale_dropdown'
- if localization_enabled?
%li= render partial: 'layouts/locale_dropdown'
- if params[:controller] == 'recherche'

View file

@ -1,14 +1,14 @@
%nav.fr-translate.fr-nav{:role => "navigation", title: t('.select_locale')}
.fr-nav__item
%button.fr-translate__btn.fr-btn.fr-btn--tertiary{"aria-controls" => "translate", "aria-expanded" => "false", :title => t('.select_locale')}
%button.fr-translate__btn.fr-btn{"aria-controls" => "translate", "aria-expanded" => "false", :title => t('.select_locale')}
= t(".#{I18n.locale}")
%span.fr-hidden-lg= t('.francais')
#translate.fr-collapse.fr-menu
%ul.fr-menu__list
%li
= active_link_to save_locale_path(locale: :fr), method: :post, class: "fr-translate__language fr-nav__link", active: I18n.locale == :fr, "aria-current" => I18n.locale == :fr, hreflang: "fr", lang: "fr" do
= active_link_to save_locale_path(locale: :fr), method: :post, class: "fr-translate__language fr-nav__link", active: I18n.locale == :fr, hreflang: "fr", lang: "fr" do
= t('.fr_francais')
%li
= active_link_to save_locale_path(locale: :en), method: :post, class: "fr-translate__language fr-nav__link", active: I18n.locale == :en, "aria-current" => I18n.locale == :en, hreflang: "en", lang: "en" do
= active_link_to save_locale_path(locale: :en), method: :post, class: "fr-translate__language fr-nav__link", active: I18n.locale == :en, hreflang: "en", lang: "en" do
= t('.en_english')

View file

@ -1 +1 @@
= link_to t('help'), FAQ_URL, class: 'button primary'
= link_to t('help'), FAQ_URL, class: 'fr-btn', target: '_blank', rel: 'noopener'