11import React from 'react' ;
22import { Link , useLocation } from 'react-router-dom' ;
33import { ScriberrLogo } from './components/ScriberrLogo' ;
4- import { Github , Book , Code } from 'lucide-react' ;
5- import { Button } from './components/ui/Button' ;
4+ import { Github , Book , Menu , X } from 'lucide-react' ;
5+ import { useState } from 'react' ;
6+
7+
8+ import { GithubBadge } from './components/GithubBadge' ;
69
710interface LayoutProps {
811 children : React . ReactNode ;
@@ -11,6 +14,7 @@ interface LayoutProps {
1114export function Layout ( { children } : LayoutProps ) {
1215 const location = useLocation ( ) ;
1316 const isDocs = location . pathname . startsWith ( '/docs' ) ;
17+ const [ isMenuOpen , setIsMenuOpen ] = useState ( false ) ;
1418
1519 return (
1620 < div className = "min-h-screen flex flex-col font-sans selection:bg-[#FF6D20] selection:text-white" >
@@ -22,33 +26,55 @@ export function Layout({ children }: LayoutProps) {
2226 < ScriberrLogo />
2327 </ Link >
2428 { isDocs && (
25- < span className = "inline-flex items-center px-2 py-0.5 rounded text-xs font-semibold bg-orange-100 text-[#FF6D20] border border-orange-200" >
29+ < span className = "inline-flex items-center px-2 py-0.5 rounded text-xs font-semibold bg-orange-100 text-[#FF6D20] border border-orange-200 font-heading " >
2630 Docs
2731 </ span >
2832 ) }
2933 </ div >
3034
3135 < nav className = "hidden md:flex items-center gap-8" >
32- < Link to = "/#features" className = "text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors" > Features</ Link >
33- < Link to = "/docs/intro" className = "text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors" > Documentation</ Link >
34- < Link to = "/api" className = "text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors" > API</ Link >
36+ < Link to = "/docs/intro" className = "text-sm text-gray-600 hover:text-gray-900 transition-colors font-heading" > Documentation</ Link >
37+ < Link to = "/api" className = "text-sm text-gray-600 hover:text-gray-900 transition-colors font-heading" > API</ Link >
3538 </ nav >
3639
3740 < div className = "flex items-center gap-4" >
38- < a
39- href = "https://github.com/rishikanthc/Scriberr"
40- target = "_blank"
41- rel = "noopener noreferrer"
42- className = "p-2 text-gray-500 hover:text-gray-900 transition-colors"
43- aria-label = "GitHub"
44- >
45- < Github className = "w-5 h-5" />
46- </ a >
47- < div className = "hidden sm:block" >
48- < Button variant = "primary" size = "sm" > Get Started</ Button >
41+ < div className = "hidden md:block" >
42+ < GithubBadge />
4943 </ div >
44+ < button
45+ onClick = { ( ) => setIsMenuOpen ( ! isMenuOpen ) }
46+ className = "md:hidden flex items-center justify-center w-10 h-10 rounded-xl bg-white/80 border border-gray-200 shadow-sm text-gray-600 hover:text-[#FF6D20] hover:border-orange-200 hover:bg-orange-50 transition-all duration-200"
47+ aria-label = "Toggle menu"
48+ >
49+ { isMenuOpen ? < X className = "w-5 h-5" strokeWidth = { 2.5 } /> : < Menu className = "w-5 h-5" strokeWidth = { 2.5 } /> }
50+ </ button >
5051 </ div >
5152 </ div >
53+
54+ { /* Mobile Menu Overlay */ }
55+ { isMenuOpen && (
56+ < div className = "md:hidden absolute top-16 left-0 right-0 bg-white border-b border-gray-100 shadow-lg animate-fade-in z-40" >
57+ < nav className = "flex flex-col p-4 space-y-4" >
58+ < Link
59+ to = "/docs/intro"
60+ className = "text-sm font-medium text-gray-600 hover:text-gray-900 py-2 border-b border-gray-50 font-heading"
61+ onClick = { ( ) => setIsMenuOpen ( false ) }
62+ >
63+ Documentation
64+ </ Link >
65+ < Link
66+ to = "/api"
67+ className = "text-sm font-medium text-gray-600 hover:text-gray-900 py-2 border-b border-gray-50 font-heading"
68+ onClick = { ( ) => setIsMenuOpen ( false ) }
69+ >
70+ API
71+ </ Link >
72+ < div className = "pt-2" >
73+ < GithubBadge />
74+ </ div >
75+ </ nav >
76+ </ div >
77+ ) }
5278 </ header >
5379
5480 { /* Main Content */ }
@@ -57,21 +83,23 @@ export function Layout({ children }: LayoutProps) {
5783 </ main >
5884
5985 { /* Footer */ }
60- < footer className = "border-t border-gray-100 bg-gray-50 py-12 " >
86+ < footer className = "border-t border-gray-100 bg-gray-50 py-6 " >
6187 < div className = "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center gap-6" >
6288 < div className = "flex items-center gap-2" >
6389 < span className = "text-sm text-gray-500" > © 2025 Scriberr. All rights reserved.</ span >
6490 </ div >
6591 < div className = "flex items-center gap-6" >
66- < a href = "#" className = "text-gray-400 hover:text-gray-600 transition-colors" >
92+ < a
93+ href = "https://github.com/rishikanthc/scriberr"
94+ target = "_blank"
95+ rel = "noopener noreferrer"
96+ className = "text-gray-400 hover:text-gray-600 transition-colors"
97+ >
6798 < Github className = "w-5 h-5" />
6899 </ a >
69- < Link to = "/docs" className = "text-gray-400 hover:text-gray-600 transition-colors" >
100+ < Link to = "/docs/intro " className = "text-gray-400 hover:text-gray-600 transition-colors" >
70101 < Book className = "w-5 h-5" />
71102 </ Link >
72- < a href = "#" className = "text-gray-400 hover:text-gray-600 transition-colors" >
73- < Code className = "w-5 h-5" />
74- </ a >
75103 </ div >
76104 </ div >
77105 </ footer >
0 commit comments