diff options
| author | real-zephex <[email protected]> | 2024-04-08 01:51:13 +0530 |
|---|---|---|
| committer | real-zephex <[email protected]> | 2024-04-08 01:51:13 +0530 |
| commit | 498121d145844cd8ff28279a49c43dfbfb080299 (patch) | |
| tree | 49c12a98752d7f9fe531e26c0a2bfe1070c4b412 /src/app | |
| parent | minor fix (diff) | |
| download | dramalama-498121d145844cd8ff28279a49c43dfbfb080299.tar.xz dramalama-498121d145844cd8ff28279a49c43dfbfb080299.zip | |
small chanegs here and there, manga and anime pages are currently broken. changed the image proxy to cloudflare workers.
Diffstat (limited to 'src/app')
| -rw-r--r-- | src/app/kdrama/components/search.jsx | 2 | ||||
| -rw-r--r-- | src/app/layout.jsx | 2 | ||||
| -rw-r--r-- | src/app/manga/[title]/[id]/[read]/download.jsx | 2 | ||||
| -rw-r--r-- | src/app/manga/[title]/[id]/[read]/page.jsx | 14 | ||||
| -rw-r--r-- | src/app/manga/[title]/[id]/page.jsx | 6 | ||||
| -rw-r--r-- | src/app/manga/[title]/page.jsx | 4 | ||||
| -rw-r--r-- | src/app/manga/loading.jsx | 6 | ||||
| -rw-r--r-- | src/app/manga/loading.module.css | 21 | ||||
| -rw-r--r-- | src/app/manga/manga.module.css | 104 | ||||
| -rw-r--r-- | src/app/manga/page.jsx | 53 | ||||
| -rw-r--r-- | src/app/page.jsx | 42 | ||||
| -rw-r--r-- | src/app/page.module.css | 51 |
12 files changed, 121 insertions, 186 deletions
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() { } }} ></input> - </div> + </div> {loadingText && ( <p className={styles.LoadingText}>Wait a moment...</p> 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 }) { <body className={inter.className}> <SpeedInsights /> <Analytics /> - <Header /> + {/* <Header /> */} {children} </body> </html> 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" }} > - <button title="This functionality currently exhibits stability with lower-quality PDFs; however, users may encounter challenges when attempting to download higher-quality PDFs."> + <button disabled title="Not available right now."> Download - Beta </button> </a> 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 ( <div className={styles.NotFound}> <p> @@ -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"]} </p> <Image - src={data.image} + src={`https://sup-proxy.zephex0-f6c.workers.dev/api-content?url=${data.image}`} width={200} height={310} alt="Manga Poster" @@ -94,7 +94,7 @@ export default async function MangaInfo({ params }) { className={styles.CharacterEntry} > <Image - src={item.image} + src={`https://sup-proxy.zephex0-f6c.workers.dev/api-content?url=${item.image}`} width={140} height={200} alt="Character Poster" diff --git a/src/app/manga/[title]/page.jsx b/src/app/manga/[title]/page.jsx index e586d09..2db1634 100644 --- a/src/app/manga/[title]/page.jsx +++ b/src/app/manga/[title]/page.jsx @@ -2,7 +2,7 @@ import styles from "./title.module.css"; import Image from "next/image"; import Link from "next/link"; -export const runtime = 'edge'; +export const runtime = "edge"; export default async function MangaInfo({ params }) { const title = params.title; @@ -30,7 +30,7 @@ export default async function MangaInfo({ params }) { > <div className={styles.MangaEntries}> <Image - src={item.image} + src={`https://sup-proxy.zephex0-f6c.workers.dev/api-content?url=${item.image}`} width={160} height={250} alt="Manga Poster" diff --git a/src/app/manga/loading.jsx b/src/app/manga/loading.jsx index 74b0e05..8f7f837 100644 --- a/src/app/manga/loading.jsx +++ b/src/app/manga/loading.jsx @@ -1,9 +1,9 @@ -import styles from "./manga.module.css"; +import styles from "./loading.module.css"; export default function Loading() { return ( - <div className={styles.LoadingContainer}> - <p>Please wait while we are loading your content....</p> + <div className={styles.Main}> + <div className={styles.LoadingContainer}></div> </div> ); } 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 ( <div className={styles.Main}> - <div className={styles.Hero}> - <div className={styles.WelcomeContainer}> - <div className={styles.WelcomeText}> - Manga madness is here - </div> - <SearchBar /> - </div> - <div className={styles.ImageContainer}> - <div className={styles.HorizontalImageContainer}> - <Image - src="/image.png" - width={487} - height={260} - alt="Haikyu" - /> - </div> - <div className={styles.VerticalImageContainer}> - <Image - src="/image.webp" - width={240} - height={360} - alt="Haikyu" - /> - <Image - src="/solo_poster.png" - width={240} - height={360} - alt="Haikyu" - /> - </div> - </div> - </div> - - <div className={styles.SelfPromoContainer}> - <p - style={{ - textAlign: "center", - fontSize: 32, - color: "var(--soft-purple)", - fontFamily: "Poppins", - }} - > - Welcome to Dramalama Manga - </p> - <p style={{ marginTop: -10 }}> - 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. - </p> - </div> + <Image src="/manga.svg" width={480} height={240} className={styles.MangaSVG} /> + <SearchBar /> </div> ); } 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 ( <main className={styles.main}> - <div className={styles.welcomeContainer}> + <Link href="https://github.com/real-zephex/Dramalama"> <Image - src="/logo.png" - width={300} - height={300} - alt="Logo" - priority - ></Image> - <p> - Hey there, welcome to Dramalama. We are excited to have you - on board. - </p> + src={"/dramalama.svg"} + width={480} + height={240} + className={styles.HomeSVG} + /> + </Link> + <div className={styles.redirects}> + <Link href="/kdrama"> + <p>kdrama </p> + </Link> + <p style={{ color: "white" }}>|</p> + <Link href="/"> + <p> + anime + <span style={{ color: "var(--pastel-red)" }}> + (depr) + </span> + </p> + </Link> + <p style={{ color: "white" }}>|</p> + <Link href="/"> + <p> + manga + <span style={{ color: "var(--pastel-red)" }}> + (down) + </span> + </p> + </Link> </div> - <Footer /> </main> ); } 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 |