Skip to content

Commit 9c25798

Browse files
committed
feat: homePage 新增了一些东西
1 parent 6e3cdf4 commit 9c25798

File tree

4 files changed

+367
-19
lines changed

4 files changed

+367
-19
lines changed

src/app/(app)/(home)/page.tsx

Lines changed: 104 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,59 @@ import Image from 'next/image';
66

77
import { TextUpTransitionView } from '@/components/ui/transition/TextUpTransitionView';
88
import { SocialIcon } from '@/components/modules/home/SocialIcon';
9+
import {
10+
FaSolidFeatherAlt,
11+
FaSolidHistory,
12+
FaSolidUserFriends,
13+
IcTwotoneSignpost,
14+
MdiFlask,
15+
MdiLightbulbOn20,
16+
RMixPlanet,
17+
} from '@/components/icons/menu-collection';
918
import { cn } from '@/lib/helper';
1019
import { FocusCards } from '@/components/ui/focus-cards.tsx';
1120

21+
const windsock = [
22+
{
23+
title: '文稿',
24+
path: '/posts',
25+
type: 'Post',
26+
subMenu: [],
27+
icon: IcTwotoneSignpost,
28+
},
29+
{
30+
title: '手记',
31+
type: 'Note',
32+
path: '/notes',
33+
icon: FaSolidFeatherAlt,
34+
},
35+
{
36+
title: '度过的时光',
37+
icon: FaSolidHistory,
38+
path: '/timeline',
39+
},
40+
{
41+
title: '朋友们',
42+
icon: FaSolidUserFriends,
43+
path: '/friends',
44+
},
45+
{
46+
title: '写下一点思考',
47+
icon: MdiLightbulbOn20,
48+
path: '/thinking',
49+
},
50+
{
51+
title: '看看我做些啥',
52+
icon: MdiFlask,
53+
path: '/projects',
54+
},
55+
{
56+
title: '跃迁',
57+
icon: RMixPlanet,
58+
path: 'https://travel.moe/go.html',
59+
},
60+
];
61+
1262
export default function Home() {
1363
return (
1464
<div>
@@ -246,7 +296,7 @@ const BlogCardList = () => {
246296

247297
return (
248298
<div className=" w-full mt-10 md:mt-16 flex flex-col gap-y-8 px-4">
249-
<span className="text-2xl font-medium leading-loose md:ml-4 font-mono hidden gap-x-2 items-center md:flex">
299+
<span className="text-2xl font-medium leading-loose justify-center md:justify-start md:ml-4 font-mono gap-x-2 items-center flex">
250300
最近文章
251301
<span className=" i-material-symbols-kid-star-outline cursor-pointer hover:rotate-[720deg] animate-ease-out duration-150" />
252302
</span>
@@ -257,11 +307,62 @@ const BlogCardList = () => {
257307

258308
const WindVane = () => {
259309
return (
260-
<div className=" w-full mt-10 md:mt-16 flex flex-col gap-y-8 px-4">
261-
<span className="text-2xl flex justify-center md:justify-start items-center gap-x-2 text-center font-medium leading-loose md:ml-4 font-mono ">
310+
<div className=" w-full mt-14 md:mt-20 flex flex-col gap-y-8 px-4">
311+
<span className="text-2xl flex justify-center items-center gap-x-2 text-center font-medium leading-loose font-mono ">
262312
风向标
263313
<span className=" i-mingcute-navigation-line cursor-pointer hover:rotate-[360deg] animate-ease-out duration-200" />
264314
</span>
315+
<div className=" center flex">
316+
<ul className=" flex flex-col flex-wrap gap-2 gap-y-10 opacity-80 lg:flex-row">
317+
{windsock.map((item, index) => {
318+
return (
319+
<motion.li
320+
initial={{ opacity: 0.0001, y: 15 }}
321+
viewport={{ once: true }}
322+
whileInView={{
323+
opacity: 1,
324+
y: 0,
325+
transition: {
326+
stiffness: 641,
327+
damping: 23,
328+
mass: 3.9,
329+
type: 'spring',
330+
delay: index * 0.05,
331+
},
332+
}}
333+
transition={{
334+
delay: 0.001,
335+
}}
336+
whileHover={{
337+
y: -6,
338+
transition: {
339+
stiffness: 641,
340+
damping: 23,
341+
mass: 4.9,
342+
type: 'spring',
343+
},
344+
}}
345+
key={index}
346+
className="flex items-center justify-between text-sm group"
347+
>
348+
<a
349+
href={item.path}
350+
className="flex items-center gap-4 text-neutral-800 duration-200 hover:!text-accent dark:text-neutral-200 group-hover:text-[var(--accent-color)]"
351+
>
352+
{createElement(item.icon, {
353+
className: 'w-6 h-6 group-hover:text-[var(--accent-color)]',
354+
})}
355+
<span className=" group-hover:text-[var(--accent-color)]">{item.title}</span>
356+
</a>
357+
358+
{index != windsock.length - 1 && (
359+
<span className="mx-4 hidden select-none lg:inline"> · </span>
360+
)}
361+
</motion.li>
362+
);
363+
})}
364+
</ul>
365+
</div>
265366
</div>
266367
);
267368
};

0 commit comments

Comments
 (0)