Skip to content

Commit 4acff18

Browse files
author
gptkong
committed
Add NavCard component and front-end interview resources post
1 parent ddeabc3 commit 4acff18

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

src/components/NavCard.tsx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import React from "react";
2+
import { Album } from "lucide-react";
3+
4+
type NavCardProps = {
5+
title: string;
6+
description: string;
7+
href: string;
8+
icon?: React.ElementType;
9+
};
10+
11+
export default function NavCard({
12+
title,
13+
description,
14+
href,
15+
icon,
16+
}: NavCardProps) {
17+
const Icon = icon;
18+
return (
19+
<a
20+
href={href}
21+
className="block rounded-xl border border-gray-200 bg-white p-6 shadow-md transition hover:shadow-lg hover:border-blue-400 group"
22+
target="_blank"
23+
rel="noopener noreferrer"
24+
>
25+
<div className="flex items-center space-x-4">
26+
<div className="text-blue-500 text-3xl">
27+
{Icon ? <Icon /> : <Album />}
28+
</div>
29+
<div>
30+
<h3 className="text-lg font-semibold group-hover:text-blue-600">
31+
{title}
32+
</h3>
33+
<p className="text-gray-500 text-sm">{description}</p>
34+
</div>
35+
</div>
36+
</a>
37+
);
38+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: 前端面试学习资源
3+
pubDate: 2025-07-02
4+
description: 前端面试学习资源收集
5+
tags: [front-end, 前端, 面试, js, ts, webpack, 设计模式]
6+
---
7+
import NavCard from '@/components/NavCard'
8+
9+
10+
<NavCard
11+
title="Front-End-Lib"
12+
description="notion 整理的笔记库"
13+
href="https://evelance.notion.site/Front-End-Lib-641a7f4ffdc643239155757324fdce02" />

0 commit comments

Comments
 (0)