From 153bbe0c090c33c86f599b921c8c8d93210a9f00 Mon Sep 17 00:00:00 2001
From: alexisben <alex@noesya.coop>
Date: Tue, 6 Dec 2022 20:07:14 +0100
Subject: [PATCH] person hero single wip

---
 assets/sass/_theme/design-system/hero.sass | 14 ----------
 assets/sass/_theme/sections/persons.sass   | 28 +++++++++++++++++---
 layouts/partials/persons/hero-single.html  | 30 ++++++++++------------
 3 files changed, 39 insertions(+), 33 deletions(-)

diff --git a/assets/sass/_theme/design-system/hero.sass b/assets/sass/_theme/design-system/hero.sass
index 6b4b58c2..4df15867 100644
--- a/assets/sass/_theme/design-system/hero.sass
+++ b/assets/sass/_theme/design-system/hero.sass
@@ -97,17 +97,3 @@
     //     z-index: 1
     // picture
     //     position: relative
-
-    // /* TODO refacto */
-    // .title-avatar
-    //     @include media-breakpoint-up(md)
-    //         align-items: flex-end
-    //         display: flex
-    //         justify-content: space-between
-    //         margin-bottom: $spacing1
-    //         h1
-    //             margin-bottom: 0
-    //     > div
-    //         width: col(8)
-    //         @include media-breakpoint-up(md)
-    //             width: col(2)
diff --git a/assets/sass/_theme/sections/persons.sass b/assets/sass/_theme/sections/persons.sass
index d811dd86..e4a0451b 100644
--- a/assets/sass/_theme/sections/persons.sass
+++ b/assets/sass/_theme/sections/persons.sass
@@ -102,11 +102,33 @@ ol.persons
     a
         @extend .link-more
 
+/* HERO *///R
+.persons__page
+    .hero
+        @include media-breakpoint-down(md)
+            padding-bottom: 0
+            margin-bottom: $spacing4
+            .avatar
+                width: col(6)
+                margin-top: $spacing1
+                margin-left: auto
+                transform: translateY(100px)
+                margin-top: calc(#{$spacing1} - 100px)
+        @include media-breakpoint-up(md)
+            .content
+                align-items: center
+                display: flex
+                justify-content: space-between
+                margin-top: 0
+                h1
+                    margin-bottom: 0
+                    width: col(8)
+                .avatar
+                    margin-bottom: 0
+                    width: col(3)
+
 @include media-breakpoint-up(lg)
     .persons__page
-        main
-            .container
-                margin-top: $spacing2
         .informations
             @include grid
             margin-bottom: $spacing2
diff --git a/layouts/partials/persons/hero-single.html b/layouts/partials/persons/hero-single.html
index 361ed5e0..068ef7a9 100644
--- a/layouts/partials/persons/hero-single.html
+++ b/layouts/partials/persons/hero-single.html
@@ -1,22 +1,20 @@
 <header class="hero">
   <div class="container">
-    <div class="title-avatar">
+    {{ partial "header/breadcrumbs.html" . }}
+    <div class="content">
       <h1>{{ safeHTML (partial "CorrectPunctuation" .Title) }}</h1>
-      <div>
-        {{ if .Params.image }}
-          <div class="avatar">
-            {{ partial "commons/image.html"
-                  (dict
-                    "image"    .Params.image
-                    "class"    "img-fluid"
-                    "mobile"   "202x202"
-                    "tablet"   "192x192"
-                    "desktop"  "196x196"
-                  )}}
-          </div>
-        {{ end }}
-      </div>
+      {{ if .Params.image }}
+        <div class="avatar">
+          {{ partial "commons/image.html"
+                (dict
+                  "image"    .Params.image
+                  "class"    "img-fluid"
+                  "mobile"   "202x202"
+                  "tablet"   "192x192"
+                  "desktop"  "196x196"
+                )}}
+        </div>
+      {{ end }}
     </div>
-    {{ partial "header/breadcrumbs.html" . }}
   </div>
 </header>
-- 
GitLab