From 0a0db19190cfb6d2b1b8a431f875c5fca4958f6b Mon Sep 17 00:00:00 2001 From: Rupali Haldiya <78981177+rupali-codes@users.noreply.github.com> Date: Sun, 26 Feb 2023 15:12:15 +0530 Subject: [PATCH] feat: added popup when clicked on card (#248) * Clean up (#246) * [clean-up] chores: code clean up and bug fixes * [clean-up] chores: code clean up and bug fixes * [clean-up] chores: code clean up and bug fixes * [clean-up] chores: code clean up and bug fixes * [clean-up] chores: code clean up and bug fixes * chore: code clean up and bug fixes (#223) * [clean-up] chores: code clean up and bug fixes * [clean-up] chores: code clean up and bug fixes * [clean-up] chores: code clean up and bug fixes * [clean-up] chores: code clean up and bug fixes * [clean-up] chores: code clean up and bug fixes * chore: add new links (#211) * add new links * fix wrong spelling * format design-inspiration.json file * Remove ids from database --------- Co-authored-by: Rupali Haldiya <78981177+rupali-codes@users.noreply.github.com> * feat: added run command in README.md(#229) * Fixing the README.md file * Fixing the README.md file * chore: adding a sub-category under youtube (#228) * Adding a sub-category under youtube * fixed all the issues regarding the new sub-category * resolved some issues * chore: added new illustration link (#225) * chore: added two icons websites (#231) * Update: Added two icons websites * Resolved * chore: adding table of content (#241) * Added Contributors * Update README.md * Update README.md * Update README.md * Added Discord Icon * Update README.md * Update README.md * Update README.md * chore: added dope ui link (#239) * fix: change theme toggler color (#238) * single card page setup * single card page setup * single card page setup * single card page setup * single card popup setup --------- Co-authored-by: Oyebolade Oladokun <57053389+Oyebolade@users.noreply.github.com> Co-authored-by: Rupali Haldiya <78981177+rupali-codes@users.noreply.github.com> Co-authored-by: Harsh Parashar <96375055+hparashar27@users.noreply.github.com> Co-authored-by: RAGHAV <94848646+raghav1030@users.noreply.github.com> Co-authored-by: Sofiritari Amgbara <38821635+swissjake@users.noreply.github.com> Co-authored-by: Priyankar Pal <88102392+priyankarpal@users.noreply.github.com> Co-authored-by: Atharva Salitri <121221252+the-amazing-atharva@users.noreply.github.com> Co-authored-by: ALIND SHARMA * chore: designing popup & adding language for youtube * chore:adding language in youtube category * fix: fixing popup color for light theme * chore: fixing colors --------- Co-authored-by: Eugene44-hub <75457464+Eugene44-hub@users.noreply.github.com> Co-authored-by: Oyebolade Oladokun <57053389+Oyebolade@users.noreply.github.com> Co-authored-by: Harsh Parashar <96375055+hparashar27@users.noreply.github.com> Co-authored-by: RAGHAV <94848646+raghav1030@users.noreply.github.com> Co-authored-by: Sofiritari Amgbara <38821635+swissjake@users.noreply.github.com> Co-authored-by: Priyankar Pal <88102392+priyankarpal@users.noreply.github.com> Co-authored-by: Atharva Salitri <121221252+the-amazing-atharva@users.noreply.github.com> Co-authored-by: ALIND SHARMA --- components/LinksContainer/LinkContainer.jsx | 24 ++- components/SideNavbar/SideNavbar.tsx | 2 +- components/SideNavbar/SideNavbarCategory.tsx | 2 +- .../SideNavbar/SideNavbarCategoryList.tsx | 2 +- components/SideNavbar/SideNavbarElement.tsx | 2 +- components/TopBar/TopBar.tsx | 2 +- components/cards/index.tsx | 36 ++-- components/popup/index.tsx | 56 +++++ database/frontend/animations.json | 71 +++---- database/frontend/colors.json | 113 +++++----- database/frontend/design-inspirations.json | 200 +++++++++--------- database/frontend/fonts.json | 71 +++---- database/frontend/icons.json | 113 +++++----- database/frontend/illustrations.json | 1 - database/frontend/images.json | 57 +++-- database/frontend/online-code-editors.json | 71 +++---- database/frontend/ui-generators.json | 127 ++++++----- database/resources/blogs.json | 127 ++++++----- database/resources/hosting.json | 113 +++++----- database/youtube/android.json | 9 +- database/youtube/data-structures.json | 9 +- database/youtube/machine-learning.json | 9 +- database/youtube/web-development.json | 91 ++++---- database/youtube/web3-metaverse | 31 --- database/youtube/web3-metaverse.json | 12 +- hooks/useFilterDB.ts | 21 ++ .../index.tsx} | 0 types/index.ts | 11 + 28 files changed, 718 insertions(+), 665 deletions(-) create mode 100644 components/popup/index.tsx delete mode 100644 database/youtube/web3-metaverse create mode 100644 hooks/useFilterDB.ts rename pages/{[subcategory].tsx => [subcategory]/index.tsx} (100%) diff --git a/components/LinksContainer/LinkContainer.jsx b/components/LinksContainer/LinkContainer.jsx index d9439c790..1371b2746 100644 --- a/components/LinksContainer/LinkContainer.jsx +++ b/components/LinksContainer/LinkContainer.jsx @@ -1,18 +1,30 @@ import React from "react"; -import {BsBoxArrowUpRight} from 'react-icons/bs'; +import { BsBoxArrowUpRight } from "react-icons/bs"; -export const LinkContainer = ({ name, description, url }) => { +export const LinkContainer = (props) => { + const { name, description, url, getCardId } = props; return ( -
+
getCardId(props)} + className="transition-all ease-in duration-100 w-full cursor-pointer md:w-72 h-64 bg-gray-100 shadow-lg dark:shadow-sm border hover:scale-[1.02] border-dashed border-violet-500 rounded-3xl dark:bg-gray-900 dark:text-gray-300" + >
-

