From 1959ff5cb6790c26820151db68a77e6637279192 Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Wed, 8 Mar 2023 16:19:05 +0100
Subject: [PATCH] style

---
 .../extranet/contacts/persons/_path.html.erb  | 34 -------------------
 .../contacts/persons/_person.html.erb         |  5 ++-
 .../extranet/contacts/persons/show.html.erb   |  9 +++--
 app/views/extranet/posts/posts/_list.html.erb |  4 ++-
 4 files changed, 14 insertions(+), 38 deletions(-)
 delete mode 100644 app/views/extranet/contacts/persons/_path.html.erb

diff --git a/app/views/extranet/contacts/persons/_path.html.erb b/app/views/extranet/contacts/persons/_path.html.erb
deleted file mode 100644
index 4572ea2b2..000000000
--- a/app/views/extranet/contacts/persons/_path.html.erb
+++ /dev/null
@@ -1,34 +0,0 @@
-<%
-edit ||= false
-%>
-<div class="experiences mt-4">
-  <ul class="list-unstyled">
-    <% if person&.experiences&.any? %>
-      <% @person.experiences.ordered.each do |experience| %>
-        <%= render 'extranet/experiences/experience', experience: experience, edit: edit %>
-      <% end %>
-    <% end %>
-    <% person&.cohorts&.each do |cohort| %>
-      <li class="experiences__experience py-4 border-top">
-        <div class="row">
-          <div class="col-md-6">
-            <p class="mb-0">
-              <%= link_to [:alumni, cohort] do %>
-                <b><%= cohort.program %></b><br>
-                <%= cohort.program.diploma %><br>
-                <%= cohort.year %>
-              <% end %>
-            </p>
-          </div>
-          <div class="col-md-6 text-end">
-            <% if cohort.school.logo.attached? %>
-              <%= kamifusen_tag cohort.school.logo, width: 100, class: 'img-fluid experience__organization__logo' %>
-            <% else %>
-              <p class="text-end"><%= cohort.school %></p>
-            <% end %>
-          </div>
-        </div>
-      </li>
-    <% end %>
-  </ul>
-</div>
diff --git a/app/views/extranet/contacts/persons/_person.html.erb b/app/views/extranet/contacts/persons/_person.html.erb
index 5800edb49..651a36324 100644
--- a/app/views/extranet/contacts/persons/_person.html.erb
+++ b/app/views/extranet/contacts/persons/_person.html.erb
@@ -13,7 +13,10 @@
     </div>
     <div class="col-9 col-md-12">
       <%= link_to [:contacts, person], class: 'stretched-link' do %>
-        <%= person.first_name %> <%= person.last_name %>
+        <p>
+          <b><%= person.first_name %> <%= person.last_name %></b><br>
+          <span class="text-muted"><%= person.summary %></span>
+        </p>
       <% end %>
     </div>
 </article>
diff --git a/app/views/extranet/contacts/persons/show.html.erb b/app/views/extranet/contacts/persons/show.html.erb
index ba4019e9d..36302396a 100644
--- a/app/views/extranet/contacts/persons/show.html.erb
+++ b/app/views/extranet/contacts/persons/show.html.erb
@@ -3,9 +3,14 @@
 <div class="row">
   <div class="col-md-8 order-2 order-md-1">
     <div class="row">
-      <div class="col-md-9">
+      <div class="col-md-9 mt-n5">
         <% unless @person.biography.blank? %>
-          <div class="biography mb-5">
+          <p class="lead mt-5">
+            <%= @person.summary %>
+          </p>
+        <% end %>
+        <% unless @person.biography.blank? %>
+          <div class="biography mt-5">
             <%= sanitize @person&.biography %>
           </div>
         <% end %>
diff --git a/app/views/extranet/posts/posts/_list.html.erb b/app/views/extranet/posts/posts/_list.html.erb
index 08ce1d9c4..5f4f5714e 100644
--- a/app/views/extranet/posts/posts/_list.html.erb
+++ b/app/views/extranet/posts/posts/_list.html.erb
@@ -2,7 +2,9 @@
   <% posts.each do |post| %>
     <div class="col-lg-4">
       <div class="position-relative">
-        <%= kamifusen_tag post.featured_image, class: 'img-fluid' if post.featured_image.attached? %>
+        <% if post.featured_image.attached? && post.featured_image.analyzed? && post.featured_image.representable? %>
+          <%= kamifusen_tag post.featured_image.variant(resize_to_fill: [800, 500]), class: 'img-fluid' %>
+        <% end %>
         <%= link_to post, posts_communication_extranet_post_path(post.slug), class: 'stretched-link' %>
       </div>
     </div>
-- 
GitLab