Skip to content

Commit

Permalink
Update various image change
Browse files Browse the repository at this point in the history
  • Loading branch information
huy232 committed Oct 19, 2023
1 parent 75c81c8 commit e6b125b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Components/Content/CharacterDetail/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function CharacterDetail({ randomAnime, loadingRandomAnime }) {
>
{randomAnime.characters.map((character, i) => (
<SwiperSlide
className="w-[100px] flex flex-col justify-center items-center flex flex-col text-[#42EADDFF]"
className="w-[100px] flex flex-col justify-center items-center text-[#42EADDFF]"
key={i}
>
<div className="h-full">
Expand Down
31 changes: 24 additions & 7 deletions src/Components/Content/RandomAnimeENGComp/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import React from "react"
import "swiper/css"
import "swiper/css/pagination"
import "./movieanime.css"
import { Link } from "react-router-dom"
import { toSlug } from "../../../Utilities/toSlug"
import { duration } from "../../../Utilities/duration"
import { useState } from "react"
import Image from "../Image"

function RandomAnimeENGComp({ randomAnime }) {
const [showFullText, setShowFullText] = useState(false)

// Your data
const description = randomAnime.description?.replace(/<[br]+>/g, "")

// Check if the text is longer than 5 lines
const isLongText = description.split("\n").length > 5
return (
<>
<h1 className="font-black ml-6 mr-6 mt-2 border-b-4 border-white text-rose-500 max-sm:text-center">
Expand Down Expand Up @@ -59,12 +66,22 @@ function RandomAnimeENGComp({ randomAnime }) {
</Link>
))}
</div>
<div
className="mx-[20px]"
dangerouslySetInnerHTML={{
__html: randomAnime.description?.replace(/<[br]+>/g, ""),
}}
></div>
<div>
<div
className={`mx-[20px] ${showFullText ? "" : "line-clamp-5"}`}
dangerouslySetInnerHTML={{
__html: description,
}}
></div>
{isLongText && (
<button
className="p-[4px] bg-black/80 my-2 hover:opacity-80 duration-200 rounded"
onClick={() => setShowFullText(!showFullText)}
>
{showFullText ? "Show Less" : "Show More"}
</button>
)}
</div>
<div></div>
<div className="flex lg:flex-row [&>*]:p-[6px] [&>*]:m-[4px] max-lg:flex-col">
<div className="flex flex-col items-center">
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Content/RandomAnimeRightCover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function RandomAnimeRightCover({ randomAnime }) {
<Link to={`/info/${randomAnime.slug}`} aria-label={randomAnime.slug}>
<Image
src={randomAnime.cover || ""}
className="today-cover-image w-full h-auto object-fill aspect-[2/3] duration-500 ease-in-out"
className="today-cover-image w-full h-auto object-fill aspect-[2/3] duration-500 ease-in-out hover:opacity-80"
alt={randomAnime.name}
loading="lazy"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Content/RandomAnimeTitle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function RandomAnimeTitle({ randomAnime }) {
aria-label={randomAnime.slug}
>
<Card.Img
className="today-banner-card-image object-cover"
className="today-banner-card-image object-cover hover:opacity-80"
variant="bottom"
src={randomAnime.banner}
alt={randomAnime.name}
Expand Down
2 changes: 2 additions & 0 deletions src/Pages/HomeVI/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@
padding-right: 0 !important;
-o-border-image: none !important;
border-image: none !important;
margin-left: 0px;
margin-right: 0px;
}

.col-9 {
Expand Down

1 comment on commit e6b125b

@vercel
Copy link

@vercel vercel bot commented on e6b125b Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mirai – ./

mirai-git-main-huy8856.vercel.app
mirai-huy8856.vercel.app
unime.vercel.app

Please sign in to comment.