From 1eee181e219dfd993d396ac3169e7aad3dd285eb Mon Sep 17 00:00:00 2001 From: Factiven Date: Sun, 16 Jul 2023 22:35:39 +0700 Subject: Update v3.6.4 - Added Manga page with a working tracker for AniList user - Added schedule component to home page - Added disqus comment section so you can fight on each other (not recommended) - Added /id and /en route for english and indonesian subs (id route still work in progress) --- components/manga/info/mobile/mobileButton.js | 39 ++++++++++ components/manga/info/mobile/topMobile.js | 16 ++++ components/manga/info/topSection.js | 106 +++++++++++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 components/manga/info/mobile/mobileButton.js create mode 100644 components/manga/info/mobile/topMobile.js create mode 100644 components/manga/info/topSection.js (limited to 'components/manga/info') diff --git a/components/manga/info/mobile/mobileButton.js b/components/manga/info/mobile/mobileButton.js new file mode 100644 index 0000000..0016b59 --- /dev/null +++ b/components/manga/info/mobile/mobileButton.js @@ -0,0 +1,39 @@ +import Link from "next/link"; +import AniList from "../../../media/aniList"; +import { BookOpenIcon } from "@heroicons/react/24/outline"; + +export default function MobileButton({ info, firstEp, saveManga }) { + return ( +
+ + +
+ +
+ +
+ ); +} diff --git a/components/manga/info/mobile/topMobile.js b/components/manga/info/mobile/topMobile.js new file mode 100644 index 0000000..2e6b23a --- /dev/null +++ b/components/manga/info/mobile/topMobile.js @@ -0,0 +1,16 @@ +import Image from "next/image"; + +export default function TopMobile({ info }) { + return ( +
+ cover image +
+
+ ); +} diff --git a/components/manga/info/topSection.js b/components/manga/info/topSection.js new file mode 100644 index 0000000..14dc5e5 --- /dev/null +++ b/components/manga/info/topSection.js @@ -0,0 +1,106 @@ +import Image from "next/image"; +import { BookOpenIcon } from "@heroicons/react/24/outline"; +import AniList from "../../media/aniList"; +import Link from "next/link"; +import TopMobile from "./mobile/topMobile"; +import MobileButton from "./mobile/mobileButton"; + +export default function TopSection({ info, firstEp, setCookie }) { + const slicedGenre = info.genres?.slice(0, 3); + + function saveManga() { + localStorage.setItem( + "manga", + JSON.stringify({ manga: firstEp, data: info }) + ); + + setCookie(null, "manga", info.id, { + maxAge: 24 * 60 * 60, + path: "/", + }); + } + + return ( +
+ +
+ cover image + +
+ + +
+ +
+ +
+
+
+
+

+ {info.title?.romaji || info.title?.english || info.title?.native} +

+ + {slicedGenre && + slicedGenre.map((genre, index) => { + return ( +
+ {genre} + {index < slicedGenre?.length - 1 && ( + + )} +
+ ); + })} +
+
+ + + +
+ {/* Description */} +
+

+

+
+
+
+
+ ); +} -- cgit v1.2.3