From 4047679547f0634d7e2beee07884be408e05b76f Mon Sep 17 00:00:00 2001
From: alexisben <alexiben7@gmail.com>
Date: Mon, 2 May 2022 14:12:07 +0200
Subject: [PATCH] Some fix

---
 .../extranet/_default/abstracts/_mixins.sass  |  2 +-
 .../_default/abstracts/_variables.sass        |  5 +++++
 .../extranet/_default/components/_facets.sass | 19 +++++++++++++------
 .../extranet/_default/layouts/_header.sass    |  4 +++-
 .../extranet/_default/pages/_home.sass        | 18 ++++++++++++++++--
 .../_default/pages/_organizations.sass        |  1 +
 .../extranet/themes/IJBA/_variables.sass      |  2 +-
 app/views/extranet/home/index.html.erb        | 12 ++++++++----
 .../extranet/organizations/show.html.erb      |  3 ++-
 9 files changed, 50 insertions(+), 16 deletions(-)

diff --git a/app/assets/stylesheets/extranet/_default/abstracts/_mixins.sass b/app/assets/stylesheets/extranet/_default/abstracts/_mixins.sass
index 68836830f..748b128a9 100644
--- a/app/assets/stylesheets/extranet/_default/abstracts/_mixins.sass
+++ b/app/assets/stylesheets/extranet/_default/abstracts/_mixins.sass
@@ -1,7 +1,7 @@
 @mixin pseudo-top-border($pseudo: before)
     position: relative
     &::#{$pseudo}
-        border-top: 1px solid $primary
+        border-top: 1px solid $light-border-color
         content: ''
         left: $grid-gutter-width  * .5
         position: absolute
diff --git a/app/assets/stylesheets/extranet/_default/abstracts/_variables.sass b/app/assets/stylesheets/extranet/_default/abstracts/_variables.sass
index b5631c0fa..467091aef 100644
--- a/app/assets/stylesheets/extranet/_default/abstracts/_variables.sass
+++ b/app/assets/stylesheets/extranet/_default/abstracts/_variables.sass
@@ -41,3 +41,8 @@ $list-border-color: rgba(0, 0, 0, 0.3)
 // Pagination
 $pagination-border-width: 0
 $pagination-font-size: $small-font-size
+
+$navbar-link-active-color: $primary
+
+// Border
+$light-border-color: rgba($primary, 0.3)
\ No newline at end of file
diff --git a/app/assets/stylesheets/extranet/_default/components/_facets.sass b/app/assets/stylesheets/extranet/_default/components/_facets.sass
index 3c6150635..0dcefdb66 100644
--- a/app/assets/stylesheets/extranet/_default/components/_facets.sass
+++ b/app/assets/stylesheets/extranet/_default/components/_facets.sass
@@ -15,12 +15,6 @@
                 display: inline-block
                 padding: 0
                 vertical-align: middle
-        .form-check-input[type="checkbox"]
-            border-color: $primary
-            border-radius: 0
-            height: 0.65em
-            margin-top: 0.5em
-            width: 0.65em
 
 .faceted__facets
     > li
@@ -29,6 +23,16 @@
             display: block
             margin-bottom: px2rem(10)
 .faceted__facet
+    
+    &__checkboxes
+        input[type="checkbox"]
+            @extend .form-check-input
+            border-color: $primary
+            border-radius: 0
+            height: 0.65em
+            margin-top: 0.5em
+            padding: 0
+            width: 0.65em
     &__text
         display: flex
     &__list
@@ -46,3 +50,6 @@
             padding: 2px 7px
             &--selected
                 background: $btn-facet-background-active
+    &__reinit a
+        @extend .btn
+        @extend .btn-primary
diff --git a/app/assets/stylesheets/extranet/_default/layouts/_header.sass b/app/assets/stylesheets/extranet/_default/layouts/_header.sass
index 67bc99556..602336f95 100644
--- a/app/assets/stylesheets/extranet/_default/layouts/_header.sass
+++ b/app/assets/stylesheets/extranet/_default/layouts/_header.sass
@@ -3,7 +3,9 @@
     .navbar-brand
         img
             max-width: 100px
