diff --git a/src/pages/animeInfo/AnimeInfo.jsx b/src/pages/animeInfo/AnimeInfo.jsx index 992be32..1b20583 100644 --- a/src/pages/animeInfo/AnimeInfo.jsx +++ b/src/pages/animeInfo/AnimeInfo.jsx @@ -19,7 +19,7 @@ import Voiceactor from "@/src/components/voiceactor/Voiceactor"; function InfoItem({ label, value, isProducer = true }) { return ( value && ( -
+
{`${label}: `} {Array.isArray(value) ? ( @@ -38,8 +38,9 @@ function InfoItem({ label, value, isProducer = true }) { {index < value.length - 1 && ", "} ) : ( - + {item} + {index < value.length - 1 && ", "} ) ) @@ -55,7 +56,7 @@ function InfoItem({ label, value, isProducer = true }) { {value} ) : ( - {value} + {value} )}
@@ -66,10 +67,10 @@ function InfoItem({ label, value, isProducer = true }) { function Tag({ bgColor, index, icon, text }) { return (
- {icon && } -

{text}

+ {icon && } +

{text}

); } @@ -153,159 +154,290 @@ function AnimeInfo({ random = false }) { return (
- {/* Background Image with Gradient Overlay */} -
- {`${title} -
-
{/* Main Content */} -
-
- {/* Poster Section */} -
-
- {`${title} - {animeInfo.adultContent && ( -
- 18+ +
+ {/* Mobile Layout */} +
+
+ {/* Poster Section */} +
+
+ {`${title} + {animeInfo.adultContent && ( +
+ 18+ +
+ )} +
+
+ + {/* Basic Info Section */} +
+ {/* Title */} +
+

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

+ {language === "EN" && japanese_title && ( +

JP Title: {japanese_title}

+ )} +
+ + {/* Tags */} +
+ {tags.map(({ condition, icon, text }, index) => + condition && ( + + ) + )} +
+ + {/* Overview - Limited for mobile */} + {info?.Overview && ( +
+ {info.Overview.length > 150 ? ( + <> + {isFull ? ( + info.Overview + ) : ( +
{info.Overview}
+ )} + + + ) : ( + info.Overview + )}
)}
- {/* Info Section */} -
- {/* Title */} -

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

- - {/* Tags */} -
- {tags.map(({ condition, icon, text }, index) => - condition && ( - - ) - )} -
- - {/* Details Section */} -
-
- {[ - { 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) => ( - - ))} -
- - {/* 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) => ( - - ))} -
-
- - {/* Watch Button */} + {/* Watch Button - Full Width on Mobile */} +
{animeInfo?.animeInfo?.Status?.toLowerCase() !== "not-yet-aired" ? ( - Watch Now + Watch Now ) : ( -
- Not released +
+ Not released +
+ )} +
+ + {/* Details Section - Full Width on Mobile */} +
+
+ {[ + { 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) => ( + + ))} +
+ + {/* Genres */} + {info?.Genres && ( +
+

Genres

+
+ {info.Genres.map((genre, index) => ( + + {genre} + + ))} +
)} - {/* Overview */} - {info?.Overview && ( -
- {info.Overview.length > 270 ? ( - <> - {isFull - ? info.Overview - : `${info.Overview.slice(0, 270)}...`} - - - ) : ( - info.Overview + {/* Studios & Producers */} +
+ {[ + { label: "Studios", value: info?.Studios }, + { label: "Producers", value: info?.Producers }, + ].map((item, index) => ( + + ))} +
+
+
+ + {/* Desktop Layout - Existing Code */} +
+
+ {/* Poster Section */} +
+
+ {`${title} + {animeInfo.adultContent && ( +
+ 18+ +
)}
- )} +
- {/* Share Section */} -
- Share Anime -
-

Share Anime

-

with your friends

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

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

+ {language === "EN" && japanese_title && ( +

JP Title: {japanese_title}

+ )} +
+ + {/* Tags */} +
+ {tags.map(({ condition, icon, text }, index) => + condition && ( + + ) + )} +
+ + {/* Overview */} + {info?.Overview && ( +
+ {info.Overview.length > 270 ? ( + <> + {isFull + ? info.Overview + : `${info.Overview.slice(0, 270)}...`} + + + ) : ( + info.Overview + )} +
+ )} + + {/* Watch Button */} + {animeInfo?.animeInfo?.Status?.toLowerCase() !== "not-yet-aired" ? ( + + + Watch Now + + ) : ( +
+ Not released +
+ )} + + {/* Details Section */} +
+
+ {[ + { 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) => ( + + ))} +
+ + {/* 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) => ( + + ))} +
@@ -315,14 +447,14 @@ function AnimeInfo({ random = false }) { {/* Seasons Section */} {seasons?.length > 0 && ( -
-

More Seasons

-
+
+

More Seasons

+
{seasons.map((season, index) => ( {/* Title Container */}
-