diff --git a/app/blog/page.tsx b/app/blog/page.tsx index 1fe572ee82d..4468664f183 100644 --- a/app/blog/page.tsx +++ b/app/blog/page.tsx @@ -43,21 +43,8 @@ export default function Page(): React.ReactElement { return ( <> -
+
- {/* Header */} -
-

- - Avalanche Builder Blog - -

-

- Takeaways and tutorials from building a network of fast, - efficient, highly-optimized chains. -

-
- {/* Blog List with Search */}
diff --git a/components/blog/blog-list.tsx b/components/blog/blog-list.tsx index 036164d0fe9..e99f8c13de7 100644 --- a/components/blog/blog-list.tsx +++ b/components/blog/blog-list.tsx @@ -25,16 +25,15 @@ interface BlogListProps { export function BlogList({ blogs }: BlogListProps) { const [filteredBlogs, setFilteredBlogs] = useState(blogs); const handleFilteredResults = useCallback((filtered: BlogPost[]) => {setFilteredBlogs(filtered)}, []); - const [featured, ...others] = filteredBlogs; return ( <> -
+
{filteredBlogs.length !== blogs.length && ( -
+

Showing {filteredBlogs.length} of {blogs.length} blog posts

@@ -42,7 +41,7 @@ export function BlogList({ blogs }: BlogListProps) { )} {filteredBlogs.length === 0 && ( -
+

No matching blog posts found

@@ -52,108 +51,140 @@ export function BlogList({ blogs }: BlogListProps) {
)} - {/* Featured Post */} - {featured && ( -
- -
-
-

- {new Date( - featured.data.date ?? featured.url - ).toDateString()} -

- - Featured - -
+ {/* Blog Grid */} + {filteredBlogs.length > 0 && ( +
+ {/* Featured Post - Full Width */} + {filteredBlogs[0] && ( + + {/* Hover gradient overlay */} +
-

- {featured.data.title} -

- -

- {featured.data.description} -

- -
- {featured.data.topics.map((topic: string) => ( - - {topic} +
+ {/* Header */} +
+ + Latest - ))} -
+ +
-
- {featured.data.authors.map((author: string) => ( - - - {author} - - ))} - - Read article{" "} - - -
-
- -
- )} + {/* Title */} +

+ {filteredBlogs[0].data.title} +

- {/* All Posts */} - {others.length > 0 && ( -
-

- {filteredBlogs.length === blogs.length - ? "Latest posts" - : "More matching posts"} -

-
- {others.map((g) => ( - -

- {new Date(g.data.date ?? g.url).toDateString()} -

-

- {g.data.title} -

-

- {g.data.description} + {/* Description */} +

+ {filteredBlogs[0].data.description}

-
- {g.data.topics.map((topic: string) => ( + + {/* Topics */} +
+ {filteredBlogs[0].data.topics.slice(0, 4).map((topic: string) => ( {topic} ))} + {filteredBlogs[0].data.topics.length > 4 && ( + + +{filteredBlogs[0].data.topics.length - 4} + + )}
-
- {g.data.authors.map((author: string) => ( - - - {author} + + {/* Authors & Read More */} +
+
+ {filteredBlogs[0].data.authors.slice(0, 2).map((author: string) => ( + + + {author} + + ))} + {filteredBlogs[0].data.authors.length > 2 && ( + +{filteredBlogs[0].data.authors.length - 2} + )} +
+ + Read article + + +
+
+ + )} + + {/* Regular Grid */} +
+ {filteredBlogs.slice(1).map((post) => ( + + {/* Hover gradient overlay */} +
+ +
+ {/* Header */} + + + {/* Title */} +

+ {post.data.title} +

+ + {/* Description */} +

+ {post.data.description} +

+ + {/* Topics */} +
+ {post.data.topics.slice(0, 3).map((topic: string) => ( + + {topic} + + ))} + {post.data.topics.length > 3 && ( + + +{post.data.topics.length - 3} + + )} +
+ + {/* Authors & Read More */} +
+
+ {post.data.authors.slice(0, 2).map((author: string) => ( + + + {author} + + ))} + {post.data.authors.length > 2 && ( + +{post.data.authors.length - 2} + )} +
+ + Read + - ))} +
))} diff --git a/components/blog/blog-search.tsx b/components/blog/blog-search.tsx index 5d1d63e3cc3..71d27f4d2c3 100644 --- a/components/blog/blog-search.tsx +++ b/components/blog/blog-search.tsx @@ -45,22 +45,25 @@ export function BlogSearch({ blogs, onFilteredResults }: BlogSearchProps) { }, [filteredBlogs, onFilteredResults]); return ( -
- - setSearchQuery(e.target.value)} - className="pl-10 pr-10 rounded-xl bg-white text-sm" - /> - {searchQuery && ( - - )} +
+
+ + setSearchQuery(e.target.value)} + className="pl-12 pr-12 py-6 rounded-xl bg-card/60 backdrop-blur-sm border-border/50 text-base shadow-lg transition-all duration-300 focus:shadow-xl focus:border-primary/30 focus:ring-2 focus:ring-primary/20" + /> + {searchQuery && ( + + )} +
); }