reza fixed one bug

temp
Reza_ashrafi 3 years ago
parent 25d6080fd7
commit 4b9baecab0
  1. 15
      src/views/Home/Page2/index.js
  2. 2
      src/views/Home/VideoTube/LessonPlayList/index.js
  3. 7
      src/views/Home/VideoTube/index.js
  4. 2
      src/views/Home/index.js

@ -25,7 +25,9 @@ export default function Page2({ list, page }) {
) )
); );
setVideoPosition( setVideoPosition(
scroll.doubleLinearFormula(window.scrollY) window.scrollY > 3 * height
? scroll.doubleLinearFormula(window.scrollY)
: null
); );
if (window.scrollY < 2.5 * height) { if (window.scrollY < 2.5 * height) {
setBoxPosition({ setBoxPosition({
@ -144,14 +146,13 @@ export default function Page2({ list, page }) {
}; };
const videoPositionHandler = (scrollY) => { const videoPositionHandler = (scrollY) => {
if(scrollY <= 3 * height){ if (scrollY <= 3 * height) {
setVideoPosition(() => null); setVideoPosition(() => null);
}else if(scrollY > 3 * height && scrollY < 4 * height){ } else if (scrollY > 3 * height && scrollY < 4 * height) {
setVideoPosition(scroll.doubleLinearFormula(scrollY)); setVideoPosition(scroll.doubleLinearFormula(scrollY));
}else{ } else {
} }
} };
return ( return (
<div <div
className={_.join( className={_.join(
@ -190,7 +191,7 @@ export default function Page2({ list, page }) {
style={{ style={{
height: (window.innerHeight * 9) / 25, height: (window.innerHeight * 9) / 25,
width: (window.innerHeight * 10) / 20 - 16, width: (window.innerHeight * 10) / 20 - 16,
bottom: (window.innerHeight * 9) / 30 bottom: (window.innerHeight * 9) / 30,
}} }}
></div> ></div>
</div> </div>

@ -35,7 +35,7 @@ function LessonPlayList({
return ( return (
<> <>
{ {
<div className={_.join(["w-full mb-2.5 flex flex-col"], " ")}> <div className={_.join(["w-full mb-2.5 flex flex-col border"], " ")}>
{bookId && ( {bookId && (
<header className="mb-1"> <header className="mb-1">
<h3 className="py-1 px-2.5 m-0"> <h3 className="py-1 px-2.5 m-0">

@ -53,7 +53,7 @@ function VodTube({
<div <div
className={_.join( className={_.join(
[ [
"fixed flex flex-row rtl pt-20 lg:px-5 xl:px-10 w-full bg-white transition-opacity duration-500", "fixed flex flex-row rtl pt-20 lg:px-5 xl:px-10 w-full bg-white dark:bg-black bg-opacity-80 transition-opacity duration-500 min-h-screen backdrop-filter backdrop-blur-md",
top > 0 ? "opacity-0" : "opacity-100", top > 0 ? "opacity-0" : "opacity-100",
], ],
" " " "
@ -104,6 +104,7 @@ function VodTube({
ref={videoListTag} ref={videoListTag}
className="pt-2.5 overflow-y-scroll flex flex-col" className="pt-2.5 overflow-y-scroll flex flex-col"
id="list" id="list"
style={{ minHeight: window.innerHeight / 1.5, maxHeight: window.innerHeight / 1.5}}
> >
{localStorage.getItem("bookId") {localStorage.getItem("bookId")
? categories?.map((video, i) => ( ? categories?.map((video, i) => (
@ -143,7 +144,7 @@ function VodTube({
</section> </section>
)} )}
<section className="mobile video-tube__content--comments flex-col"> {/* <section className="mobile video-tube__content--comments flex-col">
<header className="flex justify-between align-items-center"> <header className="flex justify-between align-items-center">
<h2>نظرات</h2> <h2>نظرات</h2>
<button>بستن نظرات</button> <button>بستن نظرات</button>
@ -153,7 +154,7 @@ function VodTube({
<Comment comment={comment} key={i} /> <Comment comment={comment} key={i} />
))} ))}
</div> </div>
</section> </section> */}
</div> </div>
{/* <section className="mobile video-tube__content--addComment"> {/* <section className="mobile video-tube__content--addComment">
<AddComment /> <AddComment />

@ -14,7 +14,7 @@ export default function Home() {
className="flex flex-col bg-white relative w-full rtl" className="flex flex-col bg-white relative w-full rtl"
style={{ height: "700vh"}} style={{ height: "700vh"}}
> >
<Dots page={1} /> {/* <Dots page={1} /> */}
<Navbar /> <Navbar />
<Page1 page={1} /> <Page1 page={1} />
<Page2 page={2} /> <Page2 page={2} />

Loading…
Cancel
Save