Skip to content
Snippets Groups Projects
Commit 624385fb authored by alexisben's avatar alexisben
Browse files

style

parent 9c624a74
No related branches found
No related tags found
No related merge requests found
.posts-show header
figure
position: relative
@include media-breakpoint-up(md)
display: inline-block
padding-left: 2.813rem
width: 25%
picture img
width: 100%
&.with-credit::after
......
<% 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>
<div class="row">
<div class="header__info col-md-8">
<h1><%= @post %></h1>
<p class="small">
<% if @post.published_at %>
Publié le <%= l @post.published_at.to_date, format: :long %>
<% end %>
<% if @post.category %>
<br>
Catégorie : <%= link_to @post.category, posts_category_path(slug: @post.category.slug), class: "link" %>
<% end %>
</figure>
<% end %>
</p>
</div>
<div class="col-md-4">
<% if @post.featured_image.attached? %>
<figure class="<% if @post.featured_image_credit.present? %>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>
</div>
<% end %>
......
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