File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import { usePathname } from "next/navigation" ;
4+ import { BookOpen , BookUp2 , ExternalLink } from "lucide-react" ;
5+ const HelpDocsButton = ( ) => {
6+ const pathname = usePathname ( ) ;
7+ if ( pathname === "/" ) return null ;
8+ return (
9+ < a
10+ href = "https://evolutionary-algorithms-on-click.github.io/user_docs/user-guide/ea-run.html"
11+ target = "_blank"
12+ rel = "noopener noreferrer"
13+ className = "fixed bottom-6 right-6 z-50 flex items-center gap-2 bg-yellow-400 hover:bg-yellow-500 text-black font-bold py-3 px-5 rounded-full shadow-2xl transition-all duration-300 transform hover:scale-105 active:scale-95 border-2 border-black"
14+ id = "help-docs-button"
15+ >
16+ < BookUp2 size = { 20 } />
17+ < span className = "hidden md:inline" > Read our docs</ span >
18+
19+ < ExternalLink size = { 16 } className = "opacity-70" />
20+ </ a >
21+ ) ;
22+ } ;
23+
24+ export default HelpDocsButton ;
Original file line number Diff line number Diff line change 11import localFont from "next/font/local" ;
22import "./globals.css" ;
33import { PublicEnvScript } from "next-runtime-env" ;
4+ import HelpDocsButton from "./_components/HelpDocsButton" ;
45
56const geistSans = localFont ( {
67 src : "./fonts/GeistVF.woff" ,
@@ -52,6 +53,7 @@ export default function RootLayout({ children }) {
5253 className = { `${ geistSans . variable } ${ geistMono . variable } antialiased` }
5354 >
5455 { children }
56+ < HelpDocsButton />
5557 </ body >
5658 </ html >
5759 ) ;
You can’t perform that action at this time.
0 commit comments