From 18e36d8b630ae5f8ba00585fcd6f6aa7b933467b Mon Sep 17 00:00:00 2001 From: Tejas Panchal Date: Wed, 30 Jul 2025 23:56:26 +0530 Subject: [PATCH] fixing category card --- src/components/categorycard/CategoryCard.css | 80 +++++++++++++++++--- src/components/categorycard/CategoryCard.jsx | 40 +++++----- src/components/player/PlayerIcons.jsx | 9 +-- src/components/sidecard/Sidecard.jsx | 3 + src/pages/search/Search.jsx | 14 +++- 5 files changed, 105 insertions(+), 41 deletions(-) diff --git a/src/components/categorycard/CategoryCard.css b/src/components/categorycard/CategoryCard.css index 04411bc..7766feb 100644 --- a/src/components/categorycard/CategoryCard.css +++ b/src/components/categorycard/CategoryCard.css @@ -8,20 +8,78 @@ bottom: 0; background: linear-gradient( to top, - rgba(32, 31, 49, 1) 0%, - rgba(32, 31, 49, 0) 20%, - rgba(32, 31, 49, 0) 100% + rgba(18, 18, 18, 1) 0%, + rgba(18, 18, 18, 0.7) 20%, + rgba(18, 18, 18, 0) 60%, + rgba(18, 18, 18, 0.2) 100% ); - z-index: 50; + transition: all 0.3s ease-in-out; } + +.group:hover .overlay { + background: linear-gradient( + to top, + rgba(18, 18, 18, 0.95) 0%, + rgba(18, 18, 18, 0.8) 50%, + rgba(18, 18, 18, 0.6) 100% + ); +} + .dot { - width: 5px; - height: 5px; - display: flex; - justify-content: center; - align-items: center; - border-radius: 50%; - background: rgba(255, 255, 255, 0.3); + width: 3px; + height: 3px; display: inline-block; + border-radius: 50%; + background: rgba(255, 255, 255, 0.4); + margin: 0 4px; + position: relative; + top: -1px; +} + +/* Modern Card Styles */ +.category-card-container { + transition: transform 0.3s ease-in-out; +} + +.category-card-container:hover { + transform: translateY(-4px); +} + +.category-badge { + backdrop-filter: blur(8px); + -webkit-backdrop-filter: blur(8px); + background: rgba(255, 255, 255, 0.1); + border: 1px solid rgba(255, 255, 255, 0.2); + padding: 4px 8px; + border-radius: 4px; + font-weight: 600; + letter-spacing: 0.02em; + transition: all 0.3s ease; +} + +.category-badge:hover { + background: rgba(255, 255, 255, 0.15); +} + +.item-title { + font-weight: 500; + letter-spacing: 0.01em; + transition: all 0.2s ease; +} + +.item-title:hover { + color: #ffffff; + text-shadow: 0 0 20px rgba(255, 255, 255, 0.2); +} + +.play-icon { + opacity: 0; + transform: translate(-50%, -50%) scale(0.8); + transition: all 0.3s ease; +} + +.group:hover .play-icon { + opacity: 1; + transform: translate(-50%, -50%) scale(1); } diff --git a/src/components/categorycard/CategoryCard.jsx b/src/components/categorycard/CategoryCard.jsx index 742bc24..d3a20a8 100644 --- a/src/components/categorycard/CategoryCard.jsx +++ b/src/components/categorycard/CategoryCard.jsx @@ -87,8 +87,8 @@ const CategoryCard = React.memo( }; return (
-
-

+
+

{label}

{showViewMore && ( @@ -96,10 +96,10 @@ const CategoryCard = React.memo( to={`/${path}`} className="flex w-fit items-baseline h-fit rounded-3xl gap-x-1 group" > -

+

View more

- + )}
@@ -115,7 +115,7 @@ const CategoryCard = React.memo( {itemsToRender.firstRow.map((item, index) => (
(cardRefs.current[index] = el)} > @@ -136,7 +136,7 @@ const CategoryCard = React.memo( {hoveredItem === item.id + index && showPlay && ( )} @@ -150,36 +150,36 @@ const CategoryCard = React.memo(
{(item.tvInfo?.rating === "18+" || item?.adultContent === true) && ( -
+
18+
)} -
+
{item.tvInfo?.sub && ( -
+
-

+

{item.tvInfo.sub}

)} {item.tvInfo?.dub && ( -
+
-

+

{item.tvInfo.dub}

)} {item.tvInfo?.eps && ( -
-

+

+

{item.tvInfo.eps}

@@ -200,21 +200,21 @@ const CategoryCard = React.memo(
{language === "EN" ? item.title : item.japanese_title} {item.description && ( -
+
{item.description}
)}
-
+
{item.tvInfo.showType.split(" ").shift()}
-
+
{item.tvInfo?.duration === "m" || item.tvInfo?.duration === "?" || item.duration === "m" || diff --git a/src/components/player/PlayerIcons.jsx b/src/components/player/PlayerIcons.jsx index 2410fa3..75e17b1 100644 --- a/src/components/player/PlayerIcons.jsx +++ b/src/components/player/PlayerIcons.jsx @@ -73,12 +73,9 @@ const fullScreenOnIcon = ``; const logo = `

- Powered by - - Zen!me - -

-`; + Powered by + Zenime Logo +

`; export { backward10Icon, diff --git a/src/components/sidecard/Sidecard.jsx b/src/components/sidecard/Sidecard.jsx index 9cd69bf..7dd0bf4 100644 --- a/src/components/sidecard/Sidecard.jsx +++ b/src/components/sidecard/Sidecard.jsx @@ -29,6 +29,9 @@ function Sidecard({ data, label, className }) { return (
+ {label && ( +

{label}

+ )}
{data && data.map((item, index) => ( diff --git a/src/pages/search/Search.jsx b/src/pages/search/Search.jsx index f52033c..13156d2 100644 --- a/src/pages/search/Search.jsx +++ b/src/pages/search/Search.jsx @@ -1,5 +1,4 @@ import CategoryCard from '@/src/components/categorycard/CategoryCard'; -import Genre from '@/src/components/genres/Genre'; import CategoryCardLoader from '@/src/components/Loader/CategoryCard.loader'; import SidecardLoader from '@/src/components/Loader/Sidecard.loader'; import PageSlider from '@/src/components/pageslider/PageSlider'; @@ -20,7 +19,7 @@ function Search() { const [error, setError] = useState(null); useEffect(() => { - const fetchSearch = async () => { + const fetchSearch = async () => { setLoading(true); try { const data = await getSearch(keyword,page); @@ -62,8 +61,15 @@ function Search() { ) : ( <> - {homeInfo?.most_popular && } - {homeInfo?.genres && } + {homeInfo?.most_popular && ( +
+

Most Popular

+ +
+ )} )}