Skip to content

Commit 4bb172d

Browse files
committed
improve project cards
1 parent fe7513e commit 4bb172d

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/components/Button.astro

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@ interface Props {
55
url: string
66
target?: string
77
class?: string
8+
type?: "default" | "outline"
89
}
910
10-
const { url, target } = Astro.props
11+
const { url, target, type } = Astro.props
1112
---
1213

1314
<a
1415
href={url}
1516
target={target ?? "_blank"}
1617
class={cn(
1718
"button flex max-w-max justify-center gap-1 rounded-xl bg-deepCyan px-5 py-2.5 align-middle text-base font-bold text-black shadow transition-all hover:scale-[1.02]",
19+
type == "outline" &&
20+
"bg-black text-white hover:border-deepPink border-deepPurple border",
1821
Astro.props.class,
1922
)}><slot /></a
2023
>

src/components/homepage/ProjectBody.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface Props {
1717
// Left side content
1818
}
1919
<div
20-
class="flex w-1/2 min-w-0 max-w-max shrink grow-[5] flex-col justify-end @4xl:min-w-20 sm:p-8 lg:p-8"
20+
class="flex w-1/2 min-w-0 shrink grow-[5] flex-col justify-end @md:max-w-max @4xl:min-w-20"
2121
>
2222
<slot name="logo" />
2323

src/components/homepage/ProjectLogo.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const { hasBanner, src, name } = Astro.props
1212

1313
<div
1414
class={cn([
15-
"relative mb-4",
15+
"relative mb-4 pl-6 @md:pl-8",
1616
hasBanner &&
1717
"flex h-full w-full grow items-center @xl:justify-start justify-center max-2xl:@2xl:mx-0 max-2xl:@2xl:block max-2xl:@2xl:h-auto max-2xl:@2xl:grow-0",
1818
])}

src/pages/index.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const projects: {
127127
name={name}
128128
description={description}
129129
>
130-
<Button url={url} slot="button">
130+
<Button url={url} slot="button" type="outline">
131131
{button}
132132
{url.startsWith("http") && <IconOutlink class="size-6" />}
133133
</Button>

0 commit comments

Comments
 (0)