aboutsummaryrefslogtreecommitdiff
path: root/src/app/anime
diff options
context:
space:
mode:
authorreal-zephex <[email protected]>2024-03-31 17:32:48 +0530
committerreal-zephex <[email protected]>2024-03-31 17:32:48 +0530
commitd23e1274303c54b3d7fc8de77eea37bb8fdaeaa3 (patch)
treef91c136407e3a41d115750e9ae895727c5ddf9cc /src/app/anime
parentfix: looks like image proxy is must for viewing manga pages. we will have to... (diff)
downloaddramalama-d23e1274303c54b3d7fc8de77eea37bb8fdaeaa3.tar.xz
dramalama-d23e1274303c54b3d7fc8de77eea37bb8fdaeaa3.zip
fixes: minor css modifications, added basic information about the last read manga chapter (don't expect much out of it)
Diffstat (limited to 'src/app/anime')
-rw-r--r--src/app/anime/[id]/[animeId]/page.jsx2
-rw-r--r--src/app/anime/[id]/page.jsx2
-rw-r--r--src/app/anime/page.jsx1
-rw-r--r--src/app/anime/recent/page.jsx19
-rw-r--r--src/app/anime/recent/recent.css56
-rw-r--r--src/app/anime/recent/recent.module.css39
-rw-r--r--src/app/anime/top-airing/page.jsx14
-rw-r--r--src/app/anime/top-airing/trending.module.css39
8 files changed, 97 insertions, 75 deletions
diff --git a/src/app/anime/[id]/[animeId]/page.jsx b/src/app/anime/[id]/[animeId]/page.jsx
index d59b0a0..1614775 100644
--- a/src/app/anime/[id]/[animeId]/page.jsx
+++ b/src/app/anime/[id]/[animeId]/page.jsx
@@ -49,7 +49,7 @@ export default async function Video({ params }) {
async function getVideoLink(id) {
const res = await fetch(
"https://consumet-api-di2e.onrender.com/anime/gogoanime/watch/" + id,
- { next: { revalidate: 3600 } } // Video links are revalidated after an hour
+ { next: { revalidate: 7200 } } // Video links are revalidated after an hour
);
const data = res.json();
return data;
diff --git a/src/app/anime/[id]/page.jsx b/src/app/anime/[id]/page.jsx
index dd9e4cc..6c81ede 100644
--- a/src/app/anime/[id]/page.jsx
+++ b/src/app/anime/[id]/page.jsx
@@ -63,7 +63,7 @@ export default async function AnimeInfo({ params }) {
async function getAnimeInfo(anime_id) {
const res = await fetch(
"https://anime-sensei-api.vercel.app/anime/gogoanime/info/" + anime_id,
- { next: { revalidate: 1800 } }
+ { next: { revalidate: 7200 } }
);
const data = res.json();
return data;
diff --git a/src/app/anime/page.jsx b/src/app/anime/page.jsx
index 625dd83..0b903e2 100644
--- a/src/app/anime/page.jsx
+++ b/src/app/anime/page.jsx
@@ -8,6 +8,7 @@ export default async function Anime() {
<div>
<Input />
<Trending />
+ <br />
<Releases />
</div>
);
diff --git a/src/app/anime/recent/page.jsx b/src/app/anime/recent/page.jsx
index ddfbc3f..9094ead 100644
--- a/src/app/anime/recent/page.jsx
+++ b/src/app/anime/recent/page.jsx
@@ -1,11 +1,10 @@
-import "./recent.css";
import Image from "next/image";
import Link from "next/link";
import styles from "./recent.module.css";
import { MdRecentActors } from "react-icons/md";
export default async function Releases() {
- const data = await test();
+ const data = await fetchRecentEpisodes();
return (
<div className="trendingContainer">
@@ -16,20 +15,20 @@ export default async function Releases() {
</span>
</div>
- <div className="trending">
+ <div className={styles.Recent}>
{data &&
data.results.map((item, index) => (
<Link
key={index}
href={`/anime/${item.id}`}
- style={{ textDecoration: "none" }}
+ style={{ textDecoration: "none", color: "white" }}
>
- <div className="trendingEntries">
+ <div className={styles.RecentEntries}>
<Image
src={item.image}
- className="{trendingImage}"
- width={160}
- height={220}
+ className={styles.RecentImage}
+ width={180}
+ height={260}
alt="Drama"
priority
/>
@@ -42,10 +41,10 @@ export default async function Releases() {
);
}
-async function test() {
+async function fetchRecentEpisodes() {
const res = await fetch(
"https://consumet-api-di2e.onrender.com/anime/gogoanime/recent-episodes",
- { cache: "force-cache" }
+ { next: { revalidate: 86400 } }
);
const data = res.json();
return data;
diff --git a/src/app/anime/recent/recent.css b/src/app/anime/recent/recent.css
deleted file mode 100644
index da0598d..0000000
--- a/src/app/anime/recent/recent.css
+++ /dev/null
@@ -1,56 +0,0 @@
-.trendingContainer {
- display: flex;
- flex-direction: column;
-}
-
-.trendingText {
- color: #FEFFAC;
- font-family: "Open Sans";
- font-size: 26px;
- margin: 10px;
-}
-
-.trending {
- width: 98%;
- display: flex;
- flex-direction: row;
- overflow-x: auto;
- margin: 0px auto;
-}
-
-/* Customize scrollbar here */
-.trending::-webkit-scrollbar {
- height: 5px;
-}
-
-.trendingEntries {
- margin: 10px 10px 5px 5px;
- text-align: center;
- cursor: pointer;
- transition: transform 0.2s ease;
-
-}
-
-.trendingEntries:hover {
- transform: scale(1.03);
-}
-
-.trendingEntries img {
- border-radius: 10px;
- width: 150px;
- height: 210px;
-}
-
-.trendingEntries p {
- color: white;
- max-height: 60px;
- max-width: 150px;
- overflow-y: auto;
- font-family: "Lato";
- margin: 10px auto;
- font-size: 16px;
-}
-
-.trendingEntries p::-webkit-scrollbar {
- width: 5px;
-} \ No newline at end of file
diff --git a/src/app/anime/recent/recent.module.css b/src/app/anime/recent/recent.module.css
index 5756ccb..7805d52 100644
--- a/src/app/anime/recent/recent.module.css
+++ b/src/app/anime/recent/recent.module.css
@@ -12,4 +12,43 @@
.RecentText span {
margin-top: 6px;
+}
+
+.Recent {
+ display: flex;
+ overflow-x: auto;
+}
+
+.Recent::-webkit-scrollbar {
+ height: 5px;
+}
+
+.Recent::-webkit-scrollbar-thumb {
+ background-color: #444444;
+ border-radius: 5px;
+}
+
+.RecentEntries {
+ margin: 7px;
+}
+
+.RecentEntries p {
+ text-align: center;
+ margin: 5px auto;
+ max-height: 70px;
+ overflow-y: auto;
+}
+
+.RecentEntries p::-webkit-scrollbar {
+ width: 5px;
+}
+
+.Recent p::-webkit-scrollbar-thumb {
+ background-color: #444444;
+ border-radius: 5px;
+}
+
+.RecentImage {
+ border-radius: 5px;
+ aspect-ratio: auto;
} \ No newline at end of file
diff --git a/src/app/anime/top-airing/page.jsx b/src/app/anime/top-airing/page.jsx
index 3d26d88..297fc45 100644
--- a/src/app/anime/top-airing/page.jsx
+++ b/src/app/anime/top-airing/page.jsx
@@ -15,20 +15,20 @@ export default async function Trending() {
</span>
</div>
- <div className="trending">
+ <div className={styles.trending}>
{data &&
data.results.map((item, index) => (
<Link
key={index}
href={`/anime/${item.id}`}
- style={{ textDecoration: "none" }}
+ style={{ textDecoration: "none", color: "white" }}
>
- <div className="trendingEntries">
+ <div className={styles.trendingEntries}>
<Image
src={item.image}
- className="{trendingImage}"
- width={160}
- height={220}
+ className={styles.trendingImage}
+ width={180}
+ height={260}
alt="Drama"
priority
/>
@@ -44,7 +44,7 @@ export default async function Trending() {
async function test() {
const res = await fetch(
"https://consumet-api-di2e.onrender.com/anime/gogoanime/top-airing",
- { cache: "force-cache" }
+ { next: { revalidate: 86400 } }
);
const data = res.json();
return data;
diff --git a/src/app/anime/top-airing/trending.module.css b/src/app/anime/top-airing/trending.module.css
index d03bab3..bffd7ef 100644
--- a/src/app/anime/top-airing/trending.module.css
+++ b/src/app/anime/top-airing/trending.module.css
@@ -12,4 +12,43 @@
.TrendingText span {
margin-top: 6px;
+}
+
+.trending {
+ display: flex;
+ overflow-x: auto;
+}
+
+.trending::-webkit-scrollbar {
+ height: 5px;
+}
+
+.trending::-webkit-scrollbar-thumb {
+ background-color: #444444;
+ border-radius: 5px;
+}
+
+.trendingEntries {
+ margin: 7px;
+}
+
+.trendingEntries p {
+ text-align: center;
+ margin: 5px auto;
+ max-height: 70px;
+ overflow-y: auto;
+}
+
+.trendingEntries p::-webkit-scrollbar {
+ width: 5px;
+}
+
+.trendingEntries p::-webkit-scrollbar-thumb {
+ background-color: #444444;
+ border-radius: 5px;
+}
+
+.trendingImage {
+ border-radius: 5px;
+ aspect-ratio: auto;
} \ No newline at end of file