From 9c624a74c1a3878e3e57117e20f4550139e51c29 Mon Sep 17 00:00:00 2001
From: alexisben <alex@noesya.coop>
Date: Mon, 10 Apr 2023 19:17:01 +0200
Subject: [PATCH] style wip

---
 .../stylesheets/extranet/pages/_posts.sass    |  1 +
 app/views/extranet/posts/posts/show.html.erb  | 37 +++++++++++--------
 2 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/app/assets/stylesheets/extranet/pages/_posts.sass b/app/assets/stylesheets/extranet/pages/_posts.sass
index 1d785f260..4c657e529 100644
--- a/app/assets/stylesheets/extranet/pages/_posts.sass
+++ b/app/assets/stylesheets/extranet/pages/_posts.sass
@@ -1,4 +1,5 @@
 .posts-show header
+    
     figure
         position: relative
         @include media-breakpoint-up(md)
diff --git a/app/views/extranet/posts/posts/show.html.erb b/app/views/extranet/posts/posts/show.html.erb
index df92a2c85..5d27810de 100644
--- a/app/views/extranet/posts/posts/show.html.erb
+++ b/app/views/extranet/posts/posts/show.html.erb
@@ -1,20 +1,27 @@
-<% content_for :title, @post %>
-
-<% content_for :header_right do %>
-  <% if @post.featured_image.attached? %>
-    <figure <% if @post.featured_image_credit.present? %>class="with-credit"<% end %>>
-      <%= kamifusen_tag @post.featured_image, class: 'img-fluid', width: 300 %>
-      <% if @post.featured_image_credit.present? %>
-        <figcaption tabindex="0">
-            <%= sanitize @post.featured_image_credit %>
-        </figcaption>
-      <% end %>
-    </figure>
-  <% end %>
+<% content_for :header do %>
+  <div class="header__info">
+    <h1><%= @post %></h1>
+    <% if @post.published_at %>
+      <p>Publié le <%= l @post.published_at.to_date, format: :long %></p>
+    <% end %>
+    <% if @post.category %>
+      <p>Catégorie : <%= link_to @post.category, posts_category_path(slug: @post.category.slug) %></p>
+    <% end %>
+  </div>
+  <div class="header__additional_data">
+    <% if @post.featured_image.attached? %>
+      <figure <% if @post.featured_image_credit.present? %>class="with-credit"<% end %>>
+        <%= kamifusen_tag @post.featured_image, class: 'img-fluid', width: 300 %>
+        <% if @post.featured_image_credit.present? %>
+          <figcaption tabindex="0">
+              <%= sanitize @post.featured_image_credit %>
+          </figcaption>
+        <% end %>
+      </figure>
+    <% end %>
+  </div>
 <% end %>
 
-<%= link_to @post.category, posts_category_path(slug: @post.category.slug) if @post.category %>
-
 </main>
 <%= render 'admin/communication/blocks/preview', about: @post %>
 <main>
-- 
GitLab