Skip to content

Commit

Permalink
changes in anime/manga details for responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
prince2520 committed Feb 13, 2024
1 parent c433aa0 commit a8743e9
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
column-gap: 1.5rem;
}

.related-container .heading{
margin-top: 1rem;
}

.anime-detail-bottom .anime-detail-bottom-mobile{
display: none;
Expand All @@ -32,6 +29,12 @@
padding: 0.5rem 0.75rem;
}

.related-container-scroll .related-anime{
flex-direction: column;
align-items: flex-start;
row-gap: 0.75rem;
}

@media screen and (max-width: 800px) {
.anime-detail-bottom .detail-links{
font-size: 1rem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
.anime-detail-bottom-mobile-top .anime-detail-bottom-mobile-title{
font-size: 1.75rem;
font-weight: 600;
color: white;
}

.anime-detail-bottom-mobile-top{
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
column-gap: 0.75rem;
}

.anime-detail-bottom-mobile-top .rating{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
column-gap: 0.25rem;
background-color: #262424;
background-color: var(--container);
color: white;
padding: 0.5rem 0.75rem;
border-radius: 1.5em;
Expand All @@ -26,18 +19,14 @@
}

.anime-detail-bottom-mobile-btn-container{
display: flex;
justify-content: flex-start;
align-items: center;
justify-content: flex-start!important;
column-gap: 0.75rem;
flex-wrap: wrap;
row-gap: 0.75rem;
}

.anime-detail-bottom-mobile-btn-container span{
border: 2px solid #636262;
.anime-detail-bottom-mobile-btn-container h6{
border: 1px solid var(--border);
padding: 0.25rem 0.5rem;
border-radius: 0.5rem;
font-size: 0.9rem;

border-radius: 0.25rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,38 @@ const AnimeMangaDetailBottomMobile = ({ animeDetail, category }) => {
return (
<div className="anime-detail-bottom-mobile">
<div className="anime-detail-bottom-mobile-top">
<div className="anime-detail-bottom-mobile-title">
<h2>
{animeDetail?.title}
</div>
<div className="rating">
</h2>
<div className="flex-center rating">
<Icon
color="yellow"
style={{ fontSize: "1.5rem" }}
style={{ fontSize: "1.25rem" }}
icon="material-symbols:star"
/>
<span>{animeDetail?.mean}</span>
<p className="color-text">{animeDetail?.mean}</p>
</div>
</div>
<div className="anime-detail-bottom-mobile-btn-container">
<div className="flex-center anime-detail-bottom-mobile-btn-container">
{animeDetail?.media_type ? (
<span>{animeDetail.media_type.toUpperCase()}</span>
<h6>{animeDetail.media_type.toUpperCase()}</h6>
) : null}
{animeDetail?.num_episodes ? (
<span>{animeDetail?.num_episodes + " Episodes"}</span>
<h6>{animeDetail?.num_episodes + " Episodes"}</h6>
) : null}
{animeDetail?.num_chapters ? (
<span>{animeDetail?.num_chapters + " Chapters"}</span>
<h6>{animeDetail?.num_chapters + " Chapters"}</h6>
) : null}
{animeDetail?.status ? <span>{animeDetail.status}</span> : null}
{animeDetail?.status ? <h6>{animeDetail.status}</h6> : null}
</div>
<div className="detail-links">
{detail_links.map((links) => (
<span
<h4
className={`detail-link ${selectedLink === links && "selected"}`}
onClick={() => setSelectedLink(links)}
>
{links}
</span>
</h4>
))}
</div>
{selectedLink === detail_links[0] && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const AnimeMangaDetailRelated = ({ animeDetail, category }) => {
<h3 className="heading">Related Anime</h3>

<div className={"related-container-scroll"}>
<div className="related-anime">
<div className="flex-center related-anime">
{animeDetail?.related_anime.length > 0 ? (
animeDetail.related_anime.map((res) => (
<p style={{ color: "white" }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,12 @@
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}

.anime-detail-watchlist-like .anime-detail-watchlist-btn{
width: 55%;
max-width: 10rem;
font-size: 1.1rem;

}

.anime-detail-watchlist-like .anime-detail-like-btn{
Expand All @@ -237,7 +236,6 @@
height: 2.5rem;
width: 2.5rem;
border-radius: 50%;
font-size: 2rem;

box-shadow: 0 5px 5px rgba(0, 0, 0, 0.25);

Expand Down Expand Up @@ -265,29 +263,9 @@
width: 100%;
}

.recommendation-container .recommendation-card {
font-size: 0.85rem;
}

.recommendation .recommendation-container {
column-gap: 1rem;
row-gap: 1rem;
justify-content: center;
}

.overview .heading,
.related-anime .heading,
.anime-detail-bottom-left .heading,
.recommendation .heading,
.related-container. .heading
{
font-size: 1.5rem;
}

.information p,
.overview p,
.related-anime p{
font-size: 1rem;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ const AnimeMangaDetail = () => {
className="anime-detail-watchlist-btn"
onClick={() => addToWatchListHandler()}
>
<CustomButton title={"Add to watchlist"}></CustomButton>
<CustomButton width={"100%"} backgroundColor={"var(--primary)"}>
<h5 className="color-text">Add to watchlist</h5>
</CustomButton>
</div>
<div
className="anime-detail-like-btn"
Expand Down
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;
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@
width: 100%;
display: flex;
column-gap: 1.75rem;
font-size: 0.95rem;
border-bottom: 0.015rem var(--border) solid;
border-bottom: 1px var(--border) solid;
}

.favorite-table-item-mobile .favorite-table-item-mobile-left,
Expand Down Expand Up @@ -235,14 +234,11 @@
.my-watchlist-table-item-mobile-right .item-type-mobile {
display: flex;
column-gap: 0.75rem;
color: var(--text-extra-light);
width: 100%;
}

.favorite-table-item-mobile-right .item-title-mobile,
.my-watchlist-table-item-mobile-right .item-title-mobile {
font-size: 1.15rem;
font-weight: 600;
width: 100%;
}

Expand All @@ -264,7 +260,6 @@
.favorite-img-container div,
.my-watchlist-img-container div {
position: static;
font-size: 2rem;
border-bottom: 1px solid var(--border);
padding-bottom: 0.25rem;
}
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/components/SearchBar/SearchBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
border-color: var(--text);
}

.search-bar:hover svg{
color: var(--text);
}


.search-bar svg{
font-size: 1.5rem;
color: var(--text-light);
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ input {
font-family: "Mulish", sans-serif;
}

input:hover, input:focus {
color: var(--text);

}


input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
Expand Down

0 comments on commit a8743e9

Please sign in to comment.