Skip to content

Commit ec67601

Browse files
committed
ui changes
1 parent 17686a4 commit ec67601

3 files changed

Lines changed: 40 additions & 19 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"use client";
2+
import { motion } from "framer-motion";
3+
import { useRouter } from "next/navigation";
4+
import Image from "next/image";
5+
6+
export default function Banner() {
7+
const router = useRouter();
8+
9+
const redirectToHome = () => {
10+
router.push("/");
11+
};
12+
13+
return (
14+
<motion.div
15+
initial={{ opacity: 0, y: -20 }}
16+
animate={{ opacity: 1, y: 0 }}
17+
transition={{ duration: 0.5 }}
18+
className="fixed top-0 left-0 right-0 bg-gray-800/50 backdrop-blur-md p-4 flex items-center justify-center cursor-pointer hover:bg-gray-800/70 transition-colors"
19+
onClick={redirectToHome}
20+
>
21+
<div className="flex items-center space-x-2">
22+
<Image
23+
src="/branch.svg"
24+
alt="GitMentor Logo"
25+
width={24}
26+
height={24}
27+
className="h-6 w-6"
28+
/>
29+
<span className="text-lg font-semibold text-blue-400">gitmentor.co</span>
30+
</div>
31+
</motion.div>
32+
);
33+
}

frontend/src/app/components/Header.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

frontend/src/app/page.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import { motion } from "framer-motion";
33
import { useEffect, useState } from "react";
44
import { useRouter } from "next/navigation";
5-
import { ArrowRight, Star } from "lucide-react"; // Import icons
5+
import { ArrowRight, Star } from "lucide-react";
6+
import Banner from "./components/Banner";
67

78
export default function Home() {
89
const [isMounted, setIsMounted] = useState(false);
@@ -15,7 +16,7 @@ export default function Home() {
1516
if (!isMounted) return null;
1617

1718
const redirectToGitHub = () => {
18-
window.location.href = "https://github.com/esosaoh/gitmentor";
19+
window.open("https://github.com/esosaoh/gitmentor", "_blank");
1920
};
2021

2122
const redirectToSearchPage = () => {
@@ -24,7 +25,7 @@ export default function Home() {
2425

2526
return (
2627
<div className="min-h-screen bg-gray-900 flex flex-col items-center justify-center">
27-
{/* Content */}
28+
<Banner />
2829
<motion.h1
2930
initial={{ opacity: 0, y: -20 }}
3031
animate={{ opacity: 1, y: 0 }}
@@ -39,31 +40,27 @@ export default function Home() {
3940
transition={{ duration: 0.8, delay: 0.2 }}
4041
className="text-lg text-blue-400/80 mb-8 text-center max-w-lg"
4142
>
42-
Effortlessly contribute to open source repositories with AI-driven guidance.
43+
Get started with contributing to open source effortlessly.
4344
</motion.p>
44-
45-
{/* Start Contributing Button */}
4645
<motion.button
4746
initial={{ opacity: 0 }}
4847
animate={{ opacity: 1 }}
4948
transition={{ duration: 0.8, delay: 0.4 }}
5049
whileHover={{ scale: 1.05 }}
5150
whileTap={{ scale: 0.95 }}
52-
className="flex items-center justify-center px-6 py-3 bg-blue-500 text-white rounded-lg shadow-lg hover:bg-blue-600 transition-colors"
51+
className="flex items-center justify-center px-6 py-3 bg-blue-500 text-white rounded-lg shadow-lg hover:bg-blue-600 transition-colors cursor-pointer"
5352
onClick={redirectToSearchPage}
5453
>
5554
Start Contributing
5655
<ArrowRight className="ml-2 h-5 w-5" />
5756
</motion.button>
58-
59-
{/* Star Us on GitHub Button */}
6057
<motion.button
6158
initial={{ opacity: 0 }}
6259
animate={{ opacity: 1 }}
6360
transition={{ duration: 0.8, delay: 0.6 }}
6461
whileHover={{ scale: 1.05 }}
6562
whileTap={{ scale: 0.95 }}
66-
className="fixed bottom-8 flex items-center justify-center px-6 py-3 bg-gray-700 text-white rounded-lg shadow-lg hover:bg-gray-800 transition-colors"
63+
className="fixed bottom-8 flex items-center justify-center px-6 py-3 bg-gray-700 text-white rounded-lg shadow-lg hover:bg-gray-800 transition-colors cursor-pointer"
6764
onClick={redirectToGitHub}
6865
>
6966
Star Us on GitHub

0 commit comments

Comments
 (0)