diff --git a/package.json b/package.json
index acf7987..da75ee8 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
"mapir-react-component": "^2.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
+ "react-indiana-drag-scroll": "^2.1.0",
"react-modern-drawer": "^1.0.1",
"react-qr-reader": "^2.2.1",
"react-redux": "^7.2.6",
@@ -23,6 +24,7 @@
"react-scripts": "4.0.3",
"react-star-rating-component": "^1.4.1",
"react-toastify": "^8.1.0",
+ "react-tooltip": "^4.2.21",
"react-wavesurfer": "^0.8.6",
"redux": "^4.1.2",
"redux-devtools-extension": "^2.13.9",
diff --git a/src/components/CourseChapter/index.css b/src/components/CourseChapter/index.css
index 777bfea..4714abe 100644
--- a/src/components/CourseChapter/index.css
+++ b/src/components/CourseChapter/index.css
@@ -12,6 +12,7 @@
height: 20px;
}
.hasScrollbar::-webkit-scrollbar-track {
-
+background-color: rgba(0,0,0,0);
border-radius: 10px;
+ display: none;
}
\ No newline at end of file
diff --git a/src/components/CourseChapter/index.js b/src/components/CourseChapter/index.js
index f1331d9..d973b8b 100644
--- a/src/components/CourseChapter/index.js
+++ b/src/components/CourseChapter/index.js
@@ -100,7 +100,7 @@ const CourseChapter = ({ chapters }) => {
))}
{/* blue left border */}
-
+ {/* */}
);
diff --git a/src/components/VodProduct/danovin.mp4 b/src/components/VodProduct/danovin.mp4
new file mode 100644
index 0000000..faba880
Binary files /dev/null and b/src/components/VodProduct/danovin.mp4 differ
diff --git a/src/components/VodProduct/discount.png b/src/components/VodProduct/discount.png
new file mode 100644
index 0000000..eff7853
Binary files /dev/null and b/src/components/VodProduct/discount.png differ
diff --git a/src/components/VodProduct/index.js b/src/components/VodProduct/index.js
new file mode 100644
index 0000000..819081b
--- /dev/null
+++ b/src/components/VodProduct/index.js
@@ -0,0 +1,348 @@
+import React, { useEffect, useState } from "react";
+
+import StarRating from "../StarRating";
+import ReactTooltip from "react-tooltip";
+
+import watermelon from "./watermelon.png";
+import video from "./danovin.mp4";
+
+import discountImg from "./discount.png";
+
+import heart from "./vuesax-linear-heart.svg";
+import YellowDotIcon from "./yellowDotIcon.svg";
+import RedDotIcon from "./redDotIcon.svg";
+import PurpleDotIcon from "./purpleDotIcon.svg";
+import LightBlueDotIcon from "./lightBlueDotIcon.svg";
+import whitePlayIcon from "./white-play-button-icon.svg";
+
+const VodProduct = ({
+ productColor,
+ colors,
+ likeBtn,
+ discount,
+ discountPricePercent,
+ discountPrice,
+ productContent,
+ star,
+ productTags,
+ priceDirection,
+ productTitleAlignment,
+ priceHolder,
+ productCat,
+ rangeHolder,
+ priceTitle,
+ addToCartHolder,
+ productTitleCategoryHolder,
+ productTitleCategoryHolderAlignment,
+ priceStarHolder,
+ priceStarAlignment,
+ rangeWidth,
+ productTitle,
+ poster,
+ price
+}) => {
+ const [progressFlag, setProgressFlag] = useState(false);
+ // const [openModal, setOpenModal] = useState(false);
+ useEffect(() => {
+ setTimeout(() => {
+ setProgressFlag(true);
+ }, 1000);
+ });
+ return (
+ <>
+ {/* product UI Design */}
+
+
+
+ {/* product image */}
+
+ {/* icons on image */}
+
+ {discountPricePercent && (
+
+ )}
+ {likeBtn && (
+
+
+
+ )}
+ {discount && (
+
+
+
+ )}
+
+ {/* play button */}
+
setOpenModal(true)}
+ >
+
setOpenModal(true)}
+ />
+
+ {/* select Color */}
+ {productColor && (
+
+ {/* {colors.map((color,index))} */}
+
+
+
+ )}
+
+ {/* product content */}
+
+ {/* content */}
+
+
+
+ {productTitle}
+
+ {productCat && (
+
+ {productCat}
+
+ )}
+
+ {productContent && (
+
+ این کتاب شامل گلدان و گیاه و خاک می باشد و همچنین آپشن های
+ خوب دیگری نیز دارد.
+
+ )}
+
+ {/* price */}
+
+ {priceHolder && (
+
+ {/* price */}
+
+
+ {priceTitle && (
+
+ قیمت
+
+ )}
+ {discountPrice && (
+
+ قیمت 140تومان
+
+ )}
+
+
+ {price}تومان
+
+
+ {/* add to cart */}
+ {addToCartHolder && (
+
+ )}
+
+ )}
+ {star && (
+
+
+
+ 39
+
+
+ )}
+
+ {productTags && (
+
+
+
+
+
+ )}
+ {rangeHolder && (
+
+ )}
+
+
+
+
+
+ >
+
+ );
+};
+// hover:-translate-y-2
+export default VodProduct;
+
+// text colors i used for product title:
+// text-darkCrimsonTextColor
+// text-productTitle
+
+// text color i used for product excerpt:
+// text-productContent
+
+// text color i used for product cat:
+// text-darkCrimsonTextColor
+
+// bg color i used for play button icon:
+// bg-playButtonIcon
+// bg-playButtonIcon2
+
+VodProduct.defaultProps = {
+ colors: [
+ {
+ icon: YellowDotIcon,
+ dataType: "زرد",
+ },
+ {
+ icon: RedDotIcon,
+ dataType: "قرمز",
+ },
+ {
+ icon: PurpleDotIcon,
+ dataType: "بنفش",
+ },
+ {
+ icon: LightBlueDotIcon,
+ dataType: "آبی",
+ },
+
+ LightBlueDotIcon,
+ ],
+
+ // icons on product image
+ productColor: true,
+ likeBtn: true,
+ discount: true,
+ discountPricePercent: true,
+ // product price
+ discountPrice: true,
+ priceHolder: true,
+ priceTitle: false,
+
+ productContent: false,
+ star: true,
+ productTags: false,
+ productCat: true,
+ rangeHolder: true,
+
+ addToCartHolder: false,
+
+ productTitleAlignment: "text-justify",
+
+ // برای درصد دادن به عرض رنج
+ rangeWidth: "75%",
+
+ priceDirection: "flex-row",
+
+ productTitleCategoryHolder: "flex-row",
+ productTitleCategoryHolderAlignment: "items-center",
+
+ // برای اینکه بتونیم ستاره هارو بالا قیمت بزاریم و دیزاین را مثل کتاب ها در بیاریم
+ // یادمون باشه که حتما رویه
+ // flex-col-reverse
+ // بزاریم
+
+ // دیفالتش باید این باشه:
+ // priceStarHolder: flex-row
+ priceStarHolder: "flex-row",
+ // دیفالتش باید این باشه:
+ // priceStarHolder: items-center
+ priceStarAlignment: "items-center",
+ poster: watermelon
+};
diff --git a/src/components/VodProduct/lightBlueDotIcon.svg b/src/components/VodProduct/lightBlueDotIcon.svg
new file mode 100644
index 0000000..fc3cc88
--- /dev/null
+++ b/src/components/VodProduct/lightBlueDotIcon.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/components/VodProduct/purpleDotIcon.svg b/src/components/VodProduct/purpleDotIcon.svg
new file mode 100644
index 0000000..1859629
--- /dev/null
+++ b/src/components/VodProduct/purpleDotIcon.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/components/VodProduct/redDotIcon.svg b/src/components/VodProduct/redDotIcon.svg
new file mode 100644
index 0000000..1c20427
--- /dev/null
+++ b/src/components/VodProduct/redDotIcon.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/components/VodProduct/vuesax-linear-heart.svg b/src/components/VodProduct/vuesax-linear-heart.svg
new file mode 100644
index 0000000..306bf40
--- /dev/null
+++ b/src/components/VodProduct/vuesax-linear-heart.svg
@@ -0,0 +1,8 @@
+
diff --git a/src/components/VodProduct/watermelon.png b/src/components/VodProduct/watermelon.png
new file mode 100644
index 0000000..fb5efe7
Binary files /dev/null and b/src/components/VodProduct/watermelon.png differ
diff --git a/src/components/VodProduct/white-play-button-icon.svg b/src/components/VodProduct/white-play-button-icon.svg
new file mode 100644
index 0000000..fbbe9f7
--- /dev/null
+++ b/src/components/VodProduct/white-play-button-icon.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/components/VodProduct/yellowDotIcon.svg b/src/components/VodProduct/yellowDotIcon.svg
new file mode 100644
index 0000000..bd9e33e
--- /dev/null
+++ b/src/components/VodProduct/yellowDotIcon.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/views/Products/index.js b/src/views/Products/index.js
index 0630fe3..0683bd6 100644
--- a/src/views/Products/index.js
+++ b/src/views/Products/index.js
@@ -23,6 +23,8 @@ export const Products = ({
headerOptions,
desktopContentTransform,
}) => {
+
+
const [filter, setFilter] = useState({
search: "",
grade: "",
@@ -33,10 +35,6 @@ export const Products = ({
const onChange = (name, value) => {
setFilter({ ...filter, [name]: value });
};
- const onchange1 = (name, value) =>{
- console.log(name)
- console.log(value)
- }
useEffect(() => {
getList();
@@ -162,11 +160,14 @@ export const Products = ({
>
) : (
)}
diff --git a/src/views/Products/layouts/Main.js b/src/views/Products/layouts/Main.js
index 2585daf..a1bfe29 100644
--- a/src/views/Products/layouts/Main.js
+++ b/src/views/Products/layouts/Main.js
@@ -1,10 +1,13 @@
import React, { useState, useEffect, useCallback } from "react";
+import ScrollContainer from "react-indiana-drag-scroll";
import { connect } from 'react-redux';
import { Link } from "react-router-dom";
import filterIcon from '../../../assets/images/vuesax-linear-filter-tick.svg';
import Product from '../../../components/Product'
+import VodProduct from "../../../components/VodProduct";
import { book, publicApi } from "../../../redux/actions";
+import posterImage from "../../../assets/images/poster.svg";
export const Main = ({ isMobile,
@@ -16,6 +19,7 @@ export const Main = ({ isMobile,
gradeFilterBooks,
setHeaderOptions,
headerOptions,
+ videos,
filter }) => {
@@ -36,6 +40,48 @@ export const Main = ({ isMobile,
title: 'محبوب ترین'
},
];
+ const videosData = [
+ {
+ id: 0,
+ name: "ریاضی",
+ price: "145.000",
+ grade: " پایه چهارم ",
+ imageUrl: "https://dnvn.ir/api/v1/file/2105",
+ poster: posterImage,
+ },
+ {
+ id: 2,
+ name: "علوم تجربی",
+ price: "145.000 ",
+ grade: "پایه سوم",
+ imageUrl: "https://dnvn.ir/api/v1/file/2105",
+ poster: posterImage,
+ },
+ {
+ id: 1,
+ name: "زمین شناسی",
+ price: "145.000 ",
+ grade: "پایه چهارم",
+ imageUrl: "https://dnvn.ir/api/v1/file/2105",
+ poster: posterImage,
+ },
+ {
+ id: 3,
+ name: "ریاضی",
+ price: "145.000 ",
+ grade: "پایه چهارم",
+ imageUrl: "https://dnvn.ir/api/v1/file/2105",
+ poster: posterImage,
+ },
+ {
+ id: 5,
+ name: "ریاضی",
+ price: "145.000 ",
+ grade: "پایه چهارم",
+ imageUrl: "https://dnvn.ir/api/v1/file/2105",
+ poster: posterImage,
+ }
+ ]
return
@@ -52,6 +98,25 @@ export const Main = ({ isMobile,
}
+
+
+ {
+ videosData.map((video, index) => (
+
+
+
+ ))
+ }
+
{selectedGrade
@@ -97,6 +162,12 @@ export const Main = ({ isMobile,
;
};
+Main.defaultProps ={
+ videos: [
+
+ ]
+}
+
const mapStateToProps = (state) => ({
isDark: state.publicApi.isDark,
isMobile: state.publicApi.isMobile,