Skip to content

Commit 74ea627

Browse files
committed
fix image aspect ratio not being consistent
1 parent 620b040 commit 74ea627

File tree

3 files changed

+14
-26
lines changed

3 files changed

+14
-26
lines changed

src/pages/articles/[article].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ if (article.data.author && !author)
5151
author && (
5252
<a
5353
href={`/members/${author.id}`}
54-
class="flex max-w-sm min-w-75 items-center gap-4 rounded-lg px-4 py-2 hover:bg-gray-100"
54+
class="flex max-w-sm min-w-75 items-center gap-4 rounded-lg px-4 py-2 hover:bg-gray-200"
5555
>
5656
<div class="h-14 w-14 overflow-clip rounded-full bg-gray-200">
5757
<Picture

src/pages/members.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const members = (await getCollection("members")).sort(
4545
fit="cover"
4646
alt={`${member.data?.nameJa} の写真`}
4747
src={member.data.upperBodyImage}
48-
width="300"
48+
width="400"
4949
height="400"
5050
/>
5151
<div class="absolute bottom-0 w-full min-w-45 bg-gradient-to-b from-transparent to-black px-6 pt-12 pb-6 text-white">

src/pages/members/[member].astro

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ const { Content } = await render(member);
2525
image={member.data.upperBodyImage}
2626
>
2727
<main class="w-full">
28-
<header
29-
class="h-70 sm:h-100 lg:h-150"
28+
<div
29+
class=""
3030
style={`background-color: ${member.data["theme-light"] ?? "#DCFCE7"};`}
3131
>
32-
<div class="mx-auto flex h-full w-full max-w-5xl items-center">
33-
<div class="flex-1 px-4 py-12">
34-
<h1 class="text-3xl md:text-5xl lg:text-6xl">
32+
<div
33+
class="mx-auto flex h-full w-full max-w-5xl items-center justify-around"
34+
>
35+
<div class="w-fit flex-1 px-4 py-12">
36+
<h1 class="text-3xl">
3537
{member.data.nameJa}
3638
</h1>
3739
<h2 class="text-md mt-1 md:mt-4 md:text-xl lg:text-2xl">
@@ -43,14 +45,11 @@ const { Content } = await render(member);
4345
<a
4446
href={`https://github.com/${member.data.github}`}
4547
target="_blank"
46-
class="relative -m-1 h-9 w-9 rounded-xl p-1"
48+
class="-m-1 rounded-xl p-1"
4749
rel="noreferrer"
4850
aria-label="GitHubを見る"
4951
>
50-
<Icon
51-
name="feather:github"
52-
class="relative active:top-0.25"
53-
/>
52+
<Icon name="feather:github" class="" />
5453
</a>
5554
)
5655
}
@@ -86,29 +85,18 @@ const { Content } = await render(member);
8685
{member.data.description}
8786
</p>
8887
</div>
89-
<div
90-
class="mr-4 min-w-[150px] flex-none overflow-clip rounded-full sm:hidden"
91-
>
92-
<Picture
93-
alt="メンバー顔写真"
94-
width="200"
95-
height="200"
96-
src={member.data.faceImage}
97-
class="object-cover"
98-
/>
99-
</div>
100-
<div class="hidden h-full flex-none sm:block">
88+
<div class="flex-1">
10189
<Picture
10290
fit="cover"
103-
class="h-full w-100 lg:w-150"
91+
class="w-40 rounded-full sm:w-100 sm:rounded-none lg:w-150"
10492
alt="メンバー写真"
10593
width="600"
10694
height="600"
10795
src={member.data.upperBodyImage}
10896
/>
10997
</div>
11098
</div>
111-
</header>
99+
</div>
112100
<article class="prose mx-auto mt-12 px-8 lg:max-w-screen-md lg:px-0">
113101
<Content />
114102
</article>

0 commit comments

Comments
 (0)