Make the front image smaller and give it aspect ratio

This commit is contained in:
Michal Vanko 2023-09-01 11:29:28 +02:00
parent 734e40ed8b
commit 39955f64c8
2 changed files with 7 additions and 6 deletions

View File

@ -4,6 +4,7 @@
citeOwnerClass, citeOwnerClass,
mottoClass, mottoClass,
profilePicClass, profilePicClass,
profilePicImgClass,
twitchAsideClass, twitchAsideClass,
twitchEmbedClass, twitchEmbedClass,
twitchIframeClass, twitchIframeClass,
@ -19,14 +20,9 @@
<header class="index-header"> <header class="index-header">
<figure class="profile-pic {profilePicClass}"> <figure class="profile-pic {profilePicClass}">
<picture> <picture>
<source
media="(max-width: 550px)"
srcset={generateSrcSet('/images/profile-portugal-portrait.jpg', {
width: 500,
})}
/>
<img <img
alt="Portrait" alt="Portrait"
class="{profilePicImgClass}"
srcset={generateSrcSet('/images/profile-portugal-landscape.jpg', { srcset={generateSrcSet('/images/profile-portugal-landscape.jpg', {
width: 800, width: 800,
})} })}

View File

@ -14,6 +14,11 @@ export const profilePicClass = sprinkles({
marginY: 'none', marginY: 'none',
}) })
export const profilePicImgClass = style({
aspectRatio: "auto 800 / 709",
maxHeight: '66vh'
})
export const mottoClass = sprinkles({ export const mottoClass = sprinkles({
textAlign: 'center', textAlign: 'center',
marginX: 'auto', marginX: 'auto',