handle images better

This commit is contained in:
2024-08-25 00:32:12 +02:00
parent 056d06a1e3
commit a965cda85f
3 changed files with 21 additions and 3 deletions
+17 -1
View File
@@ -1,5 +1,9 @@
---
import { Image } from 'astro:assets';
import logoImage from '../assets/img/yht_logo.png';
---
<div>
<img src="/assets/yht_logo.png" alt="YouHaveTrouble's logo">
<Image src={logoImage} alt="Logo displaying a stylized character with brown hair wearing purple hoodie on a light blue circle background" width="150" height="150"/>
<p>
Hi, I'm <strong>Paweł</strong>, also known by <strong>YouHaveTrouble</strong> on the internet.
I'm a full-stack web developer and minecraft plugin developer.
@@ -10,6 +14,7 @@
div {
align-items: center;
display: flex;
flex-direction: row;
}
img {
@@ -23,4 +28,15 @@
p {
font-size: 1.125rem;
}
@media screen and (max-width: 520px) {
div {
flex-direction: column;
}
img {
margin-right: unset;
width: 150px;
height: 150px;
}
}
</style>
+1 -1
View File
@@ -16,6 +16,6 @@ const { current = '' } = Astro.props;
</style>
<header>
<Logo />
<Logo width="50" height="50" />
<Nav current={current} />
</header>
+3 -1
View File
@@ -1,10 +1,12 @@
---
import { Image } from 'astro:assets';
import logoImage from '../assets/img/yht_logo.png';
const { width, height } = Astro.props;
---
<a href="/">
<Image src={logoImage} alt="Logo displaying a stylized character with brown hair wearing purple hoodie on a light blue circle background" width="50" height="50"/>
<Image src={logoImage} alt="Logo displaying a stylized character with brown hair wearing purple hoodie on a light blue circle background" width={width} height={height}/>
</a>
<style>