Skip to content

Commit

Permalink
feat: add friends page
Browse files Browse the repository at this point in the history
  • Loading branch information
linxiaodong committed May 23, 2024
1 parent c99ee1f commit a5600a5
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 3 deletions.
35 changes: 35 additions & 0 deletions app/friends/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { genPageMetadata } from 'app/seo'
import { friendsData } from '@/data/friendsData'

export const metadata = genPageMetadata({ title: '友情链接' })
export default async function Projects() {
return (
<>
<div className="divide-y divide-gray-200 dark:divide-gray-700">
<div className="space-y-2 pb-8 pt-6 md:space-y-5">
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
我的朋友们
</h1>
<p className="text-lg leading-7 text-gray-500 dark:text-gray-400">
如果你也喜欢分享自己的好玩有事的事,欢迎咱们一起交换友链。你可以给我发送邮件:
<a href="mailto:[email protected]">[email protected]</a>
</p>
</div>
<div className="container py-2">
<div className="flex flex-wrap pt-4 md:-mr-6">
{friendsData.map((d) => (
<div key={d.title} className="pb-4 md:pr-6">
<div className="border p-4 hover:scale-[1.1] hover:bg-gray-100">
<a href={d.href} target="_blank">
<h3 className="text-xl text-gray-900 dark:text-gray-100">{d.title}</h3>
<p className="text-gray-500 dark:text-gray-400">{d.desc}</p>
</a>
</div>
</div>
))}
</div>
</div>
</div>
</>
)
}
8 changes: 6 additions & 2 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ export default function Footer() {
<Link href="/">{siteMetadata.title}</Link>
</div>
<div className="mb-8 text-sm text-gray-500 dark:text-gray-400">
<Link href="https://github.com/timlrx/tailwind-nextjs-starter-blog">
Tailwind Nextjs Theme
build with Next.js + tailwindcss + Vercel
<Link
href={siteMetadata.siteRepo}
className="ml-2 text-gray-500 underline underline-offset-4 dark:text-gray-400"
>
<span data-umami-event="view-source">View source</span>
</Link>
</div>
</div>
Expand Down
22 changes: 22 additions & 0 deletions data/friendsData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export const friendsData = [
{
title: '猛猛如玉',
href: 'https://amonxu.com/',
desc: '猛猛如玉的个人博客',
},
{
title: 'sun',
href: 'https://blog.csun.site/',
desc: 'sun的个人博客',
},
{
title: '91易搜',
href: 'https://www.91es.com',
desc: '阅读是一种生活方式',
},
{
title: '子舒',
href: 'https://www.zishu.me',
desc: '喜欢折腾技术,研究各种奇怪的程序和网站',
},
]
1 change: 1 addition & 0 deletions data/headerNavLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const headerNavLinks = [
{ href: '/blog', title: '文章' },
{ href: '/tags', title: '标签' },
{ href: '/projects', title: '开源项目' },
{ href: '/friends', title: '友链' },
{ href: '/about', title: '关于我' },
]

Expand Down
3 changes: 2 additions & 1 deletion data/projectsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ const projectsData: Project[] = [
]

export const repos = [
'buxuku/buxuku.github.io',
'buxuku/video-subtitle-master',
'buxuku/VideoSubtitleGenerator',
'buxuku/buxuku.github.io',
'buxuku/ai-code-reviewer',
'buxuku/hexo-generator-readme',
'buxuku/hexo-auto-issue',
Expand Down

0 comments on commit a5600a5

Please sign in to comment.