File tree Expand file tree Collapse file tree 6 files changed +35
-23
lines changed
Expand file tree Collapse file tree 6 files changed +35
-23
lines changed Original file line number Diff line number Diff line change 1313 < link rel ="manifest " href ="%PUBLIC_URL%/manifest.json " />
1414 < link rel ="preconnect " href ="https://fonts.googleapis.com ">
1515 < link rel ="preconnect " href ="https://fonts.gstatic.com " crossorigin >
16- < link href ="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains +Mono:wght@400;700&display=swap " rel ="stylesheet ">
16+ < link href ="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space +Mono:wght@400;700&display=swap " rel ="stylesheet ">
1717 < title > React App</ title >
1818 </ head >
1919 < body class ="bg-gray-950 ">
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Footer from './Footer';
44
55const Layout = ( { children } ) => {
66 return (
7- < div className = "bg-gray-950 text-white min-h-screen font-sans" >
7+ < div className = "bg-gray-950 min-h-screen font-sans" >
88 < Navbar />
99 < main className = "flex-grow" >
1010 { children }
Original file line number Diff line number Diff line change 1- import React from 'react' ;
1+ import React , { useState , useEffect } from 'react' ;
22import { Link } from 'react-router-dom' ;
33
44const Navbar = ( ) => {
5+ const [ isScrolled , setIsScrolled ] = useState ( false ) ;
6+
7+ useEffect ( ( ) => {
8+ const handleScroll = ( ) => {
9+ setIsScrolled ( window . scrollY > 0 ) ;
10+ } ;
11+ window . addEventListener ( 'scroll' , handleScroll ) ;
12+ return ( ) => {
13+ window . removeEventListener ( 'scroll' , handleScroll ) ;
14+ } ;
15+ } , [ ] ) ;
16+
517 return (
6- < header className = " backdrop-blur-sm sticky top-0 z-40" >
18+ < header className = { ` backdrop-blur-sm sticky top-0 z-40 transition-colors border-b ${ isScrolled ? 'border-gray-700/50' : 'border-transparent' } ` } >
719 < div className = "container mx-auto flex justify-between items-center p-4 text-white" >
820 < Link to = "/" className = "text-2xl font-semibold tracking-tight" >
921 My Awesome Blog
Original file line number Diff line number Diff line change @@ -6,21 +6,21 @@ const PostItem = ({ slug }) => {
66 const date = 'October 15, 2025' ; // Placeholder date
77
88 return (
9- < article className = "p-8 my-4 border border-gray-700/50 rounded-lg shadow-lg" >
10- < div className = "flex items-center" >
11- < p className = "text-sm text-gray-400" > { date } </ p >
12- < div className = "ml-4 flex-grow flex items-center" >
13- < h2 className = "text-xl font-semibold " >
14- < Link to = { `/blog/ ${ slug } ` } className = "text-white hover:text-teal-400 transition-colors" >
9+ < Link to = { `/blog/ ${ slug } ` } className = "block p-8 my-4 border border-gray-700/50 rounded-lg shadow-lg cursor-pointer hover:bg-gray-800/30 transition-colors " >
10+ < article >
11+ < div className = "flex items-center" >
12+ < p className = "text-sm text-gray-400" > { date } </ p >
13+ < div className = "ml-4 flex-grow flex items-center " >
14+ < h2 className = "text-xl font-semibold text-white hover:text-teal-400 transition-colors" >
1515 { title }
16- </ Link >
17- </ h2 >
16+ </ h2 >
17+ </ div >
18+ < span className = "ml-4 flex-shrink-0 text-sm font-medium text-teal-400 hover:text-teal-500 transition-colors" >
19+ Read post →
20+ </ span >
1821 </ div >
19- < Link to = { `/blog/${ slug } ` } className = "ml-4 flex-shrink-0 text-sm font-medium text-teal-400 hover:text-teal-500 transition-colors" >
20- Read post →
21- </ Link >
22- </ div >
23- </ article >
22+ </ article >
23+ </ Link >
2424 ) ;
2525} ;
2626
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ import { Link } from 'react-router-dom';
33
44const ProjectCard = ( { project } ) => {
55 return (
6- < div className = "bg-gray-800/50 p-6 rounded-lg shadow-lg hover:bg-gray-800/80 transition-colors border border-gray-700/50" >
6+ < Link to = { `/projects/ ${ project . slug } ` } className = "block bg-gray-800/50 p-6 rounded-lg shadow-lg hover:bg-gray-800/80 transition-colors border border-gray-700/50 cursor-pointer " >
77 < h3 className = "text-xl font-semibold text-white" > { project . title } </ h3 >
88 < p className = "mt-2 text-gray-400" > { project . description } </ p >
9- < Link to = { `/projects/ ${ project . slug } ` } className = "mt-4 inline-block text-teal-400 hover:text-teal-500 transition-colors" >
9+ < span className = "mt-4 inline-block text-teal-400 hover:text-teal-500 transition-colors" >
1010 View Project →
11- </ Link >
12- </ div >
11+ </ span >
12+ </ Link >
1313 ) ;
1414} ;
1515
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ module.exports = {
99 theme : {
1010 extend : {
1111 fontFamily : {
12- sans : [ 'Inter ' , ...defaultTheme . fontFamily . sans ] ,
13- mono : [ 'JetBrains Mono ' , ...defaultTheme . fontFamily . mono ] ,
12+ sans : [ 'Space Mono ' , ...defaultTheme . fontFamily . sans ] ,
13+ mono : [ 'Inter ' , ...defaultTheme . fontFamily . mono ] ,
1414 } ,
1515 colors : {
1616 teal : {
You can’t perform that action at this time.
0 commit comments