Improves image and shrinks size
This commit is contained in:
@@ -1,8 +1,34 @@
|
|||||||
.h-card {
|
.h-card {
|
||||||
img {
|
div:has(img) {
|
||||||
width: 6rem;
|
width: 6rem;
|
||||||
height: 6rem;
|
height: 6rem;
|
||||||
border-radius: 1rem;
|
margin-inline: auto;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 6rem;
|
||||||
|
height: 6rem;
|
||||||
|
border-radius: 1rem;
|
||||||
|
filter: contrast(1.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
/* Colour overlay */
|
||||||
|
background-color: var(--colour-primary-80);
|
||||||
|
opacity: 0.3;
|
||||||
|
|
||||||
|
/* Same size and shape as the img */
|
||||||
|
border-radius: 1rem;
|
||||||
|
width: 6rem;
|
||||||
|
height: 6rem;
|
||||||
|
|
||||||
|
/* Positioned on top of the img */
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
top: -6rem;
|
||||||
|
|
||||||
|
/* A content value is needed to get the ::after to render */
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16,7 +42,7 @@
|
|||||||
"empty heading"
|
"empty heading"
|
||||||
"photo text";
|
"photo text";
|
||||||
|
|
||||||
img {
|
div:has(img) {
|
||||||
grid-area: photo;
|
grid-area: photo;
|
||||||
margin-block-start: var(--spacing-block-sm);
|
margin-block-start: var(--spacing-block-sm);
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 949 KiB |
BIN
website/public/images/headshot.webp
Normal file
BIN
website/public/images/headshot.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
@@ -2,7 +2,9 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
<section class="h-card">
|
<section class="h-card">
|
||||||
<img class="u-photo" src="/images/headshot.jpg" height="256" width="256" />
|
<div>
|
||||||
|
<img class="u-photo" src="/images/headshot.webp" height="96" width="96" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<h1>
|
<h1>
|
||||||
|
|||||||
Reference in New Issue
Block a user