{name}

-

{description}

+

+ {name} +

+

+ {description} +

e.stopPropagation()} href={url} target="_blank" rel="noreferrer" - className="mt-2 px-6 py-2 text-white text-center font-semibold bg-violet-600 rounded-2xl w-full hover:bg-transparent hover:text-violet-500 border border-dashed border-transparent duration-100 hover:border-violet-400 bottom-0 flex items-center justify-center" + className="mt-2 px-6 py-2 text-white text-center bg-violet-600 rounded-2xl w-full hover:bg-transparent hover:text-violet-500 border border-dashed border-transparent duration-100 hover:border-violet-400 bottom-0 flex items-center justify-center" > Visit site diff --git a/components/SideNavbar/SideNavbar.tsx b/components/SideNavbar/SideNavbar.tsx index 207140654..0702ae0e2 100644 --- a/components/SideNavbar/SideNavbar.tsx +++ b/components/SideNavbar/SideNavbar.tsx @@ -42,7 +42,7 @@ export const SideNavbar = () => {
-
+
diff --git a/components/SideNavbar/SideNavbarCategory.tsx b/components/SideNavbar/SideNavbarCategory.tsx index 3c3f82a5b..669261e78 100644 --- a/components/SideNavbar/SideNavbarCategory.tsx +++ b/components/SideNavbar/SideNavbarCategory.tsx @@ -40,7 +40,7 @@ export const SideNavbarCategory: FC<{item: ISidebar, openByDefault: string}> = ( className="flex w-full cursor-pointer justify-between py-2 hover:text-violet-500 focus-visible:rounded-md focus-visible:outline-none focus-visible:ring focus-visible:ring-violet-500" onClick={handleToggle} > -

+

{item.category}

diff --git a/components/SideNavbar/SideNavbarCategoryList.tsx b/components/SideNavbar/SideNavbarCategoryList.tsx index cdfef8b39..be80e6d9d 100644 --- a/components/SideNavbar/SideNavbarCategoryList.tsx +++ b/components/SideNavbar/SideNavbarCategoryList.tsx @@ -6,7 +6,7 @@ export const SideNavbarCategoryList: FC<{items: ISidebar[], openByDefault: strin const { items, openByDefault } = props; return ( -