Skip to content

Commit

Permalink
feat: ✨ update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuba-Ahhh committed Aug 23, 2024
1 parent f2f1730 commit df9e9be
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,21 @@ export default function Home() {
<h2 className="text-3xl font-semibold mb-4">最新文章</h2>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
{sortedPosts.map((post, index) => (
<motion.div
key={post.id}
className="bg-white bg-opacity-10 p-6 rounded-xl backdrop-blur-lg cursor-pointer border border-white border-opacity-20"
whileHover={{
scale: 1.03,
backgroundColor: "rgba(255,255,255,0.15)",
}}
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: index * 0.1 }}
>
<h3 className="text-xl font-semibold mb-2">{post.title}</h3>
<p className="text-sm opacity-80">{post.date}</p>
</motion.div>
<Link href={`/blog/${post.id}`} key={post.id}>
<motion.div
className="bg-white bg-opacity-10 p-6 rounded-xl backdrop-blur-lg cursor-pointer border border-white border-opacity-20"
whileHover={{
scale: 1.03,
backgroundColor: "rgba(255,255,255,0.15)",
}}
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: index * 0.1 }}
>
<h3 className="text-xl font-semibold mb-2">{post.title}</h3>
<p className="text-sm opacity-80">{post.date}</p>
</motion.div>
</Link>
))}
</div>
</motion.div>
Expand Down
1 change: 1 addition & 0 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default function Header() {
? "text-foreground"
: "text-foreground/60"
}`}
aria-current={pathname === item.href ? "page" : undefined}
>
{item.label}
</Link>
Expand Down

0 comments on commit df9e9be

Please sign in to comment.