Skip to content
Snippets Groups Projects
Unverified Commit 4830c674 authored by Olivia Simonet's avatar Olivia Simonet Committed by GitHub
Browse files

Ajustement des logos des organisations (#2113)


* fixed organizations logo display

* added style

* removed unnecessary fit param

* removed unnecessary line

* better

* fix

---------

Co-authored-by: Arnaud Levy's avatarArnaud Levy <arnaud.levy@noesya.coop>
Co-authored-by: default avatarArnaud Levy <contact@arnaudlevy.com>
parent b6565d01
No related branches found
No related tags found
No related merge requests found
......@@ -20,3 +20,6 @@
max-width: 300px
&--uncropped
padding: 20%
.organizations-index &
img
mix-blend-mode: multiply
<%
size = large ? 300 : 100
image_class = 'img-fluid'
image_variant = nil
if image && image.attached?
image_variant = image
if image.variable?
if cropped
image_variant = image.variant(resize_to_fill: [size, size, gravity: 'center'])
else
image_variant = image.variant(resize_to_fit: [size, size])
image_class += ' h-100 w-100 object-fit-contain'
end
end
end
%>
<div class="osuny__thumbnail
osuny__thumbnail--<%= large ? 'large' : 'small' %>
osuny__thumbnail--<%= cropped ? 'cropped' : 'uncropped' %>">
<% if image && image.attached? %>
<% image_square = image.variable? ? image.variant(resize_to_fill: [size, size, gravity: 'center'])
: image %>
<%= image_tag image_square, class: 'img-fluid', loading: 'lazy' %>
<% if image_variant %>
<%= image_tag image_variant, class: image_class, loading: 'lazy' %>
<% else %>
<span class="osuny__thumbnail__initials">
<%= initials %>
......
This diff is collapsed.
one:
university: default_university
language: fr
journal: default_journal
title: Articles
slug: articles
two:
university: default_university
language: fr
journal: default_journal
title: Recensions
slug: recensions
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