From 498121d145844cd8ff28279a49c43dfbfb080299 Mon Sep 17 00:00:00 2001 From: real-zephex Date: Mon, 8 Apr 2024 01:51:13 +0530 Subject: small chanegs here and there, manga and anime pages are currently broken. changed the image proxy to cloudflare workers. --- src/app/kdrama/components/search.jsx | 2 +- src/app/layout.jsx | 2 +- src/app/manga/[title]/[id]/[read]/download.jsx | 2 +- src/app/manga/[title]/[id]/[read]/page.jsx | 14 ++-- src/app/manga/[title]/[id]/page.jsx | 6 +- src/app/manga/[title]/page.jsx | 4 +- src/app/manga/loading.jsx | 6 +- src/app/manga/loading.module.css | 21 +++++ src/app/manga/manga.module.css | 104 ++----------------------- src/app/manga/page.jsx | 53 +------------ src/app/page.jsx | 42 +++++++--- src/app/page.module.css | 51 ++++++++++-- 12 files changed, 121 insertions(+), 186 deletions(-) create mode 100644 src/app/manga/loading.module.css (limited to 'src') diff --git a/src/app/kdrama/components/search.jsx b/src/app/kdrama/components/search.jsx index f9ba174..5444c89 100644 --- a/src/app/kdrama/components/search.jsx +++ b/src/app/kdrama/components/search.jsx @@ -32,7 +32,7 @@ export default function DramaSearch() { } }} > - + {loadingText && (

Wait a moment...

diff --git a/src/app/layout.jsx b/src/app/layout.jsx index 1b8875d..ac16247 100644 --- a/src/app/layout.jsx +++ b/src/app/layout.jsx @@ -19,7 +19,7 @@ export default function RootLayout({ children }) { -
+ {/*
*/} {children} diff --git a/src/app/manga/[title]/[id]/[read]/download.jsx b/src/app/manga/[title]/[id]/[read]/download.jsx index 5ad71a5..b8af783 100644 --- a/src/app/manga/[title]/[id]/[read]/download.jsx +++ b/src/app/manga/[title]/[id]/[read]/download.jsx @@ -8,7 +8,7 @@ export default function DownloadManga({ chapterId: id }) { href={`https://manga-downloader-7nca.onrender.com/download?id=${id}`} style={{ textDecoration: "none" }} > - diff --git a/src/app/manga/[title]/[id]/[read]/page.jsx b/src/app/manga/[title]/[id]/[read]/page.jsx index fa338ac..faa5999 100644 --- a/src/app/manga/[title]/[id]/[read]/page.jsx +++ b/src/app/manga/[title]/[id]/[read]/page.jsx @@ -7,8 +7,10 @@ export const runtime = "edge"; export default async function Read({ params }) { const chapterId = params.read; - const data = await getPages(chapterId); - if (data.length === 0) { + const results = await getPages(chapterId); + const image_base_url = results.baseUrl + "/data/" + results.chapter.hash; + + if (results.length === 0) { return (

@@ -19,8 +21,8 @@ export default async function Read({ params }) { } let images = []; - for (var i = 0; i < data.length; i++) { - var imgUrl = data[i].img; + for (var i = 0; i < results.chapter.data.length; i++) { + var imgUrl = image_base_url + "/" + results.chapter.data[i]; images.push(imgUrl); } @@ -52,9 +54,7 @@ export default async function Read({ params }) { } async function getPages(id) { - const res = await fetch( - `https://consumet-api-di2e.onrender.com/meta/anilist-manga/read?chapterId=${id}&provider=mangadex` - ); + const res = await fetch(`https://api.mangadex.org/at-home/server/${id}`); const data = await res.json(); return data; } diff --git a/src/app/manga/[title]/[id]/page.jsx b/src/app/manga/[title]/[id]/page.jsx index 2d50252..70c4f84 100644 --- a/src/app/manga/[title]/[id]/page.jsx +++ b/src/app/manga/[title]/[id]/page.jsx @@ -5,7 +5,7 @@ import { redirect } from "next/navigation"; import { FaStar } from "react-icons/fa"; import CurrentReading from "./[read]/currentReading"; -export const runtime = 'edge'; +export const runtime = "edge"; export default async function MangaInfo({ params }) { const id = params.id; @@ -39,7 +39,7 @@ export default async function MangaInfo({ params }) { {data.title["romaji"]}

Manga Poster Character Poster
Manga Poster -

Please wait while we are loading your content....

+
+
); } diff --git a/src/app/manga/loading.module.css b/src/app/manga/loading.module.css new file mode 100644 index 0000000..557f50a --- /dev/null +++ b/src/app/manga/loading.module.css @@ -0,0 +1,21 @@ +.Main { + height: 100dvh; + display: flex; + justify-content: center; + align-items: center; +} + +.LoadingContainer { + width: 50px; + height: 50px; + border-radius: 50%; + border: 8px solid; + border-color: #F4F4F4 #0000; + animation: s1 1s infinite; +} + +@keyframes s1 { + to { + transform: rotate(.5turn) + } +} \ No newline at end of file diff --git a/src/app/manga/manga.module.css b/src/app/manga/manga.module.css index 6091f6d..dab15a3 100644 --- a/src/app/manga/manga.module.css +++ b/src/app/manga/manga.module.css @@ -1,65 +1,20 @@ .Main { - max-width: 95%; - margin: 10px auto; -} - -.Hero { - display: flex; - align-items: center; - justify-content: space-between; -} - -.ImageContainer { display: flex; flex-direction: column; - max-width: auto; -} - -.ImageContainer img { - margin: 0px 4px 4px 4px; - border-radius: 8px; -} - -.WelcomeContainer button { - font-family: "Inter"; - font-size: 16px; - margin-top: 8px; - padding: 6px; - border-radius: 5px; - border: none; - outline: none; - background-color: var(--neon-green); - cursor: pointer; -} - -.WelcomeText { - font-family: "Poppins"; - color: white; - font-size: 48px; - text-shadow: rgb(0, 183, 255) 2px 2px 50px; - margin-right: 10px; -} - -.SelfPromoContainer { - display: flex; + align-items: center; justify-content: center; - flex-direction: column; - color: white; -} - -.SelfPromoContainer p { - font-family: "Atkinson Hyperlegible"; - color: white; - text-align: center; + height: 100dvh; } .SearchBar { display: flex; align-items: center; - border-radius: 4px; + border-radius: 10px; background: #1f1f1f; - margin-top: 5px; - width: 55%; + margin-top: -10px; + border-style: dotted; + border-color: rgb(63, 63, 63); + border-width: 2px; } .SearchBar input { @@ -72,49 +27,4 @@ color: white; font-family: "Kanit"; font-size: 16px; -} - -.LoadingContainer { - display: flex; - justify-content: center; - align-items: center; - height: 90dvh; - color: white; - font-family: "Kanit"; - font-size: 18px; -} - -@media screen and (max-width: 768px) { - - .Hero { - flex-direction: column; - } - - .WelcomeContainer { - display: flex; - align-items: center; - flex-direction: column; - justify-content: center; - margin-bottom: 10px; - } - - .WelcomeText { - font-size: 30px; - } - - .HorizontalImageContainer img { - width: 100%; - border-radius: 5px; - height: auto; - margin: 10px auto; - } - - .VerticalImageContainer img { - display: none; - } - - .SearchBar { - width: 80%; - margin: 0px auto; - } } \ No newline at end of file diff --git a/src/app/manga/page.jsx b/src/app/manga/page.jsx index e6ad898..3757f90 100644 --- a/src/app/manga/page.jsx +++ b/src/app/manga/page.jsx @@ -5,57 +5,8 @@ import SearchBar from "./searchBar"; export default async function Manga() { return (
-
-
-
- Manga madness is here -
- -
-
-
- Haikyu -
-
- Haikyu - Haikyu -
-
-
- -
-

- Welcome to Dramalama Manga -

-

- Dive into a world where action jumps off the page and - pictures paint a thousand words. Dramalama Manga is a site - that will immerse you in stunning illustrations and compel - you to lose yourself in thrilling narratives. -

-
+ +
); } diff --git a/src/app/page.jsx b/src/app/page.jsx index 109264d..231b93d 100644 --- a/src/app/page.jsx +++ b/src/app/page.jsx @@ -1,24 +1,42 @@ import Image from "next/image"; import styles from "./page.module.css"; +import Link from "next/link"; import Footer from "./components/footer/page"; export default function Home() { return (
-
+ Logo -

- Hey there, welcome to Dramalama. We are excited to have you - on board. -

+ src={"/dramalama.svg"} + width={480} + height={240} + className={styles.HomeSVG} + /> + +
+ +

kdrama

+ +

|

+ +

+ anime + + (depr) + +

+ +

|

+ +

+ manga + + (down) + +

+
-
); } diff --git a/src/app/page.module.css b/src/app/page.module.css index 1d3be60..dcbc36b 100644 --- a/src/app/page.module.css +++ b/src/app/page.module.css @@ -1,16 +1,51 @@ -.welcomeContainer { +.main { + max-width: 90%; + margin: 0px auto; display: flex; + height: 100dvh; flex-direction: column; + align-items: center; justify-content: center; +} + +.redirects { + display: flex; align-items: center; - height: 85dvh; - max-width: 500px; - margin: 0px auto; - text-align: center; + margin-top: -10px; +} + +.HomeSVG { + transition: transform 0.2s linear; } -.welcomeContainer p { - font-family: "Quicksand"; - font-size: 20px; +.HomeSVG:hover { + transition: transform 0.2s linear; + transform: translate(2px, -8px); +} + +.redirects a { color: white; + text-decoration: none; + margin-right: 10px; + margin-left: 10px; + color: var(--light-green); +} + +@media screen and (max-width: 768px) { + .HomeSVG { + width: 400px; + margin-bottom: -20px; + } +} + +@media screen and (max-width: 425px) { + .HomeSVG { + width: 350px; + } +} + +@media screen and (max-width: 375px) { + .HomeSVG { + width: 300px; + } } \ No newline at end of file -- cgit v1.2.3