From adcf6e1e5826d1033a5f642d5b6b8a8eb86e3a79 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 19 Mar 2024 01:38:58 +0100 Subject: Placeholder image for avatar --- src/components/landing/sections/Hero.module.css | 13 ++++++++++- src/components/landing/sections/Hero.tsx | 30 ++++++++++++++++--------- 2 files changed, 31 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/components/landing/sections/Hero.module.css b/src/components/landing/sections/Hero.module.css index 0909c3f..4c55001 100644 --- a/src/components/landing/sections/Hero.module.css +++ b/src/components/landing/sections/Hero.module.css @@ -35,13 +35,24 @@ } } -.avatar__image { +.avatar__holder { + position: relative; + overflow: hidden; + aspect-ratio: 1/1; width: 100%; height: auto; max-width: 298px; border-radius: 100em; } +.avatar__image { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + .introduction { font-family: var(--ifm-font-family-base); font-weight: 500; diff --git a/src/components/landing/sections/Hero.tsx b/src/components/landing/sections/Hero.tsx index b4be44d..cdd5953 100644 --- a/src/components/landing/sections/Hero.tsx +++ b/src/components/landing/sections/Hero.tsx @@ -16,7 +16,7 @@ import { LinkedInIcon, OrcidIcon, } from '@site/src/components/icons'; -import avatar from '@site/src/pages/avatar.jpg?sizes[]=149&sizes[]=298&sizes[]=596&rl'; +import avatar from '@site/src/pages/avatar.jpg?placeholder=true&sizes[]=149&sizes[]=298&sizes[]=596&rl'; import styles from './Hero.module.css'; @@ -28,16 +28,24 @@ export default function Hero() {
- My photo +
+ My photo +

-- cgit v1.2.3-70-g09d2