Skip to content

Commit

Permalink
Update layout for people cards (full-sized pictures in desktop mode, …
Browse files Browse the repository at this point in the history
…inspired and adapted from #50)
  • Loading branch information
marcopernpruner committed Jan 11, 2024
1 parent 13c4c89 commit d630457
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
6 changes: 3 additions & 3 deletions _includes/list-people.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
{% endif %}

{% if style == "card" %}
<div class="column is-3-desktop is-4-tablet">
<div class="column is-one-fifth-desktop is-4-tablet">
<div class="card person">
{% if details contains "picture" %}
{% assign staticImageName = person.id | append: ".jpg" %}
Expand All @@ -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 %}
Expand Down
22 changes: 18 additions & 4 deletions assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -52,7 +53,6 @@
font-size: 1rem;
}

.card.person,
.card.project {
padding-top: 1.3em;
}
Expand All @@ -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;
Expand All @@ -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 {
Expand Down

0 comments on commit d630457

Please sign in to comment.