Skip to content

Commit 57b1f16

Browse files
committed
v5
1 parent 05b535c commit 57b1f16

File tree

6 files changed

+35
-23
lines changed

6 files changed

+35
-23
lines changed

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
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">

src/components/Layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Footer from './Footer';
44

55
const 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}

src/components/Navbar.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
import React from 'react';
1+
import React, { useState, useEffect } from 'react';
22
import { Link } from 'react-router-dom';
33

44
const 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

src/components/PostItem.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff 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 &rarr;
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 &rarr;
21-
</Link>
22-
</div>
23-
</article>
22+
</article>
23+
</Link>
2424
);
2525
};
2626

src/components/ProjectCard.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { Link } from 'react-router-dom';
33

44
const 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 &rarr;
11-
</Link>
12-
</div>
11+
</span>
12+
</Link>
1313
);
1414
};
1515

tailwind.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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: {

0 commit comments

Comments
 (0)