-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes in anime/manga details for responsive
- Loading branch information
1 parent
c433aa0
commit a8743e9
Showing
10 changed files
with
106 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 65 additions & 42 deletions
107
frontend/src/Pages/Home/AnimeManga/AnimeMangaDetail/AnimeMangaTop/AnimeMangaTop.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,72 @@ | ||
import {Icon} from "@iconify/react"; | ||
import { Icon } from "@iconify/react"; | ||
|
||
import Skeleton from "react-loading-skeleton"; | ||
import CustomButton from "../../../../../components/CustomButton/CustomButton" | ||
|
||
import Button from "../../../../../components/CustomButton/CustomButton"; | ||
|
||
const AnimeMangaTop = ({animeDetail, addToFavoriteHandler, addToWatchListHandler}) => { | ||
|
||
return ( | ||
<div className="anime-detail-top"> | ||
<div className="anime-detail-top-content"> | ||
<div className="anime-detail-top-left"> | ||
{animeDetail?.main_picture ? <img src={animeDetail?.main_picture.large} alt="main"/> : | ||
<Skeleton height={"100%"}/>} | ||
{animeDetail?.main_picture && <div className="anime-detail-top-left-content"> | ||
<div className="rating-favorite-container"> | ||
<span className="rating"> | ||
<Icon color="yellow" style={{fontSize: '1.5rem'}} | ||
icon="material-symbols:star"/> | ||
<h5>{animeDetail?.mean ? animeDetail.mean : 'N/A'}</h5> | ||
</span> | ||
<span onClick={() => addToFavoriteHandler()} style={{zIndex: '100', cursor: 'pointer'}} | ||
className="favorite"><Icon color="gray" style={{ | ||
fontSize: '2.25rem', | ||
opacity: "0.7" | ||
}} icon="mdi:heart"/></span> | ||
</div> | ||
<div onClick={ | ||
() => addToWatchListHandler()}> | ||
<Button title="Add to Watchlist"/> | ||
</div> | ||
</div>} | ||
</div> | ||
<div className="anime-detail-top-right"> | ||
<div className="title"> | ||
<h2>{animeDetail?.title || <Skeleton/>}</h2> | ||
</div> | ||
<div className="rating-popularity-container"> | ||
{animeDetail?.rank && <h5 className="rating">Rating # {animeDetail?.rank}</h5>} | ||
{animeDetail?.popularity && | ||
<h5 className="popularity">Popularity # {animeDetail?.popularity}</h5>} | ||
</div> | ||
</div> | ||
const AnimeMangaTop = ({ | ||
animeDetail, | ||
addToFavoriteHandler, | ||
addToWatchListHandler, | ||
}) => { | ||
return ( | ||
<div className="anime-detail-top"> | ||
<div className="anime-detail-top-content"> | ||
<div className="anime-detail-top-left"> | ||
{animeDetail?.main_picture ? ( | ||
<img src={animeDetail?.main_picture.large} alt="main" /> | ||
) : ( | ||
<Skeleton height={"100%"} /> | ||
)} | ||
{animeDetail?.main_picture && ( | ||
<div className="anime-detail-top-left-content"> | ||
<div className="rating-favorite-container"> | ||
<span className="flex-center rating"> | ||
<Icon | ||
color="yellow" | ||
style={{ fontSize: "1.25rem" }} | ||
icon="material-symbols:star" | ||
/> | ||
<p className="color-text">{animeDetail?.mean ? animeDetail.mean : "N/A"}</p> | ||
</span> | ||
<span | ||
onClick={() => addToFavoriteHandler()} | ||
style={{ zIndex: "100"}} | ||
className="cursor-btn favorite" | ||
> | ||
<Icon | ||
color="gray" | ||
style={{ | ||
fontSize: "2.25rem", | ||
opacity: "0.7", | ||
}} | ||
icon="mdi:heart" | ||
/> | ||
</span> | ||
</div> | ||
<div onClick={() => addToWatchListHandler()}> | ||
<CustomButton width={"100%"} backgroundColor={'var(--primary)'}><h5 className="color-text">Add to watchlist</h5></CustomButton> | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
<div className="anime-detail-top-right"> | ||
<div className="title"> | ||
<h2>{animeDetail?.title || <Skeleton />}</h2> | ||
</div> | ||
<div className="rating-popularity-container"> | ||
{animeDetail?.rank && ( | ||
<h5 className="rating">Rating # {animeDetail?.rank}</h5> | ||
)} | ||
{animeDetail?.popularity && ( | ||
<h5 className="popularity"> | ||
Popularity # {animeDetail?.popularity} | ||
</h5> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AnimeMangaTop; | ||
export default AnimeMangaTop; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters