From 01fa0a33da4f3aea818ffabab628dbb13c596426 Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Mon, 19 Jun 2023 12:22:21 +0200 Subject: [PATCH] preview --- .../websites/pages/preview.html.erb | 1 + .../websites/posts/preview.html.erb | 1 + app/views/admin/layouts/preview.html.erb | 23 ++++++++----------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/app/views/admin/communication/websites/pages/preview.html.erb b/app/views/admin/communication/websites/pages/preview.html.erb index 95fbc2ed6..437385c9a 100644 --- a/app/views/admin/communication/websites/pages/preview.html.erb +++ b/app/views/admin/communication/websites/pages/preview.html.erb @@ -1,3 +1,4 @@ <% content_for :title, @page.title %> +<% content_for :summary, @page.summary %> <% content_for :image, kamifusen_tag(@page.best_featured_image) if @page.best_featured_image.attached? %> <%= render 'admin/communication/blocks/content/show', about: @page %> diff --git a/app/views/admin/communication/websites/posts/preview.html.erb b/app/views/admin/communication/websites/posts/preview.html.erb index 3a5cdcc3c..7946b0bfc 100644 --- a/app/views/admin/communication/websites/posts/preview.html.erb +++ b/app/views/admin/communication/websites/posts/preview.html.erb @@ -1,3 +1,4 @@ <% content_for :title, @post.title %> +<% content_for :summary, @post.summary %> <% content_for :image, kamifusen_tag(@post.featured_image) if @post.featured_image.attached? %> <%= render 'admin/communication/blocks/content/show', about: @post %> diff --git a/app/views/admin/layouts/preview.html.erb b/app/views/admin/layouts/preview.html.erb index 26bc95742..0e4d2be82 100644 --- a/app/views/admin/layouts/preview.html.erb +++ b/app/views/admin/layouts/preview.html.erb @@ -20,22 +20,17 @@ </style> </head> <body class="full-width"> - <header class="hero"> - <%= yield :image %> + <header class="hero <%= 'hero--with-image hero--image-square' if yield(:image).present? %>"> <div class="container"> - <div> - <h1><%= yield :title %></h1> + <div class="content"> + <hgroup> + <h1><%= yield :title %></h1> + <p class="lead"><%= yield :summary %></p> + </hgroup> + <figure> + <%= yield :image %> + </figure> </div> - <ol class="breadcrumb" itemscope="" itemtype="https://schema.org/BreadcrumbList"> - <li class="breadcrumb-item" itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"> - <a itemprop="item"><span itemprop="name">Accueil</span></a> - <meta itemprop="position" content="1"> - </li> - <li class="breadcrumb-item active" aria-current="page" itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"> - <span itemprop="name"><%= yield :title %></span> - <meta itemprop="position" content="2"> - </li> - </ol> </div> </header> <main class="page-with-blocks" id="main" role="main" tabindex="-1"> -- GitLab