Skip to content

Commit d57776a

Browse files
committed
Update image size.
1 parent d8b6b10 commit d57776a

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/components/card/card.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import type { ImageMetadata } from "astro";
3+
import { Image } from "astro:assets";
34
import Button from "@ui/Button.astro";
45
56
export interface Props {
@@ -17,8 +18,8 @@ const { title, subtitle, url, image } = Astro.props;
1718
>
1819
<a href={url} class="block">
1920
<div class="relative w-full">
20-
<img
21-
src={image.src}
21+
<Image
22+
src={image}
2223
width={600}
2324
height={375}
2425
alt=`Card image - ${title}`

src/components/ui/Headline.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const isAnchor = !!id;
66
const isLink = !!href;
77
---
88

9-
<Tag id={isAnchor ? id : undefined} class={`m-5 py-2 text-center font-bold max-w-[90vw]`}>
9+
<Tag id={isAnchor ? id : undefined} class={`m-5 py-2 font-bold max-w-[90vw]`}>
1010
{isAnchor && (
1111
<a href={`#${id}`} aria-label={`Jump to ${id}`}>
1212
{Title}

src/pages/speaker/[slug].astro

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,24 @@ function getGitHosting(url: string): string | undefined {
9797
<article class="pb-12 px-6">
9898
<Headline as="h1" id="speaker" title={entry.data.name} />
9999

100+
<div class="md:grid grid-cols-[460px_1fr] md:gap-6">
100101
{
101102
( avatar &&
102-
<div class="border-4 border-white rounded-lg shadow-lg inline-block mb-10">
103+
<div class="flex items-start">
104+
<div class="border-4 border-white rounded-lg shadow-lg inline-block mb-10">
103105
<Picture
104106
src={avatar}
105107
alt={entry.data.name}
106108
inferSize={true}
107109
height={400}
108110
width={600}
109-
class="max-w-[240px] sm:max-w-[540px] xl:max-w-[620px] max-h-[240px] sm:max-h-[440px] xl:max-h-[440px] object-scale-down"
111+
class="w-full max-w-[240px] sm:max-w-[540px] xl:max-w-[720px] max-h-[240px] sm:max-h-[440px] xl:max-h-[540px] object-scale-down"
110112
/>
111113
</div>
114+
</div>
112115
)
113116
}
117+
</div>
114118

115119
{
116120
entry.data.biography ? (

0 commit comments

Comments
 (0)