From 482185a71909123a0152d358c8fb90d427cc1c54 Mon Sep 17 00:00:00 2001 From: real-zephex Date: Sat, 11 May 2024 19:34:42 +0530 Subject: adjustments to the search bar on the anime page --- src/app/anime/components/search.jsx | 2 +- src/app/anime/styles/search.module.css | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/app/anime/components/search.jsx b/src/app/anime/components/search.jsx index f916217..b8b4b53 100644 --- a/src/app/anime/components/search.jsx +++ b/src/app/anime/components/search.jsx @@ -41,7 +41,7 @@ const SearcBar = () => { }} > - + diff --git a/src/app/anime/styles/search.module.css b/src/app/anime/styles/search.module.css index d3564f7..b7e35ab 100644 --- a/src/app/anime/styles/search.module.css +++ b/src/app/anime/styles/search.module.css @@ -2,6 +2,7 @@ padding: 1rem 0 0.8rem 0; display: flex; align-items: center; + width: 100%; } .SearchInputContainer { @@ -19,9 +20,10 @@ border: none; background-color: #121212; color: white; - margin: 0 0 0 0.4rem; + margin: 0 0.1rem 0 0.2rem; padding: 0.5rem; cursor: pointer; + border-radius: 0.5rem; } .SearchInputContainer input { @@ -74,7 +76,7 @@ } @media screen and (max-width: 768px) { - .SearchBarContainer { + .SearchInputContainer { width: 100%; } -- cgit v1.2.3 From 9f40285893d1a765787d99721c44061bd50be6a8 Mon Sep 17 00:00:00 2001 From: real-zephex Date: Sat, 11 May 2024 19:34:45 +0530 Subject: adjustments to the search bar on the anime page --- src/app/anime/continueWatching/page.jsx | 65 +++++++++++++++++++++++++++++++++ src/app/anime/styles/cw.module.css | 59 ++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 src/app/anime/continueWatching/page.jsx create mode 100644 src/app/anime/styles/cw.module.css (limited to 'src') diff --git a/src/app/anime/continueWatching/page.jsx b/src/app/anime/continueWatching/page.jsx new file mode 100644 index 0000000..eb28a2f --- /dev/null +++ b/src/app/anime/continueWatching/page.jsx @@ -0,0 +1,65 @@ +"use client"; + +import React, { useState, useEffect } from "react"; +import Image from "next/image"; +import styles from "../styles/cw.module.css"; +import Link from "next/link"; + +const ContinueWatching = () => { + const [localItems, setLocalItems] = useState(null); + + useEffect(() => { + const newData = get_local(); + setLocalItems(newData); + }, []); // Empty dependency array means this effect runs only once after the initial render + + function get_local() { + try { + const data = localStorage.getItem("data"); + return JSON.parse(data); + } catch (error) { + console.log("error", error); + return false; + } + } + + return ( +
+

Continue Watching

+ {localItems && ( +
+ {localItems.watchHis && + localItems.watchHis.map((item, index) => ( + +
+
+

{item.name}

+

+ Episode watching: {item.episode} +

+

+ Last watched on: {item.date} at{" "} + {item.time} hours +

+
+ Continue anime poster +
+ + ))} +
+ )} +
+ ); +}; + +export default ContinueWatching; diff --git a/src/app/anime/styles/cw.module.css b/src/app/anime/styles/cw.module.css new file mode 100644 index 0000000..cb579c7 --- /dev/null +++ b/src/app/anime/styles/cw.module.css @@ -0,0 +1,59 @@ +.main { + width: 99%; + margin: 60px auto; +} + +.mainText { + color: white; + font-size: 24px; + margin: 0.2rem 0 0.2rem 0; +} + +.animeContainer { + font-size: 18px; + margin: 0px; +} + +.animeEntry { + display: flex; + align-items: center; + justify-content: space-between; + padding: 5px; + margin-bottom: 0.5rem; + border-radius: 0.4rem; + background-color: #1f1f1f; +} + +.animeEntry img { + border-radius: 0.4rem; + margin-left: 0.2rem; +} + +.titleContainer { + color: white; + margin-left: 0.2rem; +} + +.titleContainer h3 { + margin: 0px; +} + +.EpisodeCount { + color: var(--soft-purple); + margin: 0px; +} + +.date { + color: var(--neon-yellow); + margin: 0px; +} + +@media screen and (max-width: 768px) { + .animeContainer { + font-size: 14px; + } + + .animeEntry img { + width: 35%; + } +} \ No newline at end of file -- cgit v1.2.3