Skip to content

Commit fc182e0

Browse files
paper request
1 parent 9d23c4b commit fc182e0

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

src/components/FloatingNavbar.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
import { usePathname } from "next/navigation";
44
import Link from "next/link";
5-
import { Pin, UploadIcon } from "lucide-react";
5+
import { ArrowUpRight, Pin, UploadIcon } from "lucide-react";
66
import ModeToggle from "./toggle-theme";
7+
import { Button } from "./ui/button";
78

89
interface Props {
910
onNavigate: () => void;
@@ -33,7 +34,14 @@ export default function FloatingNavbar({ onNavigate }: Props) {
3334
<span>Pinned Subjects</span>
3435
</div>
3536
</Link>
36-
37+
<div className="px-4 py-2">
38+
<Link href="/request" onClick={onNavigate}>
39+
<div className="flex items-center gap-2 rounded-full border border-[#3A3745] px-4 py-2 text-sm font-semibold text-white transition hover:bg-[#1A1823] w-full justify-center">
40+
<ArrowUpRight className="h-4 w-4" />
41+
Paper Request
42+
</div>
43+
</Link>
44+
</div>
3745
<div className="rounded-full border border-[#3A3745] p-1">
3846
<ModeToggle />
3947
</div>

src/components/Navbar.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import Link from "next/link";
66
import { usePathname } from "next/navigation";
77
import ccLogo from "../assets/codechef_logo.svg";
88
import ModeToggle from "@/components/toggle-theme";
9-
import { ArrowDownLeftIcon, Pin } from "lucide-react";
9+
import { Button } from "@/components/ui/button";
10+
import { ArrowDownLeftIcon, Pin, ArrowUpRight } from "lucide-react";
1011
import NavDropdownButton from "./NavDropdownButton";
1112
import FloatingNavbar from "./FloatingNavbar";
1213
import PWAInstallButton from "./ui/PWAInstallButton";
@@ -62,7 +63,17 @@ function Navbar() {
6263
Pinned Subjects
6364
</div>
6465
</Link>
66+
<div className="ml-2 hidden md:flex">
67+
<Link href="/request">
68+
<div className="ml-2 flex items-center gap-2 rounded-full border border-[#3A3745] px-4 py-2 text-sm font-semibold text-white transition hover:bg-[#1A1823]">
69+
<ArrowUpRight className="h-4 w-4" />
70+
Paper Request
71+
</div>
72+
</Link>
73+
</div>
6574
</div>
75+
76+
{/* Desktop: Create Paper Request button */}
6677
</div>
6778

6879
<div className="hidden items-center gap-4 md:flex">
@@ -84,6 +95,7 @@ function Navbar() {
8495
</Link>
8596
</div>
8697

98+
{/* Mobile: Create Paper Request button inside dropdown */}
8799
<div className="md:hidden" ref={dropdownContainerRef}>
88100
<NavDropdownButton
89101
isOpen={open}

src/components/screens/Info.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,7 @@ function Info() {
7878
</section>
7979

8080
{/* Create Request Section */}
81-
<section className="flex flex-col items-center justify-center gap-4 px-6 py-12 text-center">
82-
<h2 className="font-vipnabd text-2xl font-semibold text-black dark:text-white md:text-3xl">
83-
Can’t Find a Specific Paper?
84-
</h2>
85-
<Link href="/request">
86-
<Button
87-
variant="outline"
88-
className="group border-[1.5px] border-[#4A55FF] bg-transparent px-6 py-3 text-sm font-medium text-[#4A55FF] transition-all duration-200 hover:bg-[#4A55FF] hover:text-white dark:border-[#9EA8FF] dark:text-[#9EA8FF] dark:hover:bg-[#9EA8FF] dark:hover:text-black"
89-
>
90-
Create Request
91-
<ArrowUpRight className="ml-2 h-4 w-4 transition-transform group-hover:-translate-y-0.5 group-hover:translate-x-0.5" />
92-
</Button>
93-
</Link>
94-
</section>
81+
9582
<div className=" md:hidden z-50 flex justify-center py-4">
9683
<PWAInstallButton />
9784
</div>

0 commit comments

Comments
 (0)