reza fixed some item

temp
Reza_ashrafi 3 years ago
commit 828301e428
  1. 2
      package.json
  2. 60
      src/components/Banners/index.js
  3. 18
      src/components/CourseChapter/index.css
  4. 55
      src/components/CourseChapter/index.js
  5. 19
      src/components/Navbar/index.js
  6. 0
      src/components/SalesContainer/index.css
  7. 81
      src/components/SalesContainer/index.js
  8. 0
      src/components/VideoPlayer/index.css
  9. 19
      src/components/VideoPlayer/index.js
  10. BIN
      src/components/VodProduct/danovin.mp4
  11. BIN
      src/components/VodProduct/discount.png
  12. 348
      src/components/VodProduct/index.js
  13. 3
      src/components/VodProduct/lightBlueDotIcon.svg
  14. 3
      src/components/VodProduct/purpleDotIcon.svg
  15. 3
      src/components/VodProduct/redDotIcon.svg
  16. 8
      src/components/VodProduct/vuesax-linear-heart.svg
  17. BIN
      src/components/VodProduct/watermelon.png
  18. 3
      src/components/VodProduct/white-play-button-icon.svg
  19. 3
      src/components/VodProduct/yellowDotIcon.svg
  20. 13
      src/router.js
  21. 48
      src/views/Home/Desktop/index.js
  22. 18
      src/views/Home/index.js
  23. 11
      src/views/Products/index.js
  24. 71
      src/views/Products/layouts/Main.js
  25. 24
      src/views/VideoDisplay/Desktop/index.js

@ -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",

@ -0,0 +1,60 @@
import React from "react";
const Banners = ({
mainBanner,
leftBanner,
midTopBanner,
midBottomBanner,
}) => {
return (
<div className="flex w-full justify-between" style={{
height: '400px'
}}>
<div className={`h-full w-1/2 rounded-xl flex items-center`} style={{
background: mainBanner ? '' : 'rgba(134,160,185,0.16)',
}}>
<img src={mainBanner} className="rounded-xl h-full" />
</div>
<div className="flex h-full w-1/2 ">
<div className="flex flex-col w-1/2 h-full px-6 justify-center items-between">
<div className={`${midTopBanner ? '' : 'h-1/2 '} w-full rounded-xl mb-2`}
style={{
background: midTopBanner ? '' : 'rgba(134,160,185,0.16)',
}}
>
<img src={midTopBanner} className="rounded-xl" />
</div>
<div className={`${midBottomBanner ? '' : 'h-1/2 '} w-full rounded-xl mt-2`}
style={{
background: midBottomBanner ? '' : 'rgba(134,160,185,0.16)',
}}
>
<img src={midBottomBanner} className="rounded-xl" />
</div>
</div>
<div className=" h-full w-1/2 rounded-xl"
style={{
background: leftBanner ? '' : 'rgba(134,160,185,0.16)',
}}
>
<img src={leftBanner} className="rounded-xl" />
</div>
</div>
</div>
)
}
export default Banners;

@ -0,0 +1,18 @@
.hasScrollbar::-webkit-scrollbar {
width:5px;
background-color: rgba(0,0,0,0.08);
border-radius: 5px;
margin-top: 200px;
}
.hasScrollbar::-webkit-scrollbar-thumb{
background:#196EC0;
border-radius: 10px;
height: 20px;
}
.hasScrollbar::-webkit-scrollbar-track {
background-color: rgba(0,0,0,0);
border-radius: 10px;
display: none;
}

