Skip to content

Commit 6e3cdf4

Browse files
committed
feat: 好久没提交了,诶,随便交点吧
1 parent 4504bed commit 6e3cdf4

File tree

8 files changed

+51
-137
lines changed

8 files changed

+51
-137
lines changed

config/friends.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
export const friendsList: FriendModel[] = [
2+
{
3+
name: 'YYGod',
4+
url: 'https://www.yygod0120.com/zh-CN/about',
5+
avatar: 'https://avatars.githubusercontent.com/u/116366929?v=4',
6+
desc: '美团架构师',
7+
},
8+
{
9+
name: 'CeazzZY',
10+
url: 'https://ceazzzy.github.io/',
11+
avatar: 'https://avatars.githubusercontent.com/u/60310690?v=4',
12+
desc: '字节臂展腾旭架构师.',
13+
},
14+
{
15+
name: 'sunsunmonkey',
16+
url: 'https://sunsunmonkey.github.io/',
17+
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
18+
desc: '司马架构师',
19+
},
20+
{
21+
name: 'seasaon',
22+
url: 'https://seasonhl.github.io/',
23+
avatar: 'https://avatars.githubusercontent.com/u/93079830?v=4',
24+
desc: '快手转正犬',
25+
},
26+
];
27+
28+
export interface FriendModel {
29+
name: string;
30+
url: string;
31+
avatar: string;
32+
desc: string;
33+
}

config/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
export { seo } from './seo';
2+
export { friendsList } from './friends';
3+
4+
export type { FriendModel } from './friends';

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"dev": "set ANALYZE=false && next dev",
6+
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
99
"lint": "eslint \"src/**/*.{js,ts,jsx,tsx}\" --fix",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const BlogCardList = () => {
245245
];
246246

