diff --git a/app/components/ReleaseCourusel/ReleaseCourusel.tsx b/app/components/ReleaseCourusel/ReleaseCourusel.tsx index d7e333a..32a85da 100644 --- a/app/components/ReleaseCourusel/ReleaseCourusel.tsx +++ b/app/components/ReleaseCourusel/ReleaseCourusel.tsx @@ -1,5 +1,5 @@ "use client"; -import { ReleaseLink } from "../ReleaseLink/ReleaseLink"; +import { ReleaseLink } from "../ReleaseLink/ReleaseLinkUpdate"; import Link from "next/link"; import { Swiper, SwiperSlide } from 'swiper/react'; @@ -42,7 +42,7 @@ export const ReleaseCourusel = (props: { allowTouchMove={true} breakpoints={{ 1800: { - initialSlide: 1, + initialSlide: 2, centeredSlides: true } }} @@ -52,7 +52,8 @@ export const ReleaseCourusel = (props: { return ( diff --git a/app/components/ReleaseLink/ReleaseLink.16_9Related_old.tsx b/app/components/ReleaseLink/ReleaseLink.16_9Related_old.tsx deleted file mode 100644 index aa2959f..0000000 --- a/app/components/ReleaseLink/ReleaseLink.16_9Related_old.tsx +++ /dev/null @@ -1,136 +0,0 @@ -import Link from "next/link"; -import { sinceUnixDate } from "#/api/utils"; -import { Chip } from "#/components/Chip/Chip"; -import Image from "next/image"; - -const profile_lists = { - // 0: "Не смотрю", - 1: { name: "Смотрю", bg_color: "bg-green-500" }, - 2: { name: "В планах", bg_color: "bg-purple-500" }, - 3: { name: "Просмотрено", bg_color: "bg-blue-500" }, - 4: { name: "Отложено", bg_color: "bg-yellow-500" }, - 5: { name: "Брошено", bg_color: "bg-red-500" }, -}; -const YearSeason = ["_", "Зима", "Весна", "Лето", "Осень"]; - -export const ReleaseLink169Related = (props: any) => { - const grade = props.grade.toFixed(1); - const profile_list_status = props.profile_list_status; - let user_list = null; - if (profile_list_status != null || profile_list_status != 0) { - user_list = profile_lists[profile_list_status]; - } - return ( - -
-

- {props.season ? YearSeason[props.season] : ""} -
- {props.year ? props.year : ""} -

-
-
-
-
- {props.title -
-
-
- {props.genres && ( -

- {props.genres} -

- )} -

- {`${props.title_ru.slice(0, 47)}${ - props.title_ru.length > 47 ? "..." : "" - }`} -

-

- {`${props.description.slice(0, 97)}${ - props.description.length > 97 ? "..." : "" - }`} -

-

- {props.title_ru} -

-

- {props.description} -

-
-
- - {user_list && ( - - )} - {props.status ? ( - - ) : ( - props.status_id != 0 && ( - - ) - )} - - {props.category && } - {props.season || props.year ? ( - - ) : ( - "" - )} - {props.is_favorite && ( -
- -
- )} -
-
-
-
- - ); -}; diff --git a/app/components/ReleasePoster/Poster.tsx b/app/components/ReleasePoster/Poster.tsx index 315e411..4d500cb 100644 --- a/app/components/ReleasePoster/Poster.tsx +++ b/app/components/ReleasePoster/Poster.tsx @@ -3,10 +3,6 @@ import Image from "next/image"; export const Poster = (props: { image: string; alt?: string; - // title: { ru: string; original: string }; - // note: string | null; - // description: string; -// type?: "image_only"; className?: string; }) => { return ( @@ -17,6 +13,10 @@ export const Poster = (props: { alt={props.alt || ""} width={285} height={385} + style={{ + width: "100%", + height: "auto", + }} /> ); }; diff --git a/app/components/ReleasePoster/PosterWithStuff.tsx b/app/components/ReleasePoster/PosterWithStuff.tsx index 3af1bce..f46cf2e 100644 --- a/app/components/ReleasePoster/PosterWithStuff.tsx +++ b/app/components/ReleasePoster/PosterWithStuff.tsx @@ -1,4 +1,3 @@ -import Link from "next/link"; import { Poster } from "./Poster"; import { ReleaseChips } from "./Chips"; @@ -75,7 +74,7 @@ export const PosterWithStuff = (props: { } return ( -
+
0 && genres.map((genre: string, index: number) => { return ( - + {index > 0 && ", "} - - {genre} - + {genre} ); })} @@ -113,15 +110,15 @@ export const PosterWithStuff = (props: { )}
{settings.showDescription && props.description && ( -

- {props.description} -

- )} +

+ {props.description} +

+ )}
-
+
); diff --git a/app/pages/Related.tsx b/app/pages/Related.tsx index af8ebf9..1cb7343 100644 --- a/app/pages/Related.tsx +++ b/app/pages/Related.tsx @@ -5,7 +5,6 @@ import { useState, useEffect } from "react"; import { useScrollPosition } from "#/hooks/useScrollPosition"; import { useUserStore } from "../store/auth"; import { ENDPOINTS } from "#/api/config"; -// import { ReleaseLink169Related } from "#/components/ReleaseLink/ReleaseLink.16_9Related"; import { useSWRfetcher } from "#/api/utils"; import { Card } from "flowbite-react"; import { Poster } from "#/components/ReleasePoster/Poster"; @@ -97,7 +96,6 @@ export function RelatedPage(props: { id: number | string; title: string }) { genres.push(genre.trim()); }); } - // return return ( @@ -112,12 +110,12 @@ export function RelatedPage(props: { id: number | string; title: string }) {
-
+
- +
{index > 0 && ", "} - - {genre} - + {genre} ); })}