From 85e54e98a6f8f2d6eee0c80d8f95282a84499c1c Mon Sep 17 00:00:00 2001
From: Mdafsarx
Date: Tue, 25 Nov 2025 23:55:32 +0600
Subject: [PATCH 1/2] feat: Refactor Footer and Navbar components for improved
link management and styling
---
src/components/layout/Footer.tsx | 137 +++++++++++++++++--------------
src/components/layout/Navbar.tsx | 7 +-
src/types/custom.d.ts | 5 +-
3 files changed, 85 insertions(+), 64 deletions(-)
diff --git a/src/components/layout/Footer.tsx b/src/components/layout/Footer.tsx
index 03e239d..5844519 100644
--- a/src/components/layout/Footer.tsx
+++ b/src/components/layout/Footer.tsx
@@ -4,10 +4,16 @@ import Nurui from "@/components/common/Nurui";
import RocketScrollToTop from "@/components/nurui/rocket-scroll-to-top";
import { navigationActive } from "@/utils/navigationActive";
import { usePathname } from "next/navigation";
-import { IoLocationOutline } from "react-icons/io5";
-import { MdOutlineMail } from "react-icons/md";
+import { IconType } from "react-icons/lib";
import "../../styles/footer.css";
+type FooterLink = {
+ text: string;
+ url: string;
+ external?: boolean;
+ icon?: IconType;
+};
+
const Footer = () => {
const pathName = usePathname();
if (pathName.includes("docs") || pathName.includes("preview")) return null;
@@ -25,65 +31,27 @@ const Footer = () => {
-
@@ -125,6 +93,55 @@ const Footer = () => {
export default Footer;
+const footerSections: { title: string; links: FooterLink[] }[] = [
+ {
+ title: "Products",
+ links: [
+ { text: "Nur/ui", url: "https://nurui.vercel.app", external: true },
+ ],
+ },
+ {
+ title: "Documentation",
+ links: [
+ {
+ text: "Introduction",
+ url: "https://nurui.vercel.app/docs/introduction",
+ },
+ {
+ text: "Documentation",
+ url: "https://nurui.vercel.app/docs/installation",
+ },
+ ],
+ },
+ {
+ title: "Components",
+ links: [
+ {
+ text: "Gradient Hero",
+ url: "https://nurui.vercel.app/docs/gradient-hero",
+ },
+ {
+ text: "Tech Cursor",
+ url: "https://nurui.vercel.app/docs/tech-cursor",
+ },
+ { text: "Banner", url: "https://nurui.vercel.app/docs/banner" },
+ ],
+ },
+
+ {
+ title: "Community",
+ links: [
+ {
+ text: "Linkedin",
+ url: "https://www.linkedin.com/in/md-afsar-mahmud",
+ external: true,
+ },
+ { text: "GitHub", url: "https://github.com/afsar-dev", external: true },
+ { text: "Twitter", url: "https://x.com/md_afsar_mahmud", external: true },
+ ],
+ },
+];
+
const navigation = [
{
id: 1,
diff --git a/src/components/layout/Navbar.tsx b/src/components/layout/Navbar.tsx
index aa66949..d968a69 100644
--- a/src/components/layout/Navbar.tsx
+++ b/src/components/layout/Navbar.tsx
@@ -6,7 +6,8 @@ import VaulDrawer from "@/components/ui/drawer/VaulDrawer";
import { navigationActive } from "@/utils/navigationActive";
import { usePathname } from "next/navigation";
import { useEffect, useState } from "react";
-import { FaDiscord, FaGithub } from "react-icons/fa";
+import { FaGithub } from "react-icons/fa";
+import { FaXTwitter } from "react-icons/fa6";
import ThemeSwitcher from "../common/ThemeSwitcher";
const Navbar = () => {
@@ -57,9 +58,9 @@ const Navbar = () => {
+
}
/>
Date: Thu, 11 Dec 2025 13:12:15 +0600
Subject: [PATCH 2/2] ui updated
---
public/r/rocket-footer.json | 2 +-
src/components/common/FullScreenPreview.tsx | 5 +-
src/components/layout/Footer.tsx | 2 +-
.../components-layout/ComponentsNavbar.tsx | 8 +-
src/components/nurui/rocket-footer.tsx | 152 +++++++++---------
5 files changed, 84 insertions(+), 85 deletions(-)
diff --git a/public/r/rocket-footer.json b/public/r/rocket-footer.json
index 6a7ddfb..2db2e46 100644
--- a/public/r/rocket-footer.json
+++ b/public/r/rocket-footer.json
@@ -17,7 +17,7 @@
},
{
"path": "./src/components/nurui/rocket-footer.tsx",
- "content": "\"use client\";\nimport NuruiLogo from \"@/components/nurui/nurui-logo\";\nimport RocketScrollToTop from \"@/components/nurui/rocket-scroll-to-top\";\nimport Link from \"next/link\";\nimport { usePathname } from \"next/navigation\";\nimport { IoLocationOutline } from \"react-icons/io5\";\nimport { MdOutlineMail } from \"react-icons/md\";\nimport \"./styles/footer.css\";\n\nconst navigationActive = (href: string = \"/\", pathName: string) => {\n return pathName === href;\n};\n\nconst RocketFooter = () => {\n const pathName = usePathname();\n\n return (\n \n
\n\n
\n
\n\n
\n
\n {navigation.map((data, i) => (\n \n {data?.name}\n \n ))}\n
\n\n
\n Created by{\" \"}\n \n Md Afsar Mahmud\n {\" \"}\n © {new Date().getFullYear()}. All rights reserved.\n
\n
\n
\n
\n );\n};\n\nexport default RocketFooter;\n\nconst navigation = [\n { id: 1, name: \"Home\", url: \"/\" },\n { id: 2, name: \"Docs\", url: \"/docs/installation\" },\n { id: 3, name: \"Components\", url: \"/docs/components\" },\n { id: 4, name: \"About\", url: \"/about-us\" },\n { id: 5, name: \"Playground\", url: \"/playground\" },\n];\n",
+ "content": "\"use client\";\n\nimport NuruiLogo from \"@/components/nurui/nurui-logo\";\nimport RocketScrollToTop from \"@/components/nurui/rocket-scroll-to-top\";\nimport Link from \"next/link\";\nimport { usePathname } from \"next/navigation\";\nimport { IoLocationOutline } from \"react-icons/io5\";\nimport { MdOutlineMail } from \"react-icons/md\";\nimport \"./styles/footer.css\";\n\nconst FOOTER_SECTIONS = [\n {\n title: \"Products\",\n items: [\n { label: \"Nurui\", url: \"https://nurui.vercel.app\", external: true },\n ],\n },\n {\n title: \"Company\",\n items: [\n { label: \"About\", url: \"https://nurui.vercel.app/about-us\" },\n { label: \"Playground\", url: \"https://nurui.vercel.app/playground\" },\n ],\n },\n {\n title: \"Explore\",\n items: [\n {\n label: \"Introduction\",\n url: \"https://nurui.vercel.app/docs/introduction\",\n },\n {\n label: \"Documentation\",\n url: \"https://nurui.vercel.app/docs/installation\",\n },\n { label: \"Components\", url: \"https://nurui.vercel.app/docs/components\" },\n ],\n },\n];\n\nconst navigation = [\n { id: 1, name: \"Home\", url: \"/\" },\n { id: 2, name: \"Docs\", url: \"/docs/installation\" },\n { id: 3, name: \"Components\", url: \"/docs/components\" },\n { id: 4, name: \"About\", url: \"/about-us\" },\n { id: 5, name: \"Playground\", url: \"/playground\" },\n];\n\nconst RocketFooter = () => {\n const pathName = usePathname();\n\n return (\n \n
\n\n
\n
\n {/* Logo & description */}\n
\n
\n
\n
Nur/ui\n \n
\n Beautifully crafted, accessible components built with Tailwind CSS\n perfect for modern developers and creative teams.\n
\n
\n\n {/* Dynamic Footer Nav Sections */}\n {FOOTER_SECTIONS.map((section) => (\n
\n ))}\n\n {/* Contact */}\n
\n
\n\n {/* Bottom Navigation */}\n
\n
\n {navigation.map((item, i) => (\n \n {item.name}\n \n ))}\n
\n\n
\n Created by{\" \"}\n \n Md Afsar Mahmud\n {\" \"}\n © {new Date().getFullYear()}. All rights reserved.\n
\n
\n
\n
\n );\n};\n\nexport default RocketFooter;\n",
"type": "registry:component"
},
{
diff --git a/src/components/common/FullScreenPreview.tsx b/src/components/common/FullScreenPreview.tsx
index b99663e..84a2e59 100644
--- a/src/components/common/FullScreenPreview.tsx
+++ b/src/components/common/FullScreenPreview.tsx
@@ -1,10 +1,9 @@
"use client";
-import { Fullscreen } from "lucide-react";
import { Button } from "@/components/ui/button";
-import React from "react";
import { siteLink } from "@/config/site";
import { cn } from "@/lib/utils";
import IClassName from "@/types/common.type";
+import { Fullscreen } from "lucide-react";
import { usePathname } from "next/navigation";
const FullScreenPreview = ({
@@ -20,7 +19,7 @@ const FullScreenPreview = ({
aria-label="Full Screen Preview"
asChild
className={cn(
- "z-40 text-[var(--primary-colo)] bg-[var(--primary-color)] rounded-lg shadow-none px-2.5",
+ "z-40 text-white bg-[var(--primary-color)] rounded-lg shadow-none px-2.5",
className,
)}
>
diff --git a/src/components/layout/Footer.tsx b/src/components/layout/Footer.tsx
index 5844519..6d035cc 100644
--- a/src/components/layout/Footer.tsx
+++ b/src/components/layout/Footer.tsx
@@ -20,7 +20,7 @@ const Footer = () => {
return (
-
+
diff --git a/src/components/layout/components-layout/ComponentsNavbar.tsx b/src/components/layout/components-layout/ComponentsNavbar.tsx
index 33c0151..d3542cd 100644
--- a/src/components/layout/components-layout/ComponentsNavbar.tsx
+++ b/src/components/layout/components-layout/ComponentsNavbar.tsx
@@ -3,8 +3,8 @@ import RoundedButton from "@/components/common/RoundedButton";
import ThemeSwitcher from "@/components/common/ThemeSwitcher";
import VaulDrawer from "@/components/ui/drawer/VaulDrawer";
import { useAppContext } from "@/context/AppContext";
-import React, { useEffect, useState } from "react";
-import { FaDiscord, FaGithub } from "react-icons/fa6";
+import { useEffect, useState } from "react";
+import { FaGithub, FaXTwitter } from "react-icons/fa6";
import { GoSidebarCollapse, GoSidebarExpand } from "react-icons/go";
const ComponentsNavbar = () => {
@@ -47,9 +47,9 @@ const ComponentsNavbar = () => {
+
}
/>
{
- return pathName === href;
-};
+const FOOTER_SECTIONS = [
+ {
+ title: "Products",
+ items: [
+ { label: "Nurui", url: "https://nurui.vercel.app", external: true },
+ ],
+ },
+ {
+ title: "Company",
+ items: [
+ { label: "About", url: "https://nurui.vercel.app/about-us" },
+ { label: "Playground", url: "https://nurui.vercel.app/playground" },
+ ],
+ },
+ {
+ title: "Explore",
+ items: [
+ {
+ label: "Introduction",
+ url: "https://nurui.vercel.app/docs/introduction",
+ },
+ {
+ label: "Documentation",
+ url: "https://nurui.vercel.app/docs/installation",
+ },
+ { label: "Components", url: "https://nurui.vercel.app/docs/components" },
+ ],
+ },
+];
+
+const navigation = [
+ { id: 1, name: "Home", url: "/" },
+ { id: 2, name: "Docs", url: "/docs/installation" },
+ { id: 3, name: "Components", url: "/docs/components" },
+ { id: 4, name: "About", url: "/about-us" },
+ { id: 5, name: "Playground", url: "/playground" },
+];
const RocketFooter = () => {
const pathName = usePathname();
return (
-
+
-
+ {/* Bottom Navigation */}
-
- {navigation.map((data, i) => (
+
+ {navigation.map((item, i) => (
- {data?.name}
+ {item.name}
))}
@@ -134,11 +142,3 @@ const RocketFooter = () => {
};
export default RocketFooter;
-
-const navigation = [
- { id: 1, name: "Home", url: "/" },
- { id: 2, name: "Docs", url: "/docs/installation" },
- { id: 3, name: "Components", url: "/docs/components" },
- { id: 4, name: "About", url: "/about-us" },
- { id: 5, name: "Playground", url: "/playground" },
-];