247247
return (
248-
<div className=" w-full mt-10 md:mt-16 flex flex-col gap-y-8 px-8">
248+
<div className=" w-full mt-10 md:mt-16 flex flex-col gap-y-8 px-4">
249249
<span className="text-2xl font-medium leading-loose md:ml-4 font-mono hidden gap-x-2 items-center md:flex">
250250
最近文章
251251
<span className=" i-material-symbols-kid-star-outline cursor-pointer hover:rotate-[720deg] animate-ease-out duration-150" />
@@ -257,7 +257,7 @@ const BlogCardList = () => {
257257

258258
const WindVane = () => {
259259
return (
260-
<div className=" w-full mt-10 md:mt-16 flex flex-col gap-y-8 px-8">
260+
<div className=" w-full mt-10 md:mt-16 flex flex-col gap-y-8 px-4">
261261
<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 ">
262262
风向标
263263
<span className=" i-mingcute-navigation-line cursor-pointer hover:rotate-[360deg] animate-ease-out duration-200" />

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

Lines changed: 2 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -4,137 +4,9 @@ import { motion } from 'framer-motion';
44
import { memo, useState } from 'react';
55
import Image from 'next/image';
66

7-
interface FriendModel {
8-
name: string;
9-
url: string;
10-
avatar: string;
11-
desc: string;
12-
}
7+
import { friendsList, type FriendModel } from '~/index';
138

149
export default function Friends() {
15-
const friendData: FriendModel[] = [
16-
{
17-
name: 'Alice',
18-
url: 'https://www.baidu.com',
19-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
20-
desc: 'A passionate developer and a great friend.',
21-
},
22-
{
23-
name: 'Bob',
24-
url: 'https://bob.example.com',
25-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
26-
desc: 'Bob loves working on open-source projects.',
27-
},
28-
{
29-
name: 'Charlie',
30-
url: 'https://charlie.example.com',
31-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
32-
desc: 'Charlie is a fantastic designer and loves to create beautiful UIs.',
33-
},
34-
{
35-
name: 'Dave',
36-
url: 'https://dave.example.com',
37-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
38-
desc: 'A data science enthusiast and machine learning expert.',
39-
},
40-
{
41-
name: 'Eve',
42-
url: 'https://eve.example.com',
43-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
44-
desc: 'Eve loves cybersecurity and cryptography.',
45-
},
46-
{
47-
name: 'Frank',
48-
url: 'https://frank.example.com',
49-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
50-
desc: 'Frank is a backend engineer with years of experience.',
51-
},
52-
{
53-
name: 'Grace',
54-
url: 'https://grace.example.com',
55-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
56-
desc: 'Grace is a machine learning researcher.',
57-
},
58-
{
59-
name: 'Heidi',
60-
url: 'https://heidi.example.com',
61-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
62-
desc: 'Heidi enjoys working on cloud computing.',
63-
},
64-
{
65-
name: 'Ivan',
66-
url: 'https://ivan.example.com',
67-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
68-
desc: 'Ivan specializes in database optimization.',
69-
},
70-
{
71-
name: 'Judy',
72-
url: 'https://judy.example.com',
73-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
74-
desc: 'Judy is a frontend developer with a passion for animations.',
75-
},
76-
{
77-
name: 'Karl',
78-
url: 'https://karl.example.com',
79-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
80-
desc: 'Karl is a mobile developer working on iOS apps.',
81-
},
82-
{
83-
name: 'Lara',
84-
url: 'https://lara.example.com',
85-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
86-
desc: 'Lara enjoys writing clean, maintainable code.',
87-
},
88-
{
89-
name: 'Mallory',
90-
url: 'https://mallory.example.com',
91-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
92-
desc: 'Mallory is an expert in penetration testing.',
93-
},
94-
{
95-
name: 'Nina',
96-
url: 'https://nina.example.com',
97-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
98-
desc: 'Nina is passionate about AR/VR development.',
99-
},
100-
{
101-
name: 'Oscar',
102-
url: 'https://oscar.example.com',
103-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
104-
desc: 'Oscar loves contributing to open-source projects.',
105-
},
106-
{
107-
name: 'Peggy',
108-
url: 'https://peggy.example.com',
109-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
110-
desc: 'Peggy is a blockchain developer.',
111-
},
112-
{
113-
name: 'Quinn',
114-
url: 'https://quinn.example.com',
115-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
116-
desc: 'Quinn focuses on DevOps and cloud infrastructure.',
117-
},
118-
{
119-
name: 'Rita',
120-
url: 'https://rita.example.com',
121-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
122-
desc: 'Rita is an AI researcher and educator.',
123-
},
124-
{
125-
name: 'Steve',
126-
url: 'https://steve.example.com',
127-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
128-
desc: 'Steve enjoys developing Android applications.',
129-
},
130-
{
131-
name: 'Trudy',
132-
url: 'https://trudy.example.com',
133-
avatar: 'https://avatars.githubusercontent.com/u/116412388?v=4',
134-
desc: 'Trudy works on full-stack web applications.',
135-
},
136-
];
137-
13810
return (
13911
<div>
14012
<header className="prose prose-p:my-2 font-mono">
@@ -143,7 +15,7 @@ export default function Friends() {
14315
</header>
14416

14517
<main className="mt-10 flex w-full flex-col">
146-
<FriendCardList data={friendData} />
18+
<FriendCardList data={friendsList} />
14719
</main>
14820
</div>
14921
);

src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Metadata, Viewport } from 'next';
66
import WebAppProviders from '@/components/providers/root';
77
import AccentColorStyleInjector from '@/components/modules/shared/AccentColorStyleInjector';
88
import Root from '@/components/layout/Root';
9-
import { seo } from '~/seo';
9+
import { seo } from '~/index';
1010

1111
export const metadata: Metadata = {
1212
metadataBase: seo.url,

src/components/ui/ThemeSwitcher/ThemeSwitcher.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const ThemeIndicator = () => {
105105

106106
return (
107107
<div
108-
className="absolute top-[4px] z-[-1] size-[32px] rounded-full bg-base-100 shadow-[0_1px_2px_0_rgba(127.5,127.5,127.5,.2),_0_1px_3px_0_rgba(127.5,127.5,127.5,.1)] duration-200"
108+
className="absolute top-[4px] z-[-1] size-[32px] rounded-full bg-base-100 shadow-[0_1px_2px_0_rgba(127.5,127.5,127.5,.2),_0_1px_3px_0_rgba(127.5,127.5,127.5,.8)] duration-200"
109109
style={{
110110
left: { light: 4, system: 36, dark: 68 }[theme],
111111
}}

src/components/ui/focus-cards.tsx/FocusCards.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ export const Card = React.memo(
2525
hovered !== null && hovered !== index && 'blur-sm scale-[0.98]',
2626
)}
2727
>
28-
<Image src={card.src} alt={card.title} fill className="object-cover absolute inset-0" />
28+
<Image
29+
src={card.src}
30+
alt={card.title}
31+
fill
32+
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
33+
className="object-cover absolute inset-0"
34+
/>
2935
<div
3036
className={cn(
3137
'absolute inset-0 bg-black/50 flex flex-col justify-end py-8 px-4 transition-opacity duration-300', // 修改为 flex-col
@@ -63,7 +69,7 @@ export function FocusCards({ cards }: { cards: Card[] }) {
6369
const [hovered, setHovered] = useState<number | null>(null);
6470

6571
return (
66-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10 max-w-[7xl] mx-auto md:px-8 w-full">
72+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-14 max-w-[7xl] mx-auto md:px-8 w-full">
6773
{cards.map((card, index) => (
6874
<Card
6975
key={card.title}

0 commit comments

Comments
 (0)