@ -1,13 +1,14 @@
import React, { useState } from "react";
import './index.css';
const CourseChapter = ({ chapters }) => {
const [selectedLesson, setSelectedLesson] = useState(null);
return (
<section style={{ width: "30%" }} className="bg-white mx-auto my-20 p-4">
<section style={{ width: "40%" }} className="bg-white mx-auto my-20 p-4">
<div
className="rounded py-5 px-4 relative"
style={{ backgroundColor: "#196EC033" }}
style={{ backgroundColor: "#196EC033", height: '530px'}}
>
{/* top */}
<div className="flex flex-row items-center justify-between">
@ -20,8 +21,11 @@ const CourseChapter = ({ chapters }) => {
</div>
</div>
{/* divider */}
<div className="border-b border-blue-300 bg-opacity-10 my-5"></div>
<div className="border-b border-blue-300 border-solid bg-opacity-10 my-5"></div>
{/* course title */}
<div className="overflow-y-scroll w-full hasScrollbar" style={{
height: '430px'
}}>
{chapters.map((chapter, index) => (
<div className="flex flex-col" key={index}>
<div className="bg-blue-600 rounded-sm p-4 flex flex-row items-center justify-between">
@ -31,7 +35,7 @@ const CourseChapter = ({ chapters }) => {
{/* course lessons */}
{chapter.lessons.map((lesson, i) => (
<div
className="flex flex-row items-center justify-around"
className="flex flex-row items-center justify-around"
key={i}
>
{/* right div dot dot */}
@ -42,13 +46,13 @@ const CourseChapter = ({ chapters }) => {
<div
className={`flex justify-center items-center w-4 h-4 rounded-full
${selectedLesson === lesson ? "bg-red-600" : "bg-blue-600"},
${lesson.passed ? "bg-red-600" : "bg-blue-600"}
${lesson.passed ? "bg-blue-600" : "bg-gray-400"}
`}
></div>
<span
className="w-1"
style={{
borderRight: "2px dotted yellow",
borderRight: "2px dashed #86A0B9",
transform: "translateX(-1px)",
height: "65px",
}}
@ -56,22 +60,22 @@ const CourseChapter = ({ chapters }) => {
</div>
{/* left div content */}
<div
className={`mt-2 bg-white border border-blue-600 flex flex-col rounded-md cursor-pointer transition duration-200 ease-in-out group hover:bg-blue-600
${selectedLesson === lesson ? "bg-blue-600" : ""}`}
className={`mt-2 bg-white border border-blue-300 flex flex-col border border-solid cursor-pointer transition duration-200 ease-in-out group hover:bg-blue-600
${selectedLesson === lesson ? "bg-blue-600 text-white-700" : "text-blue-500"}`}
style={{ width: "80%" }}
onClick={() => setSelectedLesson(lesson)}
>
{/* top */}
<div className="flex flex-row items-center justify-between p-2">
<div className="flex flex-row items-center justify-between p-4 border-0 border-b border-solid border-blue-500">
<p
className={`text-sm text-blue-500 group-hover:text-white
${selectedLesson === lesson ? "text-red-600" : ""}`}
className={`text-sm group-hover:text-white
${selectedLesson === lesson ? "text-white" : ""}`}
>
{lesson.title}
</p>
<span
className={`text-xs text-blue-500 group-hover:text-white border-r border-blue-200 pr-1
${selectedLesson === lesson ? "text-red-600" : ""}`}
className={`text-xs group-hover:text-white border-r border-solid border-blue-200 pr-1
${selectedLesson === lesson ? "text-white" : "text-blue-500"}`}
>
{lesson.duration}
</span>
@ -84,8 +88,8 @@ const CourseChapter = ({ chapters }) => {
></div>
{/* bottom */}
<span
className={`text-xs text-center text-blue-500 group-hover:text-white p-2
${selectedLesson === lesson ? "text-red-600" : ""}`}
className={`text-xs text-center group-hover:text-white p-2
${selectedLesson === lesson ? "text-white" : "text-blue-500"}`}
>
{lesson.play}
</span>
@ -94,8 +98,9 @@ const CourseChapter = ({ chapters }) => {
))}
</div>
))}
</div>
{/* blue left border */}
<div className="absolute top-1/2 left-0.5 transform -translate-x-1/2 -translate-y-1/2 bg-blue-600 w-1 h-20 rounded"></div>
{/* <div className="absolute top-1/2 left-0.5 transform -translate-x-1/2 -translate-y-1/2 bg-blue-600 w-1 h-20 rounded"></div> */}
</div>
</section>
);
@ -133,6 +138,24 @@ CourseChapter.defaultProps = {
play: "نمایش",
passed: false,
},
{
title: "زمین سبز و آسمان آبی",
duration: "56:09",
play: "نمایش",
passed: false,
},
{
title: "زمین سبز و آسمان آبی",
duration: "56:09",
play: "نمایش",
passed: false,
},
{
title: "زمین سبز و آسمان آبی",
duration: "56:09",
play: "نمایش",
passed: false,
},
],
},
],

@ -29,6 +29,7 @@ import bookmarkDeactiveDarkIcon from "../../assets/icons/bookmark-deactive-dark.
import dotsMenuLightIcon from "../../assets/icons/dots-menu-light.svg";
import bookmarkDeactiveLightIcon from "../../assets/icons/bookmark-deactive-light.svg";
function Navbar({
pages,
isDark,
@ -267,7 +268,7 @@ function Navbar({
</div>
<div
className={`flex items-center relative w-full h-10 px-4 border-b border-solid border-gray-200 transform bg-white ${
className={`flex items-center relative w-full h-10 px-20 border-b border-solid border-gray-200 transform bg-white ${
desktopEndTransform ? "" : ""
}`}
style={
@ -291,7 +292,7 @@ function Navbar({
className="flex items-center justify-around w-3/5 absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2"
style={{ maxWidth: "calc(100vw / 2)" }}
>
{menuItems.map((item, index) => (
{/* {menuItems.map((item, index) => (
<a
href="#"
className={`text-sm text-blue52 ${menuItemsColor}`}
@ -299,7 +300,15 @@ function Navbar({
>
{item}
</a>
))}
))} */}
{
pages.map((item, index) => (
<Link to={item.link} className={`text-sm text-blue52 ${menuItemsColor}`} key={'nav' + index}>
{item.name}
</Link>
))
}
</div>
</div>
</div>
@ -318,6 +327,10 @@ export default connect(mapStateToProps, {})(Navbar);
Navbar.defaultProps = {
pages: [
{
link: '/',
name: 'خانه'
},
{
link: "/products",
name: "محصولات",

@ -0,0 +1,81 @@
import React, {useState, useEffect} from "react";
import { connect } from "react-redux";
import { book, publicApi } from "../../redux/actions";
import ScrollContainer from "react-indiana-drag-scroll";
import { Link } from "react-router-dom";
import Product from "../Product";
import './index.css';
const SalesContainer = ({
list, getList,
grades
}) =>{
const [filter, setFilter] = useState({
search: "",
grade: "",
productsType: "کتاب",
});
useEffect(() => {
getList();
}, []);
return(
<div className="w-full my-10">
<div className="w-full border-b-2 border-solid border-gray-300">
<div className="w-1/3 p-10 bg-white flex justify-between items-center" style={{
marginBottom:'-5px'
}} onClick={() => console.log(list)}>
<div className="flex items-center ">
<div className="w-6 h-6 bg-blue-300 ml-4 rounded-full"></div>
<h1 className="text-3xl leading-normal">
<h3 className=" bg-blue-700 text-white"> دوشنبه </h3>
<h3 className="mr-4 bg-yellow-300 pl-6"> کتاااابی </h3>
</h1>
</div>
<div className="flex items-center">
<p className="text-md">بیش از ۵۰ کتاب تخفیف خورده</p>
<div className="w-6 h-6 bg-blue-300 mr-4 rounded-full ">
</div>
</div>
</div>
</div>
<ScrollContainer className="flex overflow-x-scroll border-2 border-solid border-gray-300 border-t-0 py-4 px-10" style={{
// marginTop: '-5px'
}}>
{
list?.map((product, index) => (
<Link to={"/products/" + product?.id}>
<Product
key={`prod_takhfif${index}`}
productsType={filter.productsType}
product={product}
index={Number(index)}
productName={`کتاب ${product?.name}`}
productCat={`پایه ${grades[product?.gradeId]}`}
productPrice={100000}
productImg={"https://dnvn.ir/api/v1/file/" + product?.fileIds}
numberOfRegards={160}
productTitleColor='text-blue5F'
productCatTextColor='text-blueC0'
productHolderBorder=''
productHolderHoverBorder='shadow-md'
/>
</Link>
))}
</ScrollContainer>
</div>
)
}
const mapStateToProps = (state) => ({
list: state.book.list,
isDark: state.publicApi.isDark,
});
export default connect(mapStateToProps, { getList: book.list })(SalesContainer);

@ -0,0 +1,19 @@
import React from "react";
import './index.css';
const VideoPlayer = ({
playerWidth,
}) => {
return(
<video style={{ width: playerWidth, }} controls>
<source
src={`https://dnvn.ir/api/v1/file/20540`}
type="video/mp4"
/>
</video>
);
};
export default VideoPlayer;

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

@ -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 */}
<div className="flex flex-wrap sm:flex-nowrap justify-around">
<div className="w-full flex flex-wrap items-center justify-around my-10 px-1 sm:px-4">
<div
className={`w-full sm:w-60 md:w-96 mx-1 rounded-lg shadow-sm p-2 my-3 border border-grayBorderColor`}
>
{/* product image */}
<div
className="group transition ease-in-out delay-150 duration-300 w-full relative flex items-center justify-center cursor-pointer"
style={{
backgroundImage: `url(${poster})`,
backgroundSize: "100% 100%",
backgroundRepeat: "no-repeat",
minHeight: "180px",
}}
data-modal-toggle="large-modal"
>
{/* icons on image */}
<div className="absolute left-2 top-2">
{discountPricePercent && (
<div className="bg-discountPriceBg rounded-md px-2 py-2 mt-2 transition ease-in-out duration-300 transform hover:-translate-y-1 hover:scale-110 cursor-pointer">
<p className="text-discountPriceTitle font-bold text-xs">
23<span>%</span>
</p>
</div>
)}
{likeBtn && (
<div className="bg-likeBtnBg rounded-md p-1 flex justify-center mt-2 transition ease-in-out duration-300 transform hover:-translate-y-1 hover:scale-110 cursor-pointer">
<img src={heart} alt="" className="w-5" />
</div>
)}
{discount && (
<div className="rounded-md mt-2 transition ease-in-out duration-300 transform hover:-translate-y-1 hover:scale-110 cursor-pointer">
<img src={discountImg} alt="" className="w-full" />
</div>
)}
</div>
{/* play button */}
<div
className={` rounded-full p-4 group-hover:scale-125 transform transition-transform duration-300 bg-playButtonIcon`}
// onClick={() => setOpenModal(true)}
>
<img
src={whitePlayIcon}
alt=""
className="w-5 h-5"
// onClick={() => setOpenModal(true)}
/>
</div>
{/* select Color */}
{productColor && (
<div className="flex items-center absolute right-2 bottom-2">
{/* {colors.map((color,index))} */}
<img
src={YellowDotIcon}
alt=""
data-tip="زرد"
className="w-3 h-3 ml-1 cursor-pointer"
/>
<ReactTooltip place="top" type="dark" effect="float" />
</div>
)}
</div>
{/* product content */}
<div className="px-2">
{/* content */}
<div className="mt-4 flex flex-col">
<div
className={`flex ${productTitleCategoryHolder} ${productTitleCategoryHolderAlignment} justify-between `}
>
<h2
className={`leading-4 text-base mb-2 font-semibold text-darkCrimsonTextColor ${productTitleAlignment}`}
>
{productTitle}
</h2>
{productCat && (
<span
className={`text-xs font-light text-darkCrimsonTextColor`}
>
{productCat}
</span>
)}
</div>
{productContent && (
<p
className={`text-justify text-sm leading-6 text-productContent`}
>
این کتاب شامل گلدان و گیاه و خاک می باشد و همچنین آپشن های
خوب دیگری نیز دارد.
</p>
)}
</div>
{/* price */}
<div
className={`flex ${priceStarHolder} ${priceStarAlignment} justify-between mt-2`}
>
{priceHolder && (
<div
className={`flex items-center justify-between ${priceDirection}`}
>
{/* price */}
<div className="">
<div
className={`${
priceDirection.indexOf("col") !== -1
? "inline"
: "flex"
}`}
>
{priceTitle && (
<span className="text-xs text-borderColor ml-2">
قیمت
</span>
)}
{discountPrice && (
<p className="line-through text-xs text-borderColor">
<span> قیمت</span> 140<span>تومان</span>
</p>
)}
</div>
<p
className={`text-sm font-semibold inline text-productPrice`}
>
{price}<span>تومان</span>
</p>
</div>
{/* add to cart */}
{addToCartHolder && (
<button
className={`rounded-md px-2 py-3 border text-xs text-productPrice mt-2 hover:bg-darkCrimsonBgColor hover:text-white active:bg-rangeFillBgColor transition duration-500 ${
priceDirection.indexOf("col") !== -1 ? "w-full" : ""
}`}
>
اضافه کردن به سبد خرید
</button>
)}
</div>
)}
{star && (
<div className="flex items-center">
<StarRating />
<span className="text-xs text-productContent font-bold mr-2">
39
</span>
</div>
)}
</div>
{productTags && (
<div className="mt-2 flex flex-wrap">
<button className="rounded bg-productTagBg text-productTag m-1 px-4 py-1 text-xs">
ارسال رایگان
</button>
<button className="rounded bg-productTagBg text-productTag m-1 px-4 py-1 text-xs">
برچسب های دیگر
</button>
<button className="rounded bg-productTagBg text-productTag m-1 px-4 py-1 text-xs">
دسته بندی به صورت کادو
</button>
</div>
)}
{rangeHolder && (
<div className="bg-rangeBgColor h-3 w-full rounded mt-2">
<div
className={`bg-rangeFillBgColor h-3 rounded duration-500`}
style={{
width: progressFlag ? rangeWidth : 0,
}}
></div>
</div>
)}
</div>
</div>
</div>
</div>
<div
class="hidden overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-4 z-50 justify-center items-center md:inset-0 h-modal sm:h-full"
id="large-modal"
>
<div class="relative px-4 w-full max-w-4xl h-full md:h-auto">
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
<div class="flex justify-between items-center p-5 rounded-t border-b border-gray-200 dark:border-gray-600">
<button
type="button"
class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white"
data-modal-toggle="large-modal"
>
<svg
class="w-5 h-5"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
clip-rule="evenodd"
></path>
</svg>
</button>
</div>
<div class="p-6 space-y-6">
<video
controls
className={`border transition-all duration-1000
`}
src={video}
type="video/mp4"
></video>
</div>
</div>
</div>
</div>
</>
);
};
// 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
};

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<circle id="Ellipse_18" data-name="Ellipse 18" cx="8" cy="8" r="8" fill="#89ecff"/>
</svg>

After

Width:  |  Height:  |  Size: 177 B

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<circle id="Ellipse_17" data-name="Ellipse 17" cx="8" cy="8" r="8" fill="#924eeb"/>
</svg>

After

Width:  |  Height:  |  Size: 177 B

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<circle id="Ellipse_19" data-name="Ellipse 19" cx="8" cy="8" r="8" fill="#fc5353"/>
</svg>

After

Width:  |  Height:  |  Size: 177 B

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<g id="vuesax_linear_heart" data-name="vuesax/linear/heart" transform="translate(-236 -188)">
<g id="heart">
<path id="Vector" d="M10.62,17.71a2.181,2.181,0,0,1-1.24,0C6.48,16.72,0,12.59,0,5.59A5.574,5.574,0,0,1,5.56,0,5.515,5.515,0,0,1,10,2.24,5.547,5.547,0,0,1,20,5.59C20,12.59,13.52,16.72,10.62,17.71Z" transform="translate(238 191.1)" fill="none" stroke="#e11010" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
<path id="Vector-2" data-name="Vector" d="M0,0H24V24H0Z" transform="translate(236 188)" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="26.141" height="27.811" viewBox="0 0 26.141 27.811">
<path id="Vector" d="M0,13.909V8.217C0,.872,5.192-2.089,11.537,1.564L16.46,4.41l4.923,2.846c6.345,3.653,6.345,9.653,0,13.306L16.46,23.408l-4.923,2.846C5.192,29.907,0,26.907,0,19.6Z" fill="#fff"/>
</svg>

After

Width:  |  Height:  |  Size: 305 B

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<circle id="Ellipse_20" data-name="Ellipse 20" cx="8" cy="8" r="8" fill="#fcf653"/>
</svg>

After

Width:  |  Height:  |  Size: 177 B

@ -1,5 +1,6 @@
import React, { useEffect } from "react";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import { BrowserRouter, Routes, Route, } from "react-router-dom";
import { Navigate } from 'react-router-dom';
import { connect } from "react-redux";
import { publicApi } from "./redux/actions";
import Navbar from "./components/Navbar";
@ -156,10 +157,11 @@ function Router({
/>
}
/>
<Route
path="/videos"
<Route
path='/videos'
exact
element={
isMobile ?
<Videos
headerOptions={{
logo: true,
@ -170,9 +172,10 @@ function Router({
shown: true,
menu: false,
}}
/>
/> : <Navigate replace to="/products" />
}
/>
>
</Route>
<Route
path="/videos/:id"
exact

@ -0,0 +1,48 @@
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 Banners from "../../../components/Banners";
import SalesContainer from "../../../components/SalesContainer";
import { book, publicApi } from "../../../redux/actions";
const DesktopHome = (
{
books,
grades
}
) =>{
return (
<div className="flex flex-col items-center w-4/5 justify-center my-10">
<Banners/>
<SalesContainer books={books} grades={grades}/>
</div>
)
}
const mapStateToProps = (state) => ({
isDark: state.publicApi.isDark,
isMobile: state.publicApi.isMobile,
books: state.book.list,
grades: state.publicApi.grades,
gradeFilterBooks: state.book.gradeFilterBooks,
selectedGrade: state.book.selectedGrade,
});
const mapDispatchToProps = {
getList: book.list,
gradeFilter: book.gradeFilter,
setHeaderOptions: publicApi.setHeaderOptions,
};
export default connect(mapStateToProps, mapDispatchToProps)(DesktopHome);

@ -1,25 +1,33 @@
import React, { useEffect } from "react";
import { connect } from "react-redux";
import Landscape from "./Landscape";
// import Landscape from "./Landscape";
import DesktopHome from './Desktop';
import Portrait from "./Portrait";
import { publicApi } from "../../redux/actions";
function Home({ setHeaderOptions, headerOptions }) {
function Home({ setHeaderOptions, headerOptions, isMobile }) {
useEffect(() => {
setHeaderOptions(headerOptions);
}, []);
return (
<>
<Portrait />
<Landscape />
{
isMobile ? <Portrait /> : <div className="flex justify-center"><DesktopHome /></div>
}
{/* <Landscape /> */}
</>
);
}
const mapStateToProps = (state) => ({});
const mapStateToProps = (state) => ({
isMobile: state.publicApi.isMobile,
});
const mapDispatchToProps = {
setHeaderOptions: publicApi.setHeaderOptions,
};
export default connect(mapStateToProps, mapDispatchToProps)(Home);

@ -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 = ({
</>
) : (
<div
className={`w-full flex flex-row gap-10 px-5 overflow-y-hidden mt-3`}
className={`w-full flex flex-row gap-10 px-5 overflow-y-hidden mt-3 justify-center`}
// style={{ height: 1500 }}
>
<div className="w-4/5 flex">
<Sidebar onChange={onChange}/>
<Main filter={filter}/>
</div>
</div>
)}
</div>

@ -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 <div className="flex flex-col w-3/4 p-4">
<div className="flex w-full bg-blue rounded-lg border border-solid border-gray-200 p-2 items-center my-1.5 justify-center text-blue52">
<div className='flex text-xs items-center mx-4'>
@ -52,6 +98,25 @@ export const Main = ({ isMobile,
}
</ul>
</div>
<ScrollContainer className="flex">
{
videosData.map((video, index) => (
<Link
to={"/videos/" + video.id}
className="flex flex-col rounded-md ml-4"
>
<VodProduct
productTitle={`دوره ی ویدیویی ${video.name}`}
productCat={video.grade}
price={video.price}
priceTitle={false}
discountPrice={false}
/>
</Link>
))
}
</ScrollContainer>
<div className="w-full flex flex-row flex-wrap mt-0 border-t-2 border-solid border-gray-100 overflow-y-hidden justify-between">
{selectedGrade
@ -97,6 +162,12 @@ export const Main = ({ isMobile,
</div>;
};
Main.defaultProps ={
videos: [
]
}
const mapStateToProps = (state) => ({
isDark: state.publicApi.isDark,
isMobile: state.publicApi.isMobile,

@ -1,16 +1,21 @@
import React from "react";
import CourseChapter from "../../../components/CourseChapter";
import VideoPlayer from "../../../components/VideoPlayer";
const DesktopVideoDisplay = () =>{
return(
<div className="w-full flex flex-col px-4 items-center">
<div className="w-11/12 flex flex-col mb-6 items-center">
<div className="w-full flex flex-row flex-1 justify-between items-center overflow-hidden relative">
<video style={{ width: "70%", }} controls>
<source
src={`https://dnvn.ir/api/v1/file/20540`}
type="video/mp4"
/>
</video>
<div className="w-4/5 flex flex-col mb-6 justify-center items-center">
<div className="w-full flex flex-row flex-1 justify-center overflow-hidden relative">
<div className="flex flex-col w-4/5">
<VideoPlayer playerWidth='100%' />
<h1 className="mx-4 my-2 text-4xl text-blue52 py-6 border-b-2 border-solid border-gray-300">ساز های باستانی ایران عزیز</h1>
<p className="m-4 text-gray-600">
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد، کتابهای زیادی در شصت و سه درصد گذشته حال و آینده، شناخت فراوان جامعه و متخصصان را می طلبد، تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی، و فرهنگ پیشرو در زبان فارسی ایجاد کرد، در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها، و شرایط سخت تایپ به پایان رسد و زمان مورد نیاز شامل حروفچینی دستاوردهای اصلی، و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد.
</p>
</div>
<CourseChapter />
</div>
{/* <div className="flex flex-col flex-1 justify-between pr-2">
@ -22,6 +27,9 @@ const DesktopVideoDisplay = () =>{
</div>
<Divider type={"vertical"} />
</div> */}
<div>
</div>
</div>
</div>
);

Loading…
Cancel
Save