Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/index.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>Github Tracker | Track your GitHub</title>
</head>
<body>
<body class="dark">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
Expand Down
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,29 @@
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.6",
"@mui/material": "^5.15.6",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@tabler/icons-react": "^3.24.0",
"@vitejs/plugin-react": "^4.3.3",
"axios": "^1.7.7",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.465.0",
"next-themes": "^0.4.3",
"octokit": "^4.0.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hot-toast": "^2.4.1",
"react-icons": "^5.3.0",
"react-router-dom": "^6.28.0"
"react-router-dom": "^6.28.0",
"tailwind-merge": "^2.5.5",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@types/node": "^22.10.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.5.0",
Expand Down
Binary file added public/favicon.ico
Binary file not shown.
Binary file added public/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/hero2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/vite.svg

This file was deleted.

42 changes: 0 additions & 42 deletions src/App.css

This file was deleted.

9 changes: 4 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

import Navbar from "./components/Navbar";
import Footer from "./components/Footer";
import ScrollProgressBar from './components/ScrollProgressBar';

import Router from "./Routes/Router";
import Header from "./components/Header";
import Footer_ from "./components/footer2";

function App() {
return (
Expand All @@ -12,15 +11,15 @@ function App() {
<ScrollProgressBar/>

{/* Navbar */}
<Navbar />
<Header />

{/* Main content */}
<main className="flex-grow">
<Router/>
</main>

{/* Footer */}
<Footer />
<Footer_ />
</div>

);
Expand Down
5 changes: 3 additions & 2 deletions src/Routes/Router.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { Navigate, Route, Routes } from "react-router-dom";
import { Route, Routes } from "react-router-dom";

import Home from "../pages/Home/Home"; // Import the Home component
import About from "../pages/About/About"; // Import the About component
import Contact from "../pages/Contact/Contact"; // Import the Contact component
import Contributors from "../pages/Contributors/Contributors";
import Landing from "../pages/home";

const Router = () => {
return (
<Routes>
{/* Redirect from root (/) to the home page */}
<Route path="/" element={<Navigate to="/home" replace />} />
<Route path="/" element={<Landing />} />
<Route path="/about" element={<About />} />
<Route path="/contact" element={<Contact />} />
<Route path="/home" element={<Home />} />
Expand Down
1 change: 0 additions & 1 deletion src/assets/react.svg

This file was deleted.

131 changes: 131 additions & 0 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
import { Link, useLocation } from "react-router-dom";
import { Separator } from "./ui/separator";
import { Button } from "./ui/button";
import { Menu, Sun } from "lucide-react";
import {
Sheet,
SheetContent,
SheetHeader,
SheetTitle,
SheetTrigger,
} from "./ui/sheet";
import { useEffect, useState } from "react";

const Header = () => {
const [scrolled, setScrolled] = useState(false);
const location = useLocation();
const path = location.pathname;
useEffect(() => {
const handleScroll = () => {
if (window.scrollY > 0) {
setScrolled(true);
} else {
setScrolled(false);
}
};
window.addEventListener("scroll", handleScroll);
return () => window.removeEventListener("scroll", handleScroll);
});
return (
<header
className={`dark:bg-black bg-slate-100 md:px-12 px-4 ${
scrolled && "fixed top-0 transition-all duration-300"
} w-full shadow-lg z-50 border-b`}
>
<nav className="flex items-center justify-between py-1">
<Link
to="/"
className="text-2xl font-bold flex items-center justify-start"
>
<img
src="/logo.png"
alt="Github Tracker"
className="w-10 h-auto dark:invert mr-3"
/>
Git<span className="text-blue-500">Monitor</span>
</Link>
<div className="flex items-center justify-end gap-2">
<div className="md:flex items-center justify-end hidden">
{links.map((link, idx) => (
<Link
key={link.href}
to={link.href}
className={`text-gray-500 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100 text-sm font-medium flex items-center justify-center `}
>
<span
className={`hover:bg-slate-300 dark:hover:bg-slate-900 w-full h-full px-3 py-2 rounded-md transition-colors duration-300 ${
path === link.href && "bg-slate-300 dark:bg-slate-900"
}`}
>
{link.label}
</span>
{idx !== links.length - 1 && (
<Separator orientation="vertical" className="mx-2 h-5" />
)}
</Link>
))}
</div>
<div className="md:hidden items-center justify-end flex gap-3">
<Sheet>
<SheetTrigger className="flex items-center justify-center">
<Menu />
</SheetTrigger>
<SheetContent>
<SheetHeader>
<SheetTitle>Menu</SheetTitle>
</SheetHeader>
<div className="flex flex-col">
{links.map((link) => (
<Link
key={link.href}
to={link.href}
className={`text-gray-500 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100 text-sm font-medium flex justify-start hover:bg-slate-300 dark:hover:bg-slate-900 w-full h-full p-3 rounded-md transition-colors duration-300 ${
window.location.pathname === link.href
? "bg-slate-300 dark:bg-slate-900"
: ""
}`}
>
{link.label}
</Link>
))}
</div>
</SheetContent>
</Sheet>
</div>
<div className="flex items-center justify-center gap-3 ml-3">
<Button variant={"outline"}>
<Sun />
</Button>
<Button
variant={"outline"}
className="px-5 bg-sky-700 hover:bg-sky-600 text-white hover:text-white"
>
<Link to={"/auth/login"}>Login</Link>
</Button>
</div>
</div>
</nav>
</header>
);
};

export default Header;

const links = [
{
label: "Home",
href: "/home",
},
{
label: "About",
href: "/about",
},
{
label: "Contact",
href: "/contact",
},
{
label: "Contributors",
href: "/contributors",
},
];
4 changes: 2 additions & 2 deletions src/components/ScrollProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react";
import { useEffect, useState } from "react";

const ScrollProgressBar = () => {
const [scrollWidth, setScrollWidth] = useState(0);
Expand Down Expand Up @@ -57,7 +57,7 @@ const ScrollProgressBar = () => {
left: 0,
width: `${scrollWidth}%`,
height: "5px", // Thicker line for scroll progress
backgroundColor: "grey",
backgroundColor: "teal",
zIndex: 100,
transition: "width 0.2s ease",
}}
Expand Down
Loading