From 191a5a1deeed45ee238057bfac31804e3caee908 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 12 Dec 2017 16:53:19 +0100 Subject: [PATCH] Mutualize some CSS into a class --- .../new_design/accompagnateur.scss | 6 +++ app/assets/stylesheets/new_design/avis.scss | 38 +++++-------------- .../avis/_avis_list.html.haml | 2 +- .../new_gestionnaire/avis/index.html.haml | 2 +- .../avis/instruction.html.haml | 4 +- .../new_gestionnaire/dossiers/avis.html.haml | 2 +- 6 files changed, 21 insertions(+), 33 deletions(-) diff --git a/app/assets/stylesheets/new_design/accompagnateur.scss b/app/assets/stylesheets/new_design/accompagnateur.scss index 2e2360663..f8696c893 100644 --- a/app/assets/stylesheets/new_design/accompagnateur.scss +++ b/app/assets/stylesheets/new_design/accompagnateur.scss @@ -8,6 +8,12 @@ margin-bottom: 3 * $default-spacer; } +.tab-title { + font-size: 18px; + font-weight: bold; + margin-bottom: $default-padding; +} + .accompagnateur-header { background-color: $light-grey; padding-top: $default-padding; diff --git a/app/assets/stylesheets/new_design/avis.scss b/app/assets/stylesheets/new_design/avis.scss index 2686d8311..5ad45e97e 100644 --- a/app/assets/stylesheets/new_design/avis.scss +++ b/app/assets/stylesheets/new_design/avis.scss @@ -3,12 +3,6 @@ @import "constants"; .give-avis { - h1 { - font-size: 18px; - font-weight: bold; - margin-bottom: $default-padding; - } - .lock { margin-right: $default-spacer; } @@ -39,12 +33,6 @@ } .ask-avis { - h1 { - font-size: 18px; - font-weight: bold; - margin-bottom: $default-padding; - } - .avis-notice { font-size: 14px; color: $grey; @@ -74,22 +62,16 @@ } .list-avis { - .title { - font-size: 18px; - font-weight: bold; - margin-bottom: $default-padding; - - .count { - display: inline-block; - width: 20px; - height: 20px; - border-radius: 10px; - border: 1px solid $grey; - text-align: center; - font-size: 12px; - font-weight: normal; - margin-left: 8px; - } + .count { + display: inline-block; + width: 20px; + height: 20px; + border-radius: 10px; + border: 1px solid $grey; + text-align: center; + font-size: 12px; + font-weight: normal; + margin-left: 8px; } .one-avis { diff --git a/app/views/new_gestionnaire/avis/_avis_list.html.haml b/app/views/new_gestionnaire/avis/_avis_list.html.haml index 8828f315e..03966b8e6 100644 --- a/app/views/new_gestionnaire/avis/_avis_list.html.haml +++ b/app/views/new_gestionnaire/avis/_avis_list.html.haml @@ -1,6 +1,6 @@ - if avis.present? %section.list-avis - %h1.title + %h1.tab-title Avis des invités %span.count= avis.count diff --git a/app/views/new_gestionnaire/avis/index.html.haml b/app/views/new_gestionnaire/avis/index.html.haml index 640107d2e..1c18ef3d5 100644 --- a/app/views/new_gestionnaire/avis/index.html.haml +++ b/app/views/new_gestionnaire/avis/index.html.haml @@ -5,7 +5,7 @@ .accompagnateur-header .container.flex .width-100 - %h1 Avis + %h1.tab-title Avis %ul.tabs %li{ class: (@statut == NewGestionnaire::AvisController::A_DONNER_STATUS) ? 'active' : nil }> = link_to(avis_index_path(statut: NewGestionnaire::AvisController::A_DONNER_STATUS)) do diff --git a/app/views/new_gestionnaire/avis/instruction.html.haml b/app/views/new_gestionnaire/avis/instruction.html.haml index 1dc5860d4..f9baa98e2 100644 --- a/app/views/new_gestionnaire/avis/instruction.html.haml +++ b/app/views/new_gestionnaire/avis/instruction.html.haml @@ -5,7 +5,7 @@ .container %section.give-avis - %h1 Donner votre avis + %h1.tab-title Donner votre avis %h2.claimant Demandeur : %span.email= @avis.claimant.email @@ -22,7 +22,7 @@ = f.submit 'Envoyer votre avis', class: 'button send' %section.ask-avis - %h1 Inviter une personne à donner son avis + %h1.tab-title Inviter une personne à donner son avis %p.avis-notice L'invité pourra consulter, donner un avis sur le dossier et contribuer au fil de messagerie, mais il ne pourra le modifier. = form_for Avis.new, url: avis_avis_path(@avis), html: { class: 'form' } do |f| diff --git a/app/views/new_gestionnaire/dossiers/avis.html.haml b/app/views/new_gestionnaire/dossiers/avis.html.haml index 0e9664df0..1e04ec443 100644 --- a/app/views/new_gestionnaire/dossiers/avis.html.haml +++ b/app/views/new_gestionnaire/dossiers/avis.html.haml @@ -4,7 +4,7 @@ .container %section.ask-avis - %h1 Inviter une personne à donner son avis + %h1.tab-title Inviter une personne à donner son avis %p.avis-notice L'invité pourra consulter, donner un avis sur le dossier et contribuer au fil de messagerie, mais il ne pourra le modifier. = form_for Avis.new, url: avis_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' } do |f|