Skip to content
Snippets Groups Projects
Commit 9c624a74 authored by alexisben's avatar alexisben
Browse files

style wip

parent de18df8f
No related branches found
No related tags found
No related merge requests found
.posts-show header
figure
position: relative
@include media-breakpoint-up(md)
......
<% 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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment