From be5752b2af6e4a44e2c0f81a1aee0fb4bb9b55d2 Mon Sep 17 00:00:00 2001 From: Priyanshu Maurya Date: Wed, 26 Jul 2023 11:46:48 +0000 Subject: [PATCH] Added variables for different colors --- components/BackToTop/BackToTopButton.tsx | 4 ++-- components/Cards/Card.tsx | 10 ++++----- .../CopyToClipboard/CopyToClipboard.tsx | 4 ++-- components/Footer/Footer.tsx | 4 ++-- components/ForkButton/GitHubForkButton.tsx | 8 +++---- components/Header/Header.tsx | 6 ++--- components/MainContainer/MainContainer.tsx | 6 ++--- components/NewIssue/NewIssue.tsx | 2 +- components/Searchbar/Searchbar.tsx | 6 ++--- components/SideNavbar/SideNavbar.tsx | 2 +- components/SideNavbar/SideNavbarBody.tsx | 4 ++-- components/SideNavbar/SideNavbarCategory.tsx | 4 ++-- .../SideNavbar/SideNavbarCategoryList.tsx | 2 +- components/SideNavbar/SideNavbarElement.tsx | 8 +++---- components/SideNavbar/SideNavbarHeader.tsx | 4 ++-- components/SkipLink/SkipLink.tsx | 2 +- .../SocialMedia/SocialMediaIconsList.tsx | 6 ++--- components/StarButton/GitHubStarButton.tsx | 2 +- components/ThemeToggler/themeToggler.tsx | 4 ++-- components/TopBar/TopBar.tsx | 6 ++--- components/logo/index.tsx | 4 ++-- components/popup/index.tsx | 8 +++---- components/popup/popupCategoryDesc.tsx | 4 ++-- layouts/GeneralLayout.tsx | 2 +- pages/[subcategory]/index.tsx | 2 +- pages/contributors.tsx | 8 +++---- pages/index.tsx | 4 ++-- pages/search.tsx | 2 +- styles/globals.css | 22 +++++++++++++++++++ 29 files changed, 86 insertions(+), 64 deletions(-) diff --git a/components/BackToTop/BackToTopButton.tsx b/components/BackToTop/BackToTopButton.tsx index 2d43e630b..d84886b99 100644 --- a/components/BackToTop/BackToTopButton.tsx +++ b/components/BackToTop/BackToTopButton.tsx @@ -40,7 +40,7 @@ export const BackToTopButton = () => { return null } - const buttonClasses = `focus:animate-button-press rounded-full border border-white bg-violet-600 p-4 text-white shadow-xl duration-300 transition-colors focus:ring group-hover:border-dashed group-hover:border-violet-400 group-hover:bg-white dark:drop-shadow-[5px_5px_8px_rgba(124,58,237,0.25)] dark:group-hover:bg-[#101623] md:border-violet-600 ${ + const buttonClasses = `focus:animate-button-press rounded-full border border-white bg-[--primary-100] p-4 text-white shadow-xl duration-300 transition-colors focus:ring group-hover:border-dashed group-hover:border-[--primary-60] group-hover:bg-white dark:drop-shadow-[5px_5px_8px_rgba(124,58,237,0.25)] dark:group-hover:bg-[#101623] md:border-[--primary-100] ${ status === 'preEnter' || status === 'exiting' ? 'opacity-0 translate-y-3' : '' @@ -53,7 +53,7 @@ export const BackToTopButton = () => { onClick={handleClick} title="Back to top" > - + 👾 diff --git a/components/Cards/Card.tsx b/components/Cards/Card.tsx index 9b2925bff..d4b1c2396 100644 --- a/components/Cards/Card.tsx +++ b/components/Cards/Card.tsx @@ -16,17 +16,17 @@ const Card: FC = ({ data }) => { if (descriptionRef.current) { setIsOverflow( descriptionRef.current.scrollHeight > - descriptionRef.current.offsetHeight + descriptionRef.current.offsetHeight ) } }, []) return ( -
+

{name} @@ -41,7 +41,7 @@ const Card: FC = ({ data }) => { {description}

{isOverflow && ( -

+

Read More

)} @@ -53,7 +53,7 @@ const Card: FC = ({ data }) => { target="_blank" rel="noopener noreferrer" className={ - 'mt-2 flex w-full items-center justify-center gap-2 rounded-2xl border border-dashed border-transparent bg-violet-600 px-6 py-2 text-center text-white duration-100 hover:border-violet-400 hover:bg-transparent hover:text-violet-500 dark:hover:text-violet-400' + 'mt-2 flex w-full items-center justify-center gap-2 rounded-2xl border border-dashed border-transparent bg-[--primary-100] px-6 py-2 text-center text-white duration-100 hover:border-[--primary-60] hover:bg-transparent hover:text-[--primary-80] dark:hover:text-[--primary-60]' } > Visit site diff --git a/components/CopyToClipboard/CopyToClipboard.tsx b/components/CopyToClipboard/CopyToClipboard.tsx index 0705c066f..559747c31 100644 --- a/components/CopyToClipboard/CopyToClipboard.tsx +++ b/components/CopyToClipboard/CopyToClipboard.tsx @@ -18,11 +18,11 @@ export const CopyToClipboard = ({ url }: CopyToClipboardProps): JSX.Element => {
handleCopy(e)} /> -

+

{success ? 'Copied!' : 'Copy'}

diff --git a/components/Footer/Footer.tsx b/components/Footer/Footer.tsx index cb36f6a14..7e867ae75 100644 --- a/components/Footer/Footer.tsx +++ b/components/Footer/Footer.tsx @@ -7,12 +7,12 @@ export const Footer: FC = () => { const isDarkMode = resolvedTheme === 'dark' const nameStyles = `underline ${ - isDarkMode ? 'text-gray-200' : 'text-violet-700' + isDarkMode ? 'text-[--secondary-20]' : 'text-violet-700' } ` return (