Skip to content

Commit 31ce943

Browse files
authored
Update card component look. (#1067)
<!-- readthedocs-preview ep-website start --> 🖼️ Preview available 🖼️ : https://ep-website--1067.org.readthedocs.build/ <!-- readthedocs-preview ep-website end -->
1 parent e502e15 commit 31ce943

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const CardContainer = ({ children }: { children: React.ReactNode }) => (
2-
<section className="justify-around gap-12 flex flex-wrap px-6">
2+
<section className="justify-center gap-6 flex flex-wrap px-6">
33
{children}
44
</section>
55
);

src/components/card/card.astro

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,29 @@ export interface Props {
1313
const { title, subtitle, url, image } = Astro.props;
1414
---
1515

16-
<div class="block min-w-[250px] w-full md:w-[40%] lg:w-[30%] text-center">
16+
<div class="block min-w-[250px] w-full md:w-[40%] lg:w-[30%] p-4 bg-[#D5D6E6] rounded-2xl text-center flex flex-col">
1717
<a href={url} class="block">
1818
<div class="relative w-full mb-4">
1919
<Image
2020
src={image}
2121
width={600}
2222
height={375}
2323
alt=""
24-
class="rounded-2xl aspect-[3/2] w-full"
24+
class="rounded-xl aspect-[3/2] w-full"
2525
loading="lazy"
2626
/>
2727
</div>
28-
<h3 class="text-3xl font-bold mt-2 mb-4 text-primary">{title}</h3>
2928
</a>
30-
<ButtonLink
31-
url={url}
32-
className="mb-4"
33-
isExternal={false}
34-
>
35-
{subtitle}
36-
</ButtonLink>
37-
<p class="text-lg">
29+
<div class="flex items-center flex-col flex-grow mb-2">
30+
<a href={url} class="block hover:underline">
31+
<h3 class="text-2xl text-primary">{title}</h3>
32+
</a>
3833
<slot />
39-
</p>
34+
</div>
35+
<a class="text-xs px-2 py-1 mt-4 bg-[#141F36] text-white rounded-[10px] inline-block w-fit mx-auto leading-4 hover:bg-button-hover not-prose mt-auto" href="{url}">
36+
{subtitle}
37+
<span class="inline-block ml-1 font-system text-lg leading-4">
38+
39+
</span>
40+
</a>
4041
</div>

0 commit comments

Comments
 (0)