-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorg with all new components and latest changes to gadget (#82)
* feat: add bridge and dev resources * chore: more fixes and updates * chore: fix fmt * feat: add docs for blueprint devs to run instant seal node * remove auto-insert-keys * chore: format * chore: fix links * chore: move bridge docs * Updates * feat: fix markdown theme rendering in codeblocks * chore: fmt * chore: fixes for shiki * chore: fix * chore: fmt * chore: fix * chore: attempt fix * chore: attempt fix * chore: fix * chore: fmt * feat: add more code links using file reader * chore: fix build * chore: fix * chore: fix paths * chore: fix path * chore: fix * chore: increase static page generation timeout --------- Co-authored-by: 1xstj <[email protected]> Co-authored-by: Trung-Tin Pham <[email protected]>
- Loading branch information
1 parent
1317509
commit 5f1dac7
Showing
60 changed files
with
1,077 additions
and
562 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import React from "react"; | ||
import Link from "next/link"; | ||
import { FaChevronRight } from "react-icons/fa"; | ||
|
||
interface TOCItem { | ||
title: string; | ||
href: string; | ||
subItems?: { | ||
title: string; | ||
description?: string; | ||
href?: string; | ||
}[]; | ||
} | ||
|
||
interface NonuniformTableOfContentCardsProps { | ||
items: TOCItem[]; | ||
} | ||
|
||
const NonuniformTableOfContentCards: React.FC< | ||
NonuniformTableOfContentCardsProps | ||
> = ({ items }) => { | ||
return ( | ||
<div className="columns-1 md:columns-2 lg:columns-3 gap-4 my-6"> | ||
{items.map((item, index) => ( | ||
<div | ||
key={index} | ||
className="relative p-5 border border-gray-200 dark:border-gray-800 rounded-lg | ||
hover:border-purple-500 dark:hover:border-purple-400 | ||
transition-all duration-200 hover:shadow-lg | ||
bg-gradient-to-br from-white to-gray-50 | ||
dark:from-gray-900 dark:to-gray-800 | ||
break-inside-avoid-column mb-4" | ||
> | ||
<Link href={item.href} className="group block"> | ||
<div className="flex justify-between items-start mb-3"> | ||
<h3 | ||
className="text-lg font-semibold text-gray-900 dark:text-gray-100 | ||
group-hover:text-purple-600 dark:group-hover:text-purple-400 | ||
transition-colors duration-200" | ||
> | ||
{item.title} | ||
</h3> | ||
<FaChevronRight | ||
className="text-gray-400 group-hover:text-purple-500 | ||
transform group-hover:translate-x-1 transition-all" | ||
/> | ||
</div> | ||
</Link> | ||
|
||
{item.subItems && ( | ||
<ul className="space-y-2"> | ||
{item.subItems.map((subItem, subIndex) => ( | ||
<li key={subIndex}> | ||
<Link | ||
href={subItem.href || item.href} | ||
className="group flex items-start" | ||
> | ||
<div | ||
className="inline-flex items-start space-x-2 px-2 py-1 rounded-md | ||
hover:bg-purple-50 dark:hover:bg-purple-900/20 | ||
transition-colors duration-200" | ||
> | ||
<span | ||
className="mt-1.5 w-1.5 h-1.5 rounded-full bg-purple-400 | ||
group-hover:bg-purple-500 flex-shrink-0" | ||
/> | ||
<div | ||
className="text-sm text-gray-600 dark:text-gray-400 | ||
group-hover:text-gray-900 dark:group-hover:text-gray-200" | ||
> | ||
<span className="font-medium">{subItem.title}</span> | ||
{subItem.description && ( | ||
<span className="block text-xs text-gray-500 dark:text-gray-500 mt-0.5"> | ||
{subItem.description} | ||
</span> | ||
)} | ||
</div> | ||
</div> | ||
</Link> | ||
</li> | ||
))} | ||
</ul> | ||
)} | ||
|
||
<div | ||
className="absolute inset-0 rounded-lg bg-purple-500/[0.03] | ||
opacity-0 group-hover:opacity-100 transition-opacity | ||
pointer-events-none" | ||
/> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
export default NonuniformTableOfContentCards; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.