From d63045753ca5dd2ae939211c6221a9b3ffce030e Mon Sep 17 00:00:00 2001 From: Marco Pernpruner Date: Thu, 11 Jan 2024 10:49:38 +0100 Subject: [PATCH] Update layout for people cards (full-sized pictures in desktop mode, inspired and adapted from #50) --- _includes/list-people.html | 6 +++--- assets/css/custom.css | 22 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/_includes/list-people.html b/_includes/list-people.html index 667f8951..d84c0d72 100644 --- a/_includes/list-people.html +++ b/_includes/list-people.html @@ -216,7 +216,7 @@ {% endif %} {% if style == "card" %} -
+
{% if details contains "picture" %} {% assign staticImageName = person.id | append: ".jpg" %} @@ -228,10 +228,10 @@ {% elsif staticImage.size == 1 %} {% assign personImage = staticImage[0].path %} {% elsif person.usernameFBK %} - {% capture personImage %}https://my.fbk.eu/fbk-api/v2/picture/{{ person.usernameFBK }}?w=200{% endcapture %} + {% capture personImage %}https://my.fbk.eu/fbk-api/v2/picture/{{ person.usernameFBK }}?w=500{% endcapture %} {% elsif person.email %} {% if splitEmail[1] == "fbk.eu" %} - {% capture personImage %}https://my.fbk.eu/fbk-api/v2/picture/{{ splitEmail[0] }}?w=200{% endcapture %} + {% capture personImage %}https://my.fbk.eu/fbk-api/v2/picture/{{ splitEmail[0] }}?w=500{% endcapture %} {% else %} {% capture personImage %}/assets/images/no-user.jpg{% endcapture %} {% endif %} diff --git a/assets/css/custom.css b/assets/css/custom.css index 02a6e0cb..b9f631da 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -40,6 +40,7 @@ height: 100%; -webkit-box-shadow: 0 .5em 1em -.125em rgba(10,10,10,0.1),0 0px 0 1px rgba(10,10,10,0.02); -moz-box-shadow: 0 .5em 1em -.125em rgba(10,10,10,0.1),0 0px 0 1px rgba(10,10,10,0.02); + border-radius: 20px; } .card:hover { @@ -52,7 +53,6 @@ font-size: 1rem; } -.card.person, .card.project { padding-top: 1.3em; } @@ -75,6 +75,11 @@ opacity: 0.3; } +.card-image:first-child img { + border-top-left-radius: 20px; + border-top-right-radius: 20px; +} + .card.enterprise .card-image, .card.project .card-image { padding: 20px; @@ -97,9 +102,18 @@ } .card.person .card-image img { - border-radius: 15px; - width: auto; - max-height: 96px; + border-radius: 20px; + width: 100%; + aspect-ratio: 1/1; + object-fit: cover; +} + +@media (max-width: 768px) { + .card.person .card-image img { + margin-top: 30px; + width: 66%; + max-width: 200px; + } } .card.person .card-content {