From 71cd410a2a74b632da21af83f62fda50a8821fb3 Mon Sep 17 00:00:00 2001 From: yashksaini-coder Date: Sat, 11 Jan 2025 15:41:18 +0530 Subject: [PATCH 1/3] feat: add RainbowButton component with dynamic color gradients --- app/globals.css | 10 ++++++++++ components/ui/rainbow-button.tsx | 33 ++++++++++++++++++++++++++++++++ tailwind.config.ts | 18 +++++++++++++++-- 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 components/ui/rainbow-button.tsx diff --git a/app/globals.css b/app/globals.css index 83a3314..2ea59e0 100644 --- a/app/globals.css +++ b/app/globals.css @@ -37,6 +37,11 @@ --sidebar-accent-foreground: 240 5.9% 10%; --sidebar-border: 220 13% 91%; --sidebar-ring: 217.2 91.2% 59.8%; + --color-1: 0 100% 63%; + --color-2: 270 100% 63%; + --color-3: 210 100% 63%; + --color-4: 195 100% 63%; + --color-5: 90 100% 63%; } .dark { @@ -72,6 +77,11 @@ --sidebar-accent-foreground: 240 4.8% 95.9%; --sidebar-border: 240 3.7% 15.9%; --sidebar-ring: 217.2 91.2% 59.8%; + --color-1: 0 100% 63%; + --color-2: 270 100% 63%; + --color-3: 210 100% 63%; + --color-4: 195 100% 63%; + --color-5: 90 100% 63%; } } diff --git a/components/ui/rainbow-button.tsx b/components/ui/rainbow-button.tsx new file mode 100644 index 0000000..a1f6671 --- /dev/null +++ b/components/ui/rainbow-button.tsx @@ -0,0 +1,33 @@ +import React from "react"; + +import { cn } from "@/lib/utils"; +interface RainbowButtonProps + extends React.ButtonHTMLAttributes {} + +export function RainbowButton({ + children, + className, + ...props +}: RainbowButtonProps) { + return ( + + ); +} diff --git a/tailwind.config.ts b/tailwind.config.ts index 9828a30..cffd6a0 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -49,7 +49,12 @@ export default { '3': 'hsl(var(--chart-3))', '4': 'hsl(var(--chart-4))', '5': 'hsl(var(--chart-5))' - } + }, + 'color-1': 'hsl(var(--color-1))', + 'color-2': 'hsl(var(--color-2))', + 'color-3': 'hsl(var(--color-3))', + 'color-4': 'hsl(var(--color-4))', + 'color-5': 'hsl(var(--color-5))' }, borderRadius: { lg: 'var(--radius)', @@ -85,12 +90,21 @@ export default { transform: 'rotate(215deg) translateX(-500px)', opacity: '0' } + }, + rainbow: { + '0%': { + 'background-position': '0%' + }, + '100%': { + 'background-position': '200%' + } } }, animation: { 'accordion-down': 'accordion-down 0.2s ease-out', 'accordion-up': 'accordion-up 0.2s ease-out', - meteor: 'meteor 5s linear infinite' + meteor: 'meteor 5s linear infinite', + rainbow: 'rainbow var(--speed, 2s) infinite linear' } } }, From ad720ccfbd500bde1a0e172aea28d54e17fd252f Mon Sep 17 00:00:00 2001 From: yashksaini-coder Date: Sat, 11 Jan 2025 15:41:20 +0530 Subject: [PATCH 2/3] Add Rainbow button --- app/FAQ/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/FAQ/page.tsx b/app/FAQ/page.tsx index 5e8ad1d..15fba4e 100644 --- a/app/FAQ/page.tsx +++ b/app/FAQ/page.tsx @@ -52,7 +52,7 @@ export default function FAQPage() { -
+ {/*

Product

    @@ -174,7 +174,7 @@ export default function FAQPage() {

    © 2023 LeetCode Journal. All rights reserved.

    -
+
*/}
From 520b83908c8e02f7d50487f9180941775cbc8fc7 Mon Sep 17 00:00:00 2001 From: yashksaini-coder Date: Sat, 11 Jan 2025 18:16:29 +0530 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20UI=20Enhancement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/FAQ/page.tsx | 157 +-------------------------- app/learn-more/page.tsx | 192 +++------------------------------ app/page.tsx | 167 +--------------------------- components/footer.tsx | 46 ++++++++ components/navbar.tsx | 5 +- components/ui/shiny-button.tsx | 73 +++++++++++++ package-lock.json | 54 +++++++--- package.json | 1 + 8 files changed, 182 insertions(+), 513 deletions(-) create mode 100644 components/footer.tsx create mode 100644 components/ui/shiny-button.tsx diff --git a/app/FAQ/page.tsx b/app/FAQ/page.tsx index 15fba4e..362bd42 100644 --- a/app/FAQ/page.tsx +++ b/app/FAQ/page.tsx @@ -2,10 +2,7 @@ import { Metadata } from 'next' import FAQComponent from './component/faq-component' import ContactSection from './component/contact-section' import Navbar1 from '@/components/navbar' -import { Github, BookOpen } from 'lucide-react' -import {Button} from '@/components/ui/button' -import { SocialLinks } from '@/components/SocialLinks' -import Link from 'next/link' +import Footer from '@/components/footer' export const metadata: Metadata = { title: 'FAQ - Your Company Name', @@ -26,157 +23,7 @@ export default function FAQPage() { -
-
-
-
- - LeetCode Journal -
- -
- {/*
-
-

Product

-
    -
  • - - Features - -
  • -
  • - - Pricing - -
  • -
  • - - FAQ - -
  • -
-
-
-

Company

-
    -
  • - - About - -
  • -
  • - - Blog - -
  • -
  • - - Careers - -
  • -
-
-
-

Resources

-
    -
  • - - Documentation - -
  • -
  • - - Community - -
  • -
  • - - Support - -
  • -
-
-
-

Legal

-
    -
  • - - Privacy Policy - -
  • -
  • - - Terms of Service - -
  • -
  • - - Cookie Policy - -
  • -
-
-
-
-

- © 2023 LeetCode Journal. All rights reserved. -

-
*/} -
-
+