diff options
| author | real-zephex <[email protected]> | 2024-05-11 02:01:28 +0530 |
|---|---|---|
| committer | real-zephex <[email protected]> | 2024-05-11 02:01:28 +0530 |
| commit | 6c56263791c80676518532c9f91e0fb3d84fd079 (patch) | |
| tree | c98cbda079781cba1f590a2be7bf2ab1d972fc58 | |
| parent | adjustments to the cache system (diff) | |
| download | dramalama-6c56263791c80676518532c9f91e0fb3d84fd079.tar.xz dramalama-6c56263791c80676518532c9f91e0fb3d84fd079.zip | |
adjustments to the cache system
| -rw-r--r-- | src/app/anime/[id]/page.jsx | 3 | ||||
| -rw-r--r-- | src/app/anime/components/episode_buttons.jsx | 11 | ||||
| -rw-r--r-- | src/app/anime/styles/buttons.module.css | 11 | ||||
| -rw-r--r-- | src/app/anime/styles/pop_recent_top.module.css | 6 |
4 files changed, 25 insertions, 6 deletions
diff --git a/src/app/anime/[id]/page.jsx b/src/app/anime/[id]/page.jsx index 0b85e8e..edd100a 100644 --- a/src/app/anime/[id]/page.jsx +++ b/src/app/anime/[id]/page.jsx @@ -10,7 +10,8 @@ const AnimeInfoHomepage = async ({ params }) => { const id = params.id;
const data = await anime_info(id);
- preFetchVideoLinks(data.episodes.slice(0, 49));
+ const sliceLength = Math.min(data.episodes.length, 49);
+ preFetchVideoLinks(data.episodes.slice(0, sliceLength));
return (
<main className={styles.main}>
diff --git a/src/app/anime/components/episode_buttons.jsx b/src/app/anime/components/episode_buttons.jsx index 3336470..9d6e1ca 100644 --- a/src/app/anime/components/episode_buttons.jsx +++ b/src/app/anime/components/episode_buttons.jsx @@ -31,6 +31,16 @@ const EpisodesButtons = ({ data: data }) => { } function createButtonGroups(start, end) { + try { + document.getElementById("episode-button").style.backgroundColor = + "#1f1f1fd2"; + } catch (error) { + console.error( + "ERROR: This error is expected. This is done in order to reset the background color of the buttons. I can't think of a better way than this....so yeah.", + error.message + ); + } + return ( <div className={styles.animeButtonContainer}> {data.episodes && @@ -38,6 +48,7 @@ const EpisodesButtons = ({ data: data }) => { <button className={styles.dramaButton} key={index} + id="episode-button" onClick={(event) => { event.target.style.backgroundColor = "var(--soft-purple)"; diff --git a/src/app/anime/styles/buttons.module.css b/src/app/anime/styles/buttons.module.css index d092a7f..d0b8e78 100644 --- a/src/app/anime/styles/buttons.module.css +++ b/src/app/anime/styles/buttons.module.css @@ -84,4 +84,15 @@ .VideoPlayer { width: 100%; +} + +@media screen and (max-width: 1024px) { + + .dramaButton { + font-size: 14px; + } + + .video { + width: 100%; + } }
\ No newline at end of file diff --git a/src/app/anime/styles/pop_recent_top.module.css b/src/app/anime/styles/pop_recent_top.module.css index 0bfe682..0feda13 100644 --- a/src/app/anime/styles/pop_recent_top.module.css +++ b/src/app/anime/styles/pop_recent_top.module.css @@ -39,11 +39,7 @@ padding-top: 0.2rem; } .AnimeContainer::-webkit-scrollbar { - height: 0.2rem; -} - -.AnimeContainer::-webkit-scrollbar-track { - background-color: var(--soft-purple); + height: 0.3rem; } .AnimeContainer::-webkit-scrollbar-thumb { |