From 20fce020c27504bcbdee559046e4bb33bd2ec0ed Mon Sep 17 00:00:00 2001 From: Tejas Panchal Date: Sun, 27 Jul 2025 19:39:31 +0530 Subject: [PATCH] info page in progress --- src/pages/animeInfo/AnimeInfo.jsx | 443 +++++++++++++----------------- src/pages/category/Category.jsx | 2 +- src/pages/watch/Watch.jsx | 2 +- 3 files changed, 200 insertions(+), 247 deletions(-) diff --git a/src/pages/animeInfo/AnimeInfo.jsx b/src/pages/animeInfo/AnimeInfo.jsx index 89f0e3c..a59b931 100644 --- a/src/pages/animeInfo/AnimeInfo.jsx +++ b/src/pages/animeInfo/AnimeInfo.jsx @@ -19,9 +19,9 @@ import Voiceactor from "@/src/components/voiceactor/Voiceactor"; function InfoItem({ label, value, isProducer = true }) { return ( value && ( -
- {`${label}: `} - +
+ {`${label}: `} + {Array.isArray(value) ? ( value.map((item, index) => isProducer ? ( @@ -32,7 +32,7 @@ function InfoItem({ label, value, isProducer = true }) { .join("-") .replace(/-+/g, "-")}`} key={index} - className="cursor-pointer hover:text-[#ffbade]" + className="cursor-pointer transition-colors duration-300 hover:text-gray-300" > {item} {index < value.length - 1 && ", "} @@ -50,7 +50,7 @@ function InfoItem({ label, value, isProducer = true }) { .split(" ") .join("-") .replace(/-+/g, "-")}`} - className="cursor-pointer hover:text-[#ffbade]" + className="cursor-pointer transition-colors duration-300 hover:text-gray-300" > {value} @@ -66,12 +66,9 @@ function InfoItem({ label, value, isProducer = true }) { function Tag({ bgColor, index, icon, text }) { return (
- {icon && } + {icon && }

{text}

); @@ -154,262 +151,218 @@ function AnimeInfo({ random = false }) { ]; return ( - <> -
- {`${title} -
-
- {`${title} - {animeInfo.adultContent && ( -
- 18+ +
+
+ {/* Background Image with Gradient Overlay */} +
+ {`${title} +
+
+ + {/* Main Content */} +
+
+ {/* Poster Section */} +
+
+ {`${title} + {animeInfo.adultContent && ( +
+ 18+ +
+ )}
- )} -
-
-
    - {[ - ["Home", "home"], - [info.tvInfo?.showType, info.tvInfo?.showType], - ].map(([text, link], index) => ( -
  • - - {text} - -
    -
  • - ))} -

    +

+ + {/* Info Section */} +
+ {/* Title */} +

{language === "EN" ? title : japanese_title} -

- -

- {language === "EN" ? title : japanese_title} -

-
- {tags.map( - ({ condition, icon, bgColor, text }, index) => + + + {/* Tags */} +
+ {tags.map(({ condition, icon, text }, index) => condition && ( ) - )} -
- {[info.tvInfo?.showType, info.tvInfo?.duration].map( - (item, index) => - item && ( -
-
-

{item}

-
- ) )}
-
- {animeInfo?.animeInfo?.Status?.toLowerCase() !== "not-yet-aired" ? ( - - -

Watch Now

- - ) : ( -
-

Not released

-
- )} - {info?.Overview && ( -
- {info.Overview.length > 270 ? ( - <> - {isFull - ? info.Overview - : `${info.Overview.slice(0, 270)}...`} - setIsFull(!isFull)} - > - {isFull ? "- Less" : "+ More"} - - - ) : ( - info.Overview - )} -
- )} -

- {`${website_name} is the best site to watch `} - {title} - {` SUB online, or you can even watch `} - {title} - {` DUB in HD quality.`} -

-
- Share Anime -
-

- Share Anime -

-

to your friends

-
-
-
-
-
-
- {info?.Overview && ( -
-

Overview:

-
-

{info.Overview}

-
-
- )} - {[ - { label: "Japanese", value: info?.Japanese }, - { label: "Synonyms", value: info?.Synonyms }, - { label: "Aired", value: info?.Aired }, - { label: "Premiered", value: info?.Premiered }, - { label: "Duration", value: info?.Duration }, - { label: "Status", value: info?.Status }, - { label: "MAL Score", value: info?.["MAL Score"] }, - ].map(({ label, value }, index) => ( - - ))} - {info?.Genres && ( -
-

Genres:

-
- {info.Genres.map((genre, index) => ( - +
+ {[ + { label: "Japanese", value: info?.Japanese }, + { label: "Synonyms", value: info?.Synonyms }, + { label: "Aired", value: info?.Aired }, + { label: "Premiered", value: info?.Premiered }, + { label: "Duration", value: info?.Duration }, + { label: "Status", value: info?.Status }, + { label: "MAL Score", value: info?.["MAL Score"] }, + ].map((item, index) => ( + - {genre} - + label={item.label} + value={item.value} + isProducer={false} + /> + ))} +
+ + {/* Genres */} + {info?.Genres && ( +
+

Genres

+
+ {info.Genres.map((genre, index) => ( + + {genre} + + ))} +
+
+ )} + + {/* Studios & Producers */} +
+ {[ + { label: "Studios", value: info?.Studios }, + { label: "Producers", value: info?.Producers }, + ].map((item, index) => ( + ))}
- )} - {[ - { label: "Studios", value: info?.Studios }, - { label: "Producers", value: info?.Producers }, - ].map(({ label, value }, index) => ( - - ))} -

- {`${website_name} is the best site to watch `} - {title} - {` SUB online, or you can even watch `} - {title} - {` DUB in HD quality.`} -

+ + {/* Watch Button */} + {animeInfo?.animeInfo?.Status?.toLowerCase() !== "not-yet-aired" ? ( + + + Watch Now + + ) : ( +
+ Not released +
+ )} + + {/* Overview */} + {info?.Overview && ( +
+ {info.Overview.length > 270 ? ( + <> + {isFull + ? info.Overview + : `${info.Overview.slice(0, 270)}...`} + + + ) : ( + info.Overview + )} +
+ )} + + {/* Share Section */} +
+ Share Anime +
+

Share Anime

+

with your friends

+
+
+
-
-
- {seasons?.length > 0 && ( -
-

- More Seasons -

-
- {seasons.map((season, index) => ( - -

- {season.season} -

-
- - - ))} -
-
- )} - {animeInfo?.charactersVoiceActors.length > 0 && ( - - )} - {animeInfo.recommended_data.length > 0 && ( - - )} + + {/* Seasons Section */} + {seasons?.length > 0 && ( +
+

More Seasons

+
+ {seasons.map((season, index) => ( + + {season.season} +
+

+ {season.season} +

+
+ + ))} +
-
- {animeInfo.related_data.length > 0 && ( - - )} - {homeInfo && homeInfo.most_popular && ( - - )} + )} + + {/* Voice Actors Section */} + {animeInfo?.charactersVoiceActors.length > 0 && ( +
+
-
- + )} + + {/* Recommendations Section */} + {animeInfo.recommended_data.length > 0 && ( +
+ +
+ )} +
); } diff --git a/src/pages/category/Category.jsx b/src/pages/category/Category.jsx index 326c61e..acaca32 100644 --- a/src/pages/category/Category.jsx +++ b/src/pages/category/Category.jsx @@ -53,7 +53,7 @@ function Category({ path, label }) {
Share Anime diff --git a/src/pages/watch/Watch.jsx b/src/pages/watch/Watch.jsx index b2e1fab..7a3b879 100644 --- a/src/pages/watch/Watch.jsx +++ b/src/pages/watch/Watch.jsx @@ -491,7 +491,7 @@ export default function Watch() {
Share Anime