-
+    .active
+        .nav-link
+            color: $navbar-link-active-color
 header
     align-items: center
     border-bottom: 1px solid
diff --git a/app/assets/stylesheets/extranet/_default/pages/_home.sass b/app/assets/stylesheets/extranet/_default/pages/_home.sass
index 447bf5620..67b14858c 100644
--- a/app/assets/stylesheets/extranet/_default/pages/_home.sass
+++ b/app/assets/stylesheets/extranet/_default/pages/_home.sass
@@ -1,6 +1,5 @@
 .home-index
     .experiences
-        margin-top: px2rem(80)
         ul
             padding-left: 0
             li
@@ -29,4 +28,19 @@
                         a
                             align-self: center
                         img
-                            max-height: 80px
\ No newline at end of file
+                            max-height: 80px
+
+    .promotions
+        list-style: none
+        padding-left: 0
+        li
+            border-top: solid 1px $light-border-color
+            display: flex
+            justify-content: space-between
+            padding: px2rem(20) 0
+            position: relative
+            a
+                @extend .stretched-link
+            &:last-child
+                border-bottom: solid 1px $light-border-color
+
diff --git a/app/assets/stylesheets/extranet/_default/pages/_organizations.sass b/app/assets/stylesheets/extranet/_default/pages/_organizations.sass
index 55f18781b..fb3ecea91 100644
--- a/app/assets/stylesheets/extranet/_default/pages/_organizations.sass
+++ b/app/assets/stylesheets/extranet/_default/pages/_organizations.sass
@@ -32,6 +32,7 @@
             li
                 @include make-row
                 display: flex
+                position: relative
                 > div
                     @include make-col-ready
                     &:nth-child(1)
diff --git a/app/assets/stylesheets/extranet/themes/IJBA/_variables.sass b/app/assets/stylesheets/extranet/themes/IJBA/_variables.sass
index 71b7e5289..e121f06fb 100644
--- a/app/assets/stylesheets/extranet/themes/IJBA/_variables.sass
+++ b/app/assets/stylesheets/extranet/themes/IJBA/_variables.sass
@@ -1,5 +1,5 @@
 $ijba-red: #E40130
 
-$nav-tabs-link-active-color: $ijba-red
+$navbar-link-active-color: $ijba-red
 
 $breadcrumb-active-color: $ijba-red
diff --git a/app/views/extranet/home/index.html.erb b/app/views/extranet/home/index.html.erb
index 1e3197939..79061617f 100644
--- a/app/views/extranet/home/index.html.erb
+++ b/app/views/extranet/home/index.html.erb
@@ -42,9 +42,13 @@
 
   <div class="col-md-4">
     <h2>Promotions actuelles</h2>
-    <p><%= link_to 'Voir toutes les promotions', education_cohorts_path %></p>
-    <% @cohorts.each do |cohort| %>
-      <%= link_to cohort, cohort %><br>
-    <% end %>
+    <ul class="promotions">
+      <% @cohorts.each do |cohort| %>
+        <li>
+          <%= link_to cohort, cohort %>
+          <b><%= cohort.academic_year %></b>
+        </li>
+      <% end %>
+    </ul>
   </div>
 </div>
\ No newline at end of file
diff --git a/app/views/extranet/organizations/show.html.erb b/app/views/extranet/organizations/show.html.erb
index 8c6b85122..184e335b8 100644
--- a/app/views/extranet/organizations/show.html.erb
+++ b/app/views/extranet/organizations/show.html.erb
@@ -41,7 +41,8 @@
               <p><b><%= experience.person.name %></b></p>
               <p>
                 <%= experience.description %><br>
-                <%= experience.from_year %> - <%= experience.to_year %>
+                <%# // TODO : pretty way to avoid empty dash " - " %>
+                <%= [experience.from_year, experience.to_year].join(" - ") %>
               </p>
             </div>
           </li>
-- 
GitLab