update 97 files

master
Reza_ashrafi 2 years ago
parent 3979d86209
commit 28500ff68c
  1. 2
      src/components/BottomNavigation/index.js
  2. 14
      src/components/Comments/index.js
  3. 8
      src/components/CourseChapter/index.js
  4. 4
      src/components/Dialog/index.js
  5. 6
      src/components/Drawer/index.js
  6. 4
      src/components/Footer/index.js
  7. 2
      src/components/Header/index.js
  8. 266
      src/components/Navbar/index.js
  9. 2
      src/components/OR/index.js
  10. 2
      src/components/ProductImage/index.js
  11. 24
      src/components/ProductStatusCard/index.js
  12. 6
      src/components/ProductSuggestion/index.js
  13. 2
      src/components/ProductTab/index.js
  14. 22
      src/components/QandA/index.js
  15. 4
      src/components/VerticalExpandableProductFilter/index.js
  16. 4
      src/redux/actions/blog.js
  17. 6
      src/redux/actions/config.js
  18. 3
      src/redux/actions/index.js
  19. 16
      src/redux/reducers/blog.js
  20. 16
      src/redux/reducers/config.js
  21. 3
      src/redux/reducers/index.js
  22. 55
      src/router.js
  23. 7
      src/views/About/index.js
  24. 4
      src/views/About/index.scss
  25. 2
      src/views/Activation/components/Alert.js
  26. 14
      src/views/Address/index.js
  27. 4
      src/views/Auth/Profile/index.js
  28. 4
      src/views/Auth/SignUp/index.js
  29. 2
      src/views/Blog/index.js
  30. 185
      src/views/Blogs/index.js
  31. 45
      src/views/Blogs/layouts/Blog.js
  32. 23
      src/views/Blogs/layouts/Hashtags.js
  33. 2
      src/views/Blogs/layouts/Join.js
  34. 2
      src/views/Blogs/layouts/Single.js
  35. 6
      src/views/Blogs/layouts/Target.js
  36. 2
      src/views/Contact/index.js
  37. 2
      src/views/Contact/layouts/Info.js
  38. 2
      src/views/Dashboard/index.js
  39. 6
      src/views/Dashboard/layouts/Main/Addresses/index.js
  40. 2
      src/views/Dashboard/layouts/Mobile/List.js
  41. 4
      src/views/Dashboard/layouts/Mobile/ProfileAddress/index.js
  42. 4
      src/views/Dashboard/layouts/Mobile/Trophy.js
  43. 4
      src/views/Dashboard/layouts/Mobile/User.js
  44. 8
      src/views/Dashboard/layouts/SidebarMenu/index.js
  45. 12
      src/views/DeliveryForm/Address/index.js
  46. 2
      src/views/DeliveryForm/PaymentMethod/index.js
  47. 4
      src/views/DeliveryForm/TransportDate/index.js
  48. 2
      src/views/DeliveryForm/TransportMethod/index.js
  49. 14
      src/views/DeliveryForm/index.js
  50. 2
      src/views/Faq/components/NotFound.js
  51. 2
      src/views/Faq/components/Question.js
  52. 2
      src/views/Faq/index.js
  53. 2
      src/views/Favorites/index.js
  54. 2
      src/views/Home/Desktop/Part2/index.js
  55. 2
      src/views/Home/Desktop/Part4/index.js
  56. 2
      src/views/Home/Desktop/SalesContainer/index.js
  57. 2
      src/views/Home/Landscape/Page1/Lights/index.js
  58. 6
      src/views/Home/Landscape/Page1/index.js
  59. 2
      src/views/Home/Landscape/Page2/Mobile/QrResult/Link/index.js
  60. 2
      src/views/Home/Landscape/Page2/Mobile/QrResult/PDF/index.js
  61. 4
      src/views/Home/Landscape/Page2/Mobile/QrResult/index.js
  62. 2
      src/views/Home/Landscape/Page3/index.js
  63. 2
      src/views/Home/Landscape/Page4/index.js
  64. 2
      src/views/Home/Landscape/Test/Question.js
  65. 6
      src/views/Home/Landscape/Test/index.js
  66. 4
      src/views/Home/Landscape/VideoTube/LessonPlayList/index.js
  67. 4
      src/views/Home/Landscape/VideoTube/index.js
  68. 12
      src/views/Home/Portrait/Private/Blogs/index.js
  69. 2
      src/views/Home/Portrait/Private/MyBooks/index.js
  70. 4
      src/views/Home/Portrait/Private/Videos/index.js
  71. 2
      src/views/Home/Portrait/Public/Features/index.js
  72. 4
      src/views/Home/Portrait/Public/Header/index.js
  73. 2
      src/views/Home/Portrait/Public/Platforms/index.js
  74. 4
      src/views/Home/Portrait/Public/Responsive/index.js
  75. 6
      src/views/Order/components/Book.js
  76. 34
      src/views/Order/index.js
  77. 12
      src/views/Orders/components/Order.js
  78. 4
      src/views/Product/Comment/index.js
  79. 6
      src/views/Product/Desktop/ProductOverAll/index.js
  80. 2
      src/views/Product/Rate/index.js
  81. 10
      src/views/Product/index.js
  82. 4
      src/views/Products/index.js
  83. 2
      src/views/Products/layouts/Desktop/Main.js
  84. 6
      src/views/Products/layouts/Desktop/Sidebar.js
  85. 2
      src/views/Products/layouts/Mobile/Header.js
  86. 6
      src/views/Products/layouts/Mobile/Main.js
  87. 2
      src/views/QR/Content/components/Links.js
  88. 2
      src/views/QR/Content/components/PDF.js
  89. 2
      src/views/QR/Content/components/Tab.js
  90. 2
      src/views/ShoppingCart/Code/index.js
  91. 14
      src/views/ShoppingCart/Product/index.js
  92. 20
      src/views/ShoppingCart/index.js
  93. 2
      src/views/Video/components/Desktop/Videos.js
  94. 4
      src/views/Video/components/Season.js
  95. 12
      src/views/Video/index.js
  96. 8
      src/views/VideoDisplay/components/Season.js
  97. 2
      src/views/VideoDisplay/index.js
  98. 6
      src/views/Videos/components/MostViewedVideo.js
  99. 2
      src/views/Videos/components/NewestVideo.js
  100. 2
      src/views/Videos/components/VerticalGradeFilter.js

@ -38,7 +38,7 @@ export const BottomNavigation = ({ pages, isDark }) => {
return ( return (
<> <>
<footer <footer
className="w-full flex flex-row justify-around items-center fixed bottom-0 left-0 py-2 z-20 lg:hidden" className="w-full flex justify-around items-center fixed bottom-0 left-0 py-2 z-20 lg:hidden"
style={{ background: isDark ? "hsla(209, 39%, 28%)" : "#E8FCFF" }} style={{ background: isDark ? "hsla(209, 39%, 28%)" : "#E8FCFF" }}
> >
{pages.map((page, index) => ( {pages.map((page, index) => (

@ -39,8 +39,8 @@ export const Comments = ({ comments, indent }) => {
const Comment = ({ comment }) => { const Comment = ({ comment }) => {
return ( return (
<div className="flex flex-col w-full"> <div className="flex flex-col w-full">
<header className="w-full flex flex-row justify-between py-1"> <header className="w-full flex justify-between py-1">
<div className="flex flex-row items-end"> <div className="flex items-end">
<Avatar source={comment?.userImage} size={60} rounded={true} /> <Avatar source={comment?.userImage} size={60} rounded={true} />
<div className="flex flex-col"> <div className="flex flex-col">
<div className="flex items-center"> <div className="flex items-center">
@ -48,18 +48,18 @@ export const Comments = ({ comments, indent }) => {
<span className="text-tiny text-greenBA mr-3"> <span className="text-tiny text-greenBA mr-3">
{comment?.userRoll || window.t("خریدار محصول")} {comment?.userRoll || window.t("خریدار محصول")}
</span> </span>
<div className="flex flex-row items-center mr-10 font-semibold"> <div className="flex items-center mr-10 font-semibold">
<StarRating /> <StarRating />
</div> </div>
</div> </div>
<div <div
className="flex flex-row divide-x divide-gray-300 mt-4 divided items-center" className="flex divide-x divide-gray-300 mt-4 divided items-center"
style={{ direction: "ltr" }} style={{ direction: "ltr" }}
></div> ></div>
</div> </div>
</div> </div>
<div <div
className="flex flex-row divide-x divide-gray-300 divided items-center" className="flex divide-x divide-gray-300 divided items-center"
style={{ direction: "ltr" }} style={{ direction: "ltr" }}
> >
<span className="px-2 text-sm text-blue-400"> <span className="px-2 text-sm text-blue-400">
@ -73,9 +73,9 @@ export const Comments = ({ comments, indent }) => {
<div className="flex flex-row"> <div className="flex flex-row">
<div style={{ width: 60 }} className="min-h-full"></div> <div style={{ width: 60 }} className="min-h-full"></div>
<div className="flex flex-1 flex-col px-3"> <div className="flex flex-1 flex-col px-3">
<header className="w-full flex flex-row justify-between items-center"> <header className="w-full flex justify-between items-center">
<div>&nbsp;</div> <div>&nbsp;</div>
<div className="flex flex-row items-center"> <div className="flex items-center">
{comment?.status === true && ( {comment?.status === true && (
<> <>
<img src={positiveIcon} alt="" className="w-6 ml-2" /> <img src={positiveIcon} alt="" className="w-6 ml-2" />

@ -33,7 +33,7 @@ const CourseChapter = ({
height: isMobile ? "auto" : "calc(100vh - 300px)", height: isMobile ? "auto" : "calc(100vh - 300px)",
}} }}
> >
<div className="hidden lg:flex flex-row w-full items-center justify-between"> <div className="hidden lg:flex w-full items-center justify-between">
<div> <div>
<h2 className="text-green7B bg-opacity-5 text-base font-semibold"> <h2 className="text-green7B bg-opacity-5 text-base font-semibold">
{window.t("سرفصل دوره")} {window.t("سرفصل دوره")}
@ -48,7 +48,7 @@ const CourseChapter = ({
</div> </div>
<span className="hidden lg:flex w-full h-px bg-blue-200 my-4"></span> <span className="hidden lg:flex w-full h-px bg-blue-200 my-4"></span>
<div className="lg:overflow-y-scroll w-full hasScrollbar flex-1 flex flex-col"> <div className="lg:overflow-y-scroll w-full hasScrollbar flex-1 flex flex-col">
<div className="bg-green-600 rounded-sm p-4 flex flex-row items-center justify-between mb-2"> <div className="bg-green-600 rounded-sm p-4 flex items-center justify-between mb-2">
<p className="text-tiny font-bold text-white"> <p className="text-tiny font-bold text-white">
{seasons?.length > 0 && {seasons?.length > 0 &&
playList?.length > 0 && playList?.length > 0 &&
@ -65,7 +65,7 @@ const CourseChapter = ({
key={index} key={index}
> >
<div <div
className="flex flex-row items-center justify-around" className="flex items-center justify-around"
key={index} key={index}
> >
{/* right div dot dot */} {/* right div dot dot */}
@ -108,7 +108,7 @@ const CourseChapter = ({
disabled={true} disabled={true}
> >
{/* top */} {/* top */}
<div className="flex flex-row items-center justify-between p-3 border-0 border-b border-solid border-green-200"> <div className="flex items-center justify-between p-3 border-0 border-b border-solid border-green-200">
<p <p
className={`text-base lg:text-tiny font-bold className={`text-base lg:text-tiny font-bold
${selectedVideo?.id === video?.id ? "text-white" : ""}`} ${selectedVideo?.id === video?.id ? "text-white" : ""}`}

@ -47,7 +47,7 @@ export const Dialog = ({ dialog, setDialog }) => {
{text} {text}
</p> </p>
{type === "confirm" && ( {type === "confirm" && (
<div className="flex flex-row gap-4 w-full"> <div className="flex gap-4 w-full">
<button <button
className="py-2.5 w-1/2 shadow-md rounded-sm bg-blueC0 text-white" className="py-2.5 w-1/2 shadow-md rounded-sm bg-blueC0 text-white"
onClick={() => acceptFunc()} onClick={() => acceptFunc()}
@ -63,7 +63,7 @@ export const Dialog = ({ dialog, setDialog }) => {
</div> </div>
)} )}
{type === "alert" && ( {type === "alert" && (
<div className="flex flex-row gap-4 w-full"> <div className="flex gap-4 w-full">
<button <button
className="py-2.5 w-full shadow-md rounded-sm bg-blue-400 text-white" className="py-2.5 w-full shadow-md rounded-sm bg-blue-400 text-white"
onClick={() => setDialog({ ...dialog, open: !dialog.open })} onClick={() => setDialog({ ...dialog, open: !dialog.open })}

@ -238,7 +238,7 @@ const MyDrawer = ({
className="flex flex-col justify-between h-1/6 pt-3 px-3 bg-green-500 dark:bg-blue90" className="flex flex-col justify-between h-1/6 pt-3 px-3 bg-green-500 dark:bg-blue90"
style={{ minHeight: "calc(100vh / 6)" }} style={{ minHeight: "calc(100vh / 6)" }}
> >
<div className="flex flex-row justify-between"> <div className="flex justify-between">
<Avatar size={70} rounded={true} /> <Avatar size={70} rounded={true} />
<img <img
src={isDark ? sunIcon : moonIcon} src={isDark ? sunIcon : moonIcon}
@ -247,7 +247,7 @@ const MyDrawer = ({
onClick={() => changeDarkMode(!isDark)} onClick={() => changeDarkMode(!isDark)}
/> />
</div> </div>
<div className="flex flex-row justify-between px-2 pb-3 mt-1"> <div className="flex justify-between px-2 pb-3 mt-1">
<div className="flex flex-col"> <div className="flex flex-col">
<strong className="text-lg text-white"> <strong className="text-lg text-white">
{user && user?.firstName + " " + user?.lastName} {user && user?.firstName + " " + user?.lastName}
@ -274,7 +274,7 @@ const MyDrawer = ({
<ul className="h-full flex flex-col py-6 px-4 gap-6"> <ul className="h-full flex flex-col py-6 px-4 gap-6">
{(!user ? publicLink : privateLink).map((item, key) => ( {(!user ? publicLink : privateLink).map((item, key) => (
<Link to={item.link} key={key} onClick={() => item.onClick()}> <Link to={item.link} key={key} onClick={() => item.onClick()}>
<div className="flex flex-row items-center"> <div className="flex items-center">
{item.icon} {item.icon}
<div className="text-gray70 text-tiny mr-5 dark:text-white"> <div className="text-gray70 text-tiny mr-5 dark:text-white">
{item.name} {item.name}

@ -53,10 +53,10 @@ const FooterDesign1 = ({ color, bg, items, hasHeader }) => {
</div> </div>
) : null} ) : null}
<footer <footer
className={`flex flex-col bg-gray-200 py-16 md:flex-row justify-around items-start md:items-start relative shadow-md z-20 ${bg}`} className={`flex flex-col bg-gray-200 py-16 md:justify-around items-start md:items-start relative shadow-md z-20 ${bg}`}
> >
<div className="w-11/12 flex justify-between"> <div className="w-11/12 flex justify-between">
<div className="flex flex-row gap-10"> <div className="flex gap-10">
{items.map((item, index) => ( {items.map((item, index) => (
<div className="flex flex-col" key={index}> <div className="flex flex-col" key={index}>
<strong className="text-xl text-gray70">{item.name}</strong> <strong className="text-xl text-gray70">{item.name}</strong>

@ -6,7 +6,7 @@ import arrowWhiteIcon from "../../assets/icons/arrow-left-white.svg";
function Header({ title, link, isDark }) { function Header({ title, link, isDark }) {
return ( return (
<header className="w-full flex flex-row justify-between items-center pl-0"> <header className="w-full flex justify-between items-center pl-0">
<strong className="text-green7B dark:text-white font-semibold text-base lg:text-sm"> <strong className="text-green7B dark:text-white font-semibold text-base lg:text-sm">
{title} {title}
</strong> </strong>

@ -70,24 +70,52 @@ function Navbar({
} }
}, [isLogin]); }, [isLogin]);
return isMobile ? ( return (
<div <div
className={_.join( className="z-50 flex fixed left-0 top-0 w-full"
[
"z-50 flex flex-1 flex-row fixed left-0 top-0 justify-between w-full lg:bg-opacity-20 lg:bg-transparent lg:shadow-sm lg:backdrop-filter lg:backdrop-blur-md lg:px-5 xl:px-10 transition-all duration-300",
],
" "
)}
style={{ style={{
backgroundColor: !top ? (isDark ? "#061B30" : "white") : "", backgroundColor: !top ? (isDark ? "#061B30" : "white") : "",
}} }}
> >
{/* landscape start */} <div className="w-full lg:w-11/12 lg:mx-auto relative flex items-center justify-between py-3 px-4 bg-white">
{/* landscape end */} {/* desktop */}
{/* portrait start */} <div className=" items-center hidden lg:flex">
<Link
to="/"
className="flex items-center text-2xl font-black text-green7B"
>
<img src={logoIcon} className="w-8 relative bottom-1 ml-1" alt="" />
{window.t("دانوین")}
</Link>
<div className="w-full h-full relative flex flex-row items-center justify-between lg:hidden py-3 px-4"> <ul className="flex list-none items-center relative top-0.5 mr-4">
<div className="relative"> {pages.map((page, index) => (
<li key={index}>
<NavLink
to={page.link}
className="text-tiny py-2 px-4 mx-4"
style={({ isActive }) => ({
color: isActive ? "rgb(19, 123, 79)" : "#202020",
fontWeight: isActive ? "700" : "200",
})}
>
{page.name}
</NavLink>
</li>
))}
</ul>
</div>
{logo && (
<Link
to="/"
className="lg:hidden absolute left-1/2 transform -translate-y-1/2 top-1/2 -translate-x-1/2"
>
<img src={logoIcon} className="w-6 h-8" />
</Link>
)}
{/* desktop */}
{/* <div className="flex items-center"></div> */}
<div className="flex lg:hidden relative">
{hamburgerMenu && ( {hamburgerMenu && (
<> <>
<span className="w-2.5 h-2.5 rounded-full bg-redFF1 absolute -left-1 -top-1 animate-bounce"></span> <span className="w-2.5 h-2.5 rounded-full bg-redFF1 absolute -left-1 -top-1 animate-bounce"></span>
@ -113,29 +141,31 @@ function Navbar({
</strong> </strong>
)} )}
</div> </div>
{logo && ( <div className="flex items-center">
<Link {overLayer && (
to="/" <div
className="absolute left-1/2 transform -translate-y-1/2 top-1/2 -translate-x-1/2" className="z-30 w-screen h-full fixed top-0 right-0 backdrop-filter blur-sm bg-opacity-60 bg-gray-600"
> onClick={() => setOverLayer(false)}
<img src={logoIcon} className="w-6 h-8" /> >
</Link> <div className="relative w-full h-full">
)} <div
className="flex flex-col w-full absolute left-1/2 top-16 transform -translate-x-1/2 z-50 rounded-md"
<div className="flex flex-row items-center"> style={{ maxWidth: "calc(100vw / 3)" }}
onClick={(e) => e.stopPropagation()}
>
<Search onChange={(val) => setSearch(val)} />
{search && <SearchResult text={search} setText={setSearch} />}
</div>
</div>
</div>
)}
{qr && ( {qr && (
<> <>
<Link <Link
to="/scan" to="/scan"
className={_.join( className={`flex lg:hidden rounded-sm p-1.5 ${
[ isDark ? "bg-blueC0 bg-opacity-10 ml-2" : " ml-3 shadow-sm"
"rounded-sm p-1.5", }`}
isDark
? "bg-blueC0 bg-opacity-10 ml-2"
: " ml-3 shadow-sm",
],
" "
)}
style={{ style={{
border: `1px solid ${isDark ? "#D7E3FC20" : "#D7E3FC"}`, border: `1px solid ${isDark ? "#D7E3FC20" : "#D7E3FC"}`,
}} }}
@ -148,13 +178,9 @@ function Navbar({
</Link> </Link>
<Link <Link
to="/ar" to="/ar"
className={_.join( className={`flex lg:hidden rounded-sm p-1.5 ${
[ isDark ? "bg-blueC0 bg-opacity-10" : "shadow-sm"
"rounded-sm p-1.5", }`}
isDark ? "bg-blueC0 bg-opacity-10" : " shadow-sm",
],
" "
)}
style={{ style={{
border: `1px solid ${isDark ? "#D7E3FC20" : "#D7E3FC"}`, border: `1px solid ${isDark ? "#D7E3FC20" : "#D7E3FC"}`,
}} }}
@ -173,7 +199,7 @@ function Navbar({
isDark ? bookmarkDeactiveDarkIcon : bookmarkDeactiveLightIcon isDark ? bookmarkDeactiveDarkIcon : bookmarkDeactiveLightIcon
} }
alt="bookmark" alt="bookmark"
className="w-7" className="w-7 flex lg:hidden"
onClick={() => addToFavorite({ [bookmark]: location.getId() })} onClick={() => addToFavorite({ [bookmark]: location.getId() })}
/> />
)} )}
@ -181,134 +207,76 @@ function Navbar({
<img <img
src={isDark ? dotsMenuDarkIcon : dotsMenuLightIcon} src={isDark ? dotsMenuDarkIcon : dotsMenuLightIcon}
alt="menu" alt="menu"
className="w-7 mr-2" className="w-7 mr-2 flex lg:hidden"
/> />
)} )}
{title && back ? ( {title && back ? (
<img <img
src={isDark ? arrowWhiteIcon : arrowBlueIcon} src={isDark ? arrowWhiteIcon : arrowBlueIcon}
alt="back" alt="back"
className={`w-6 transform ${isDark ? "" : "-rotate-180"}`} className={`w-6 flex lg:hidden transform ${
isDark ? "" : "-rotate-180"
}`}
onClick={() => navigation(-1)} onClick={() => navigation(-1)}
/> />
) : null} ) : null}
</div> {/* desktop */}
</div> <select
style={{ width: "100px" }}
className="hidden lg:flex items-center text-blueC0 border border-blueC0 px-1 rounded base py-1.5 ml-4 cursor-pointer"
>
{language.map((item, index) => (
<option
className="border border-blueC0 shadow-0 text-blueC0 text-base "
key={index}
>
{item.name}
</option>
))}
</select>
<Drawer drawerOpen={drawerOpen} setDrawerOpen={setDrawerOpen} /> <img
{/* portrait end */} src={searchIcon}
</div> alt=""
) : ( className="w-7 ml-3 cursor-pointer lg:flex hidden"
<header onClick={() => setOverLayer(true)}
className={`w-full border-b border-gray-200 border-solid fixed top-0 right-0 bg-white z-20`} />
style={{ boxShadow: "0px 0px 10px rgba(0,0,0,0.1)" }}
>
<div className={`w-11/12 mx-auto flex flex-col`}>
<div className="w-full flex flex-row items-center py-3 relative justify-between h-ful">
<div className="flex flex-row items-center">
<Link
to="/"
className="flex flex-row items-center text-2xl font-black text-green7B"
>
<img
src={logoIcon}
className="w-8 relative bottom-1 ml-1"
alt=""
/>
{window.t("دانوین")}
</Link>
<ul className="flex flex-row list-none items-center relative top-0.5 mr-6"> {isLogin && (
{pages.map((page, index) => ( <div className="hidden lg:flex justify-end items-center gap-4">
<li key={index}> <Link to="/cart" className="relative">
<NavLink <img src={cartIcon} alt="" className="w-8" />
to={page.link} <span className="absolute -right-2 -top-0.5 w-4 p-2.5 h-4 flex justify-center items-center bg-green-700 bg-opacity-100 rounded-full text-white text-xs">
className="text-tiny py-2 px-4 mx-4" {cartProductsLength}
style={({ isActive }) => ({ </span>
color: isActive ? "rgb(19, 123, 79)" : "#202020", </Link>
fontWeight: isActive ? "700" : "200", {/* <img src={whiteCartIcon} alt="" className="w-5 h-5 ml-2" /> */}
})}
>
{page.name}
</NavLink>
</li>
))}
</ul>
</div>
{overLayer && ( {/* <img src={profileIcon} alt="" className="w-5 h-5" /> */}
<div
className="z-30 w-screen h-full fixed top-0 right-0 backdrop-filter blur-sm bg-opacity-60 bg-gray-600"
onClick={() => setOverLayer(false)}
>
<div className="relative w-full h-full">
<div
className="flex flex-col w-full absolute left-1/2 top-16 transform -translate-x-1/2 z-50 rounded-md"
style={{ maxWidth: "calc(100vw / 3)" }}
onClick={(e) => e.stopPropagation()}
>
<Search onChange={(val) => setSearch(val)} />
{search && <SearchResult text={search} setText={setSearch} />}
</div>
</div>
</div> </div>
)} )}
<div className="flex flex-row items-center"> {!isLogin ? (
<select <Link
style={{ width: "100px" }} to="/signup"
className="flex items-center text-blueC0 border border-blueC0 px-1 rounded base py-1.5 ml-4 cursor-pointer" className="bg-blueC0 font-semibold text-white rounded-md px-4 py-3 text-sm mr-7 hover:bg-opacity-90 shadow-sm"
> >
{language.map((item, index) => ( {window.t("ورود یا ثبت نام")}
<option </Link>
className="border border-blueC0 shadow-0 text-blueC0 text-base " ) : (
key={index} <Link
> to="/dashboard"
{item.name} className="hidden lg:flex bg-blueC0 font-semibold text-white rounded-md px-4 py-3 text-sm mr-7 hover:bg-opacity-90 shadow-sm"
</option> >
))} {window.t("حساب کاربری")}
</select> </Link>
)}
<img {/* desktop */}
src={searchIcon}
alt=""
className="w-7 ml-3 cursor-pointer"
onClick={() => setOverLayer(true)}
/>
{isLogin && (
<div className="flex justify-end items-center gap-4">
<Link to="/cart" className="relative">
<img src={cartIcon} alt="" className="w-8" />
<span className="absolute -right-2 -top-0.5 w-4 p-2.5 h-4 flex justify-center items-center bg-green-700 bg-opacity-100 rounded-full text-white text-xs">
{cartProductsLength}
</span>
</Link>
{/* <img src={whiteCartIcon} alt="" className="w-5 h-5 ml-2" /> */}
{/* <img src={profileIcon} alt="" className="w-5 h-5" /> */}
</div>
)}
{!isLogin ? (
<Link
to="/signup"
className="bg-blueC0 font-semibold text-white rounded-md px-4 py-3 text-sm mr-7 hover:bg-opacity-90 shadow-sm"
>
{window.t("ورود یا ثبت نام")}
</Link>
) : (
<Link
to="/dashboard"
className="bg-blueC0 font-semibold text-white rounded-md px-4 py-3 text-sm mr-7 hover:bg-opacity-90 shadow-sm"
>
{window.t("حساب کاربری")}
</Link>
)}
</div>
</div> </div>
</div> </div>
</header>
<Drawer drawerOpen={drawerOpen} setDrawerOpen={setDrawerOpen} />
</div>
); );
} }

@ -2,7 +2,7 @@ import React from "react";
function OR({}) { function OR({}) {
return ( return (
<div className="w-full flex flex-row justify-between items-center my-3 lg:my-5"> <div className="w-full flex justify-between items-center my-3 lg:my-5">
<div <div
style={{ width: "43%", height: 1, backgroundColor: "#EFEFEF" }} style={{ width: "43%", height: 1, backgroundColor: "#EFEFEF" }}
></div> ></div>

@ -13,7 +13,7 @@ const ProductImage = ({ images }) => {
} }
}, [images]); }, [images]);
return ( return (
<div className="flex flex-row w-1/3 gap-2"> <div className="flex w-1/3 gap-2">
<div <div
className="flex flex-col items-center justify-between w-1/5" className="flex flex-col items-center justify-between w-1/5"
style={{ height: "calc(100vw / 5)" }} style={{ height: "calc(100vw / 5)" }}

@ -37,8 +37,8 @@ const ProductStatusCard = ({
return ( return (
<section className="w-full" style={{ minWidth: 350 }}> <section className="w-full" style={{ minWidth: 350 }}>
<div className="bg-grayF9 rounded-md px-4 py-2 divide-y divide-solid divide-gray-200"> <div className="bg-grayF9 rounded-md px-4 py-2 divide-y divide-solid divide-gray-200">
<div className="flex flex-row items-center justify-between py-3"> <div className="flex items-center justify-between py-3">
<div className="flex flex-row items-center"> <div className="flex items-center">
<img src={tick} alt="" className="w-8" /> <img src={tick} alt="" className="w-8" />
<div className="flex flex-col mr-3"> <div className="flex flex-col mr-3">
<div className="text-sm">{`${window.t( <div className="text-sm">{`${window.t(
@ -49,8 +49,8 @@ const ProductStatusCard = ({
</div> </div>
{seller && ( {seller && (
<div className="flex flex-row items-center justify-between py-3"> <div className="flex items-center justify-between py-3">
<div className="flex flex-row items-center"> <div className="flex items-center">
<img src={shop} alt="" className="w-8" /> <img src={shop} alt="" className="w-8" />
<div className="flex flex-1 flex-col mr-3 text-sm gap-2"> <div className="flex flex-1 flex-col mr-3 text-sm gap-2">
<div className="text-tiny">{"فروشنده" + " " + seller.name}</div> <div className="text-tiny">{"فروشنده" + " " + seller.name}</div>
@ -63,11 +63,11 @@ const ProductStatusCard = ({
</div> </div>
)} )}
<div className="flex flex-row items-center justify-between py-3"> <div className="flex items-center justify-between py-3">
<div className="flex flex-row items-center"> <div className="flex items-center">
<img src={delivery} alt="" className="w-8" /> <img src={delivery} alt="" className="w-8" />
<div className="flex flex-col mr-3"> <div className="flex flex-col mr-3">
<div className="flex flex-row gap-1 text-sm"> <div className="flex gap-1 text-sm">
&nbsp;{shippingTime} &nbsp;{shippingTime}
</div> </div>
</div> </div>
@ -75,18 +75,18 @@ const ProductStatusCard = ({
</div> </div>
{garanty && ( {garanty && (
<div className="flex flex-row items-center justify-between py-3"> <div className="flex items-center justify-between py-3">
<div className="flex flex-row items-center"> <div className="flex items-center">
<img src={shield} alt="" className="w-8" /> <img src={shield} alt="" className="w-8" />
<div className="flex flex-col mr-3"> <div className="flex flex-col mr-3">
<div className="flex flex-row gap-1 text-sm">{garanty}</div> <div className="flex gap-1 text-sm">{garanty}</div>
</div> </div>
</div> </div>
</div> </div>
)} )}
{bookmark && ( {bookmark && (
<div className="flex flex-row items-center py-3"> <div className="flex items-center py-3">
<img <img
src={ src={
isDark ? bookmarkDeactiveDarkIcon : bookmarkDeactiveLightIcon isDark ? bookmarkDeactiveDarkIcon : bookmarkDeactiveLightIcon
@ -141,7 +141,7 @@ const ProductStatusCard = ({
} }
/> />
</div> </div>
<div className="bg-grayF9 rounded px-4 py-2 mt-4 flex flex-row items-center"> <div className="bg-grayF9 rounded px-4 py-2 mt-4 flex items-center">
<div> <div>
<img src={arrow} alt="" className="w-20 h-20" /> <img src={arrow} alt="" className="w-20 h-20" />
</div> </div>

@ -46,10 +46,10 @@ const ProductSuggestion = ({
{window.t("این کالاها برای خرید به شما پیشنهام می دهیم")} {window.t("این کالاها برای خرید به شما پیشنهام می دهیم")}
</h2> </h2>
{/* product design */} {/* product design */}
<div className="flex flex-row flex-wrap items-center justify-center mt-5 w-full gap-10"> <div className="flex flex-wrap items-center justify-center mt-5 w-full gap-10">
{similarList.map((book, index) => ( {similarList.map((book, index) => (
<div <div
className="flex flex-row mb-7 justify-center relative" className="flex mb-7 justify-center relative"
style={{ maxWidth: "calc(100% / 5)" }} style={{ maxWidth: "calc(100% / 5)" }}
key={index} key={index}
> >
@ -98,7 +98,7 @@ const ProductSuggestion = ({
</div> </div>
{/* bottom */} {/* bottom */}
<div className="flex flex-col justify-center items-center mt-4"> <div className="flex flex-col justify-center items-center mt-4">
<div className="flex flex-row mb-5"> <div className="flex mb-5">
<p className="text-base text-productPrice font-bold"> <p className="text-base text-productPrice font-bold">
&nbsp; &nbsp;
{window.t("جمع لوازم اختیاری خریداری شده")} {window.t("جمع لوازم اختیاری خریداری شده")}

@ -7,7 +7,7 @@ const ProductTab = ({ tabs }) => {
return ( return (
<section className="mt-10 flex flex-col w-full"> <section className="mt-10 flex flex-col w-full">
<div className="rounded-md bg-grayF9"> <div className="rounded-md bg-grayF9">
<ul className="flex flex-row justify-center gap-16"> <ul className="flex justify-center gap-16">
{tabs.map((tab, index) => {tabs.map((tab, index) =>
tab.shown ? ( tab.shown ? (
<li <li

@ -14,8 +14,8 @@ const QandA = ({ comments }) => {
return ( return (
<> <>
<div className="flex flex-col leading-7 w-full py-6 border-t-2 border-solid border-gray-200"> <div className="flex flex-col leading-7 w-full py-6 border-t-2 border-solid border-gray-200">
<header className="w-full flex flex-row justify-between py-1"> <header className="w-full flex justify-between py-1">
<div className="flex flex-row items-end"> <div className="flex items-end">
<div className="flex items-center"> <div className="flex items-center">
<strong className="text-lg mx-2">{comment.username}</strong> <strong className="text-lg mx-2">{comment.username}</strong>
{comment.isCostumer ? ( {comment.isCostumer ? (
@ -26,7 +26,7 @@ const QandA = ({ comments }) => {
</div> </div>
</div> </div>
<div <div
className="flex flex-row divide-x divide-gray-300 divided items-center" className="flex divide-x divide-gray-300 divided items-center"
style={{ direction: "ltr" }} style={{ direction: "ltr" }}
> >
<span className="px-2 text-sm text-blue-400"> <span className="px-2 text-sm text-blue-400">
@ -38,11 +38,11 @@ const QandA = ({ comments }) => {
</span> </span>
</div> </div>
</header> </header>
<div className="flex flex-row py-4"> <div className="flex py-4">
<div style={{ width: 60 }} className="min-h-full"></div> <div style={{ width: 60 }} className="min-h-full"></div>
<div className="flex flex-1 flex-col px-3"> <div className="flex flex-1 flex-col px-3">
<header className="w-full flex flex-row justify-between items-center"> <header className="w-full flex justify-between items-center">
<div className="flex flex-row items-center"> <div className="flex items-center">
<div className="py-4 px-6 bg-blue-100 text-gray-400 rounded"> <div className="py-4 px-6 bg-blue-100 text-gray-400 rounded">
<h1>{window.t("پرسش")}</h1> <h1>{window.t("پرسش")}</h1>
</div> </div>
@ -58,11 +58,11 @@ const QandA = ({ comments }) => {
{comment.answers.length > 0 ? ( {comment.answers.length > 0 ? (
comment.answers.slice(0, numberOfAnswers).map((item, index) => ( comment.answers.slice(0, numberOfAnswers).map((item, index) => (
<div className="flex flex-row py-1" key={index}> <div className="flex py-1" key={index}>
<div style={{ width: 60 }} className="min-h-full"></div> <div style={{ width: 60 }} className="min-h-full"></div>
<div className="flex flex-1 flex-col px-3"> <div className="flex flex-1 flex-col px-3">
<header className="w-full flex flex-row justify-between items-center"> <header className="w-full flex justify-between items-center">
<div className="flex flex-row items-center"> <div className="flex items-center">
<div className="py-4 px-6 bg-green-100 text-gray-400 rounded"> <div className="py-4 px-6 bg-green-100 text-gray-400 rounded">
<h1>{window.t("پاسخال پاسخ")}</h1> <h1>{window.t("پاسخال پاسخ")}</h1>
</div> </div>
@ -79,8 +79,8 @@ const QandA = ({ comments }) => {
</div> </div>
)) ))
) : ( ) : (
<header className="w-full flex flex-row justify-between items-center"> <header className="w-full flex justify-between items-center">
<div className="flex w-4/5 flex-row items-center"> <div className="flex w-4/5 items-center">
<div className="py-4 px-6 bg-green-100 text-gray-400 mx-16 rounded"> <div className="py-4 px-6 bg-green-100 text-gray-400 mx-16 rounded">
<h1>{window.t("ارسال پاسخ")}</h1> <h1>{window.t("ارسال پاسخ")}</h1>
</div> </div>

@ -55,9 +55,9 @@ export default function VerticalExpandableProductFilter(props) {
(item1, i) => ( (item1, i) => (
<li <li
key={i} key={i}
className="hover:bg-gray-100 px-3 flex flex-row items-center justify-between py-2" className="hover:bg-gray-100 px-3 flex items-center justify-between py-2"
> >
<div className="flex flex-row items-center"> <div className="flex items-center">
<Checkbox <Checkbox
name={`ch${name}_${i}`} name={`ch${name}_${i}`}
checked={true} checked={true}

@ -7,7 +7,9 @@ const blog = {
info: (data) => async (dispatch) => info: (data) => async (dispatch) =>
await proxy.get("public/blogInfo", data, { dispatch }), await proxy.get("public/blogInfo", data, { dispatch }),
active: (data) => async (dispatch) => active: (data) => async (dispatch) =>
await dispatch({ type: "public/active", data }), await dispatch({ type: "blog/active", data }),
setActiveHashtag: (data) => async (dispatch) =>
await dispatch({ type: "blog/activeHashtag", data }),
letterAdd: (data) => async (dispatch) => letterAdd: (data) => async (dispatch) =>
await proxy.post("news/LetterAdd", data, { dispatch }), await proxy.post("news/LetterAdd", data, { dispatch }),
}; };

@ -0,0 +1,6 @@
const config = {
setDevice: (data) => async (dispatch) =>
await dispatch({ type: "config/setDevice", data }),
};
export default config;

@ -18,4 +18,5 @@ export {default as qr} from "./qr";
export {default as comment} from "./comment"; export {default as comment} from "./comment";
export {default as form} from "./form"; export {default as form} from "./form";
export {default as dialog} from "./dialog"; export {default as dialog} from "./dialog";
export {default as menu} from "./menu"; export {default as menu} from "./menu";
export {default as config} from "./config";

@ -5,31 +5,37 @@ const initialState = {
error: null, error: null,
list: [], list: [],
info: null, info: null,
hashtags : [], hashtags: [],
active: null, active: null,
activeHashtag: "همه",
}; };
export default function blog(state = initialState, action) { export default function blog(state = initialState, action) {
let { type, data } = action; let { type, data } = action;
switch (type) { switch (type) {
case "blog/activeHashtag":
return {
...state,
activeHashtag: data,
};
case "public/blogList": case "public/blogList":
return { return {
...state, ...state,
loading: false, loading: false,
list: data, list: data,
hashtags: [...new Set(data.map((object) => object.tag))], hashtags: ["همه", ...new Set(data.map((object) => object.tag))],
error: null, error: null,
}; };
case "public/active": case "blog/active":
return { return {
...state, ...state,
active : data, active: data,
loading: false, loading: false,
error: null, error: null,
}; };
case "public/blogInfo": case "public/blogInfo":
return { ...state, loading: false, error: null, blog: data }; return { ...state, loading: false, error: null, blog: data };
case "news/LetterAdd": case "news/LetterAdd":
toast.success('.به خبرنامه دانوین خوش آمدید'); toast.success(".به خبرنامه دانوین خوش آمدید");
return { ...state, loading: false, error: null }; return { ...state, loading: false, error: null };
case "blog/loading": case "blog/loading":
return { ...state, loading: true }; return { ...state, loading: true };

@ -0,0 +1,16 @@
const initialState = {
device: "mobile",
};
export default function config(state = initialState, action) {
let { type, data } = action;
switch (type) {
case "config/setDevice":
return {
...state,
device: data,
};
default:
return state;
}
}

@ -18,4 +18,5 @@ export {default as qr} from "./qr";
export {default as comment} from "./comment"; export {default as comment} from "./comment";
export {default as form} from "./form"; export {default as form} from "./form";
export {default as dialog} from "./dialog"; export {default as dialog} from "./dialog";
export {default as menu} from "./menu"; export {default as menu} from "./menu";
export {default as config} from "./config";

@ -2,7 +2,7 @@ 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 { Navigate } from "react-router-dom";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { publicApi, menu } from "./redux/actions"; import { publicApi, menu, config } from "./redux/actions";
import Navbar from "./components/Navbar"; import Navbar from "./components/Navbar";
import BG from "./components/BG"; import BG from "./components/BG";
import BottomNavigation from "./components/BottomNavigation"; import BottomNavigation from "./components/BottomNavigation";
@ -35,11 +35,56 @@ import Address from "./views/Address";
import Favorites from "./views/Favorites"; import Favorites from "./views/Favorites";
import Addresses from "./views/Dashboard/layouts/Mobile/ProfileAddress"; import Addresses from "./views/Dashboard/layouts/Mobile/ProfileAddress";
function Router({ isDark, isMobile, headerOptions, dialog, menu, setMenu }) { function Router({
isDark,
isMobile,
headerOptions,
dialog,
menu,
setMenu,
setDevice,
device,
}) {
useEffect(() => { useEffect(() => {
window.addEventListener("scroll", () => {}); const width = window.innerWidth;
if (width <= 640) {
setDevice("mobile");
}
if (width > 640 && width < 1024) {
setDevice("tablet");
}
if (width > 1024) {
setDevice("desktop");
}
}, []); }, []);
React.useEffect(() => {
window.addEventListener("resize", () => {
const width = window.innerWidth;
if (width <= 640) {
if (device === "mobile") {
return;
} else {
setDevice("mobile");
}
}
if (width > 640 && width < 1024) {
if (device === "tablet") {
return;
} else {
setDevice("tablet");
}
}
if (width > 1024) {
if (device === "desktop") {
return;
} else {
setDevice("desktop");
}
}
});
}, [device]);
const prevDefault = (e) => { const prevDefault = (e) => {
setMenu(); setMenu();
e.stopPropagation(); e.stopPropagation();
@ -535,16 +580,18 @@ function Router({ isDark, isMobile, headerOptions, dialog, menu, setMenu }) {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
isDark: state.publicApi.isDark, isDark: state.publicApi.isDark,
isMobile: state.publicApi.isMobile, isMobile: state.config.device === "mobile",
isLogin: state.user.status, isLogin: state.user.status,
headerOptions: state.publicApi.headerOptions, headerOptions: state.publicApi.headerOptions,
dialog: state.dialog.dialog, dialog: state.dialog.dialog,
menu: state.menu.open, menu: state.menu.open,
device: state.config.device,
}); });
const mapDispatchToProps = { const mapDispatchToProps = {
setDesktopContentTransform: publicApi.setDesktopContentTransform, setDesktopContentTransform: publicApi.setDesktopContentTransform,
setMenu: menu.set, setMenu: menu.set,
setDevice: config.setDevice,
}; };
export default connect(mapStateToProps, mapDispatchToProps)(Router); export default connect(mapStateToProps, mapDispatchToProps)(Router);

@ -17,8 +17,9 @@ function About({
first, first,
setHeaderOptions, setHeaderOptions,
}) { }) {
useEffect(() => { useEffect(() => {
setHeaderOptions({ shown: true }); setHeaderOptions({ shown: true, hamburgerMenu : true, logo: true, qr : true });
}, []); }, []);
useEffect(() => { useEffect(() => {
@ -26,8 +27,8 @@ function About({
}, []); }, []);
return ( return (
<div className={_.join(["about w-11/12 mx-auto flex flex-col"], " ")}> <div className="about w-11/12 mx-auto flex flex-col py-8 lg:py-16">
<main className="flex flex-col items-center pt-16 "> <main className="flex flex-col items-center">
<header> <header>
<h1>{first.title}</h1> <h1>{first.title}</h1>
<p <p

@ -1,4 +1,4 @@
$gray : #aaa; $gray : #818181;
$green3 : #00cc69; $green3 : #00cc69;
@ -6,7 +6,7 @@ $green3 : #00cc69;
main { main {
li::before { li::before {
color: $gray; color: $gray;
content: "\2022"; // content: "\2022";
font-weight: bold; font-weight: bold;
display: inline-block; display: inline-block;
width: 1em; width: 1em;

@ -4,7 +4,7 @@ import React from 'react'
import alertIcon from '../../../assets/icons/alert.svg'; import alertIcon from '../../../assets/icons/alert.svg';
function Alert({text}) { function Alert({text}) {
return ( return (
<div className="flex flex-row items-center bg-blueFD rounded-md border border-solid border-blueC0 py-3 px-2 w-full my-3 dark:bg-opacity-5"> <div className="flex items-center bg-blueFD rounded-md border border-solid border-blueC0 py-3 px-2 w-full my-3 dark:bg-opacity-5">
<img src={alertIcon} alt="" /> <img src={alertIcon} alt="" />
<p className="text-blueC0 text-xs mr-3 dark:text-white leading-5 lg:text-sm"> <p className="text-blueC0 text-xs mr-3 dark:text-white leading-5 lg:text-sm">
{text} {text}

@ -286,7 +286,7 @@ export const Address = ({
const Header = ({ title, text }) => { const Header = ({ title, text }) => {
return ( return (
<div className="flex flex-col lg:flex-row lg:items-center gap-2 lg:mb-4 mt-2 lg:mt-0"> <div className="flex flex-col lg:lg:items-center gap-2 lg:mb-4 mt-2 lg:mt-0">
<strong className="text-green4F text-base dark:text-white"> <strong className="text-green4F text-base dark:text-white">
{title} {title}
</strong> </strong>
@ -335,7 +335,7 @@ export const Address = ({
onClick={() => submit()} onClick={() => submit()}
/> />
<button <button
className="bg-transparent mt-4 text-base lg:text-tiny border border-blueC0 text-blueC0 font-bold rounded-md py-3.5 lg:py-4 flex flex-row justify-center items-center" className="bg-transparent mt-4 text-base lg:text-tiny border border-blueC0 text-blueC0 font-bold rounded-md py-3.5 lg:py-4 flex justify-center items-center"
onClick={() => { onClick={() => {
setPhase("deliveryForm"); setPhase("deliveryForm");
navigation(-1); navigation(-1);
@ -363,7 +363,7 @@ export const Address = ({
<div className="flex item-center gap-x-4"> <div className="flex item-center gap-x-4">
{/* my self */} {/* my self */}
<div <div
className={`flex flex-row items-center mb-7 cursor-pointer className={`flex items-center mb-7 cursor-pointer
`} `}
onClick={() => { onClick={() => {
setActiveCheckbox(true); setActiveCheckbox(true);
@ -380,7 +380,7 @@ export const Address = ({
</div> </div>
{/* someone else */} {/* someone else */}
<div <div
className={`flex flex-row items-center mb-7 cursor-pointer className={`flex items-center mb-7 cursor-pointer
`} `}
onClick={() => { onClick={() => {
setActiveCheckbox(false); setActiveCheckbox(false);
@ -410,7 +410,7 @@ export const Address = ({
)} )}
/> />
<div className="flex flex-col lg:flex-row items-center lg:gap-5 w-full mb-4"> <div className="flex flex-col lg:items-center lg:gap-5 w-full mb-4">
<Input <Input
width={isMobile ? "100%" : "50%"} width={isMobile ? "100%" : "50%"}
label={window.t("نام")} label={window.t("نام")}
@ -457,7 +457,7 @@ export const Address = ({
)} )}
/> />
<div className="flex flex-col lg:flex-row items-center lg:gap-5 w-full mb-4"> <div className="flex flex-col lg:items-center lg:gap-5 w-full mb-4">
<Input <Input
width={isMobile ? "100%" : "50%"} width={isMobile ? "100%" : "50%"}
label={window.t("شماره موبایل")} label={window.t("شماره موبایل")}
@ -526,7 +526,7 @@ export const Address = ({
)} )}
/> />
<div className="flex flex-col lg:flex-row items-center gap-3 lg:gap-5 w-full"> <div className="flex flex-col lg:items-center gap-3 lg:gap-5 w-full">
<Select <Select
selectProvince={"استان"} selectProvince={"استان"}
options={provinces.map((e) => ({ value: e.id, name: e.name }))} options={provinces.map((e) => ({ value: e.id, name: e.name }))}

@ -422,7 +422,7 @@ function Profile({
</div> </div>
) : ( ) : (
<ul className="flex flex-col flex-1"> <ul className="flex flex-col flex-1">
<li className="flex flex-row gap-5"> <li className="flex gap-5">
<div className="flex flex-col w-4/12"> <div className="flex flex-col w-4/12">
<strong>{window.t(" اطلاعات هویتی")}</strong> <strong>{window.t(" اطلاعات هویتی")}</strong>
<p> <p>
@ -431,7 +431,7 @@ function Profile({
)} )}
</p> </p>
</div> </div>
<div className="flex flex-row w-8/12"></div> <div className="flex w-8/12"></div>
</li> </li>
</ul> </ul>
); );

@ -143,7 +143,7 @@ function SignUp({
return ( return (
<div <div
className="w-screen overflow-x-hidden flex flex-row transform relative" className="w-screen overflow-x-hidden flex transform relative"
style={{ height: "calc(100vh - 160px)" }} style={{ height: "calc(100vh - 160px)" }}
> >
<button <button
@ -308,7 +308,7 @@ function SignUp({
level === "phonenumber" ? checkPhoneNumber(e) : checkOtp(e) level === "phonenumber" ? checkPhoneNumber(e) : checkOtp(e)
} }
/> />
<div className="mt-10 flex flex-row text-center w-full justify-center"> <div className="mt-10 flex text-center w-full justify-center">
<div className="text-sm text-gray1 dark:text-gray-200 lg:text-sm"> <div className="text-sm text-gray1 dark:text-gray-200 lg:text-sm">
{window.t(" شماره خود را اشتباه وارد کردید؟")} {window.t(" شماره خود را اشتباه وارد کردید؟")}
<button <button

@ -131,7 +131,7 @@ export const Blog = ({
}} }}
></div> ></div>
)} )}
<div className="flex lg:flex-row my-5 gap-5"> <div className="flex lg:my-5 gap-5">
<strong className="flex-1 lg:text-5xl lg:font-black dark:text-gray-200"> <strong className="flex-1 lg:text-5xl lg:font-black dark:text-gray-200">
{blog?.title} {blog?.title}
</strong> </strong>

@ -4,6 +4,7 @@ import { blog, publicApi } from "../../redux/actions";
import { Carousel } from "@trendyol-js/react-carousel"; import { Carousel } from "@trendyol-js/react-carousel";
import Hashtags from "./layouts/Hashtags"; import Hashtags from "./layouts/Hashtags";
import Blog from "./layouts/Blog";
import Single from "./layouts/Single"; import Single from "./layouts/Single";
import Join from "./layouts/Join"; import Join from "./layouts/Join";
import New from "./layouts/New"; import New from "./layouts/New";
@ -14,7 +15,13 @@ import Target from "./layouts/Target";
//assets //assets
import arrow from "../../assets/icons/dropdown-blue.svg"; import arrow from "../../assets/icons/dropdown-blue.svg";
export const Blogs = ({ isMobile, getList, blogs, setHeaderOptions }) => { export const Blogs = ({
isMobile,
getList,
blogs,
setHeaderOptions,
activeHashtag,
}) => {
useEffect(() => { useEffect(() => {
if (isMobile) { if (isMobile) {
setHeaderOptions({ setHeaderOptions({
@ -33,91 +40,104 @@ export const Blogs = ({ isMobile, getList, blogs, setHeaderOptions }) => {
}, []); }, []);
return ( return (
<div className="flex w-full px-4 lg:px-0 flex-col lg:w-11/12 mx-auto lg:py-24 pb-24 lg:pb-0 "> <div className="flex w-full px-4 lg:px-0 flex-col lg:w-11/12 mx-auto lg:py-24 pb-24 lg:pb-16">
<Hashtags /> <Hashtags />
<Single /> {activeHashtag === "همه" ? (
<Header title={window.t(" تازهترینها از وبلاگ")} /> <>
{isMobile ? ( <Single />
<div className="w-full flex overflow-x-scroll no-scrollbar gap-4"> <Header title={window.t(" تازهترینها از وبلاگ")} />
{blogs.map((blog, index) => ( <div className=" w-full flex lg:hidden overflow-x-scroll no-scrollbar gap-4">
<New blog={blog} key={index} /> {blogs.map((blog, index) => (
))} <New blog={blog} key={index} />
</div> ))}
) : ( </div>
<div className="w-full relative" style={{ direction: "ltr" }}> <div
{blogs.length > 0 && ( className="hidden lg:flex w-full relative"
<Carousel style={{ direction: "ltr" }}
show={3} >
slide={2} {blogs.length > 0 && (
swiping={true} <Carousel
useArrowKeys={true} show={3}
transition={0.5} slide={2}
rightArrow={ swiping={true}
<img useArrowKeys={true}
className="absolute top-1/2 transform -rotate-90 -translate-y-1/2 cursor-pointer p-0" transition={0.5}
src={arrow} rightArrow={
alt="" <img
// onClick={(e) => e.stopPropagation()} className="absolute top-1/2 transform -rotate-90 -translate-y-1/2 cursor-pointer p-0"
/> src={arrow}
} alt=""
leftArrow={ // onClick={(e) => e.stopPropagation()}
<img />
className="absolute top-1/2 transform -translate-y-1/2 -translate-x-5 cursor-pointer rotate-90 p-2 -left-3" }
src={arrow} leftArrow={
alt="" <img
// onClick={(e) => e.stopPropagation()} className="absolute top-1/2 transform -translate-y-1/2 -translate-x-5 cursor-pointer rotate-90 p-2 -left-3"
/> src={arrow}
} alt=""
> // onClick={(e) => e.stopPropagation()}
{blogs.map((blog, index) => ( />
<New blog={blog} key={index} /> }
))} >
</Carousel> {blogs.map((blog, index) => (
)} <New blog={blog} key={index} />
</div> ))}
)} </Carousel>
<Header title={window.t("پیشنهاد سردبیر")} /> )}
{isMobile ? ( </div>
<div className="w-full flex overflow-x-scroll no-scrollbar gap-4"> <Header title={window.t("پیشنهاد سردبیر")} />
{blogs.map((blog, index) => ( <div className="w-full flex lg:hidden overflow-x-scroll no-scrollbar gap-4">
<New blog={blog} key={index} /> {blogs.map((blog, index) => (
))} <New blog={blog} key={index} />
</div> ))}
</div>
<div
className="hidden lg:flex w-full relative"
style={{ direction: "ltr" }}
>
{blogs.length > 0 && (
<Carousel
show={4}
slide={2}
swiping={true}
useArrowKeys={true}
transition={0.5}
rightArrow={
<img
className="absolute top-1/2 transform -rotate-90 -translate-y-1/2 cursor-pointer p-0"
src={arrow}
alt=""
// onClick={(e) => e.stopPropagation()}
/>
}
leftArrow={
<img
className="absolute top-1/2 transform -translate-y-1/2 -translate-x-5 cursor-pointer rotate-90 p-2 -left-3"
src={arrow}
alt=""
// onClick={(e) => e.stopPropagation()}
/>
}
>
{blogs.map((blog, index) => (
<Suggest blog={blog} key={index} />
))}
</Carousel>
)}
</div>
<Header title={window.t("از دنیای آموزش")} />
<Target blogs={blogs?.slice(0, 4)} />
</>
) : ( ) : (
<div className="w-full relative" style={{ direction: "ltr" }}> <div className="flex flex-wrap items-center">
{blogs.length > 0 && ( {blogs
<Carousel ?.filter((blog) => blog?.tag === activeHashtag)
show={4} ?.map((blog, index) => (
slide={2} <Blog blog={blog} key={index} />
swiping={true} ))}
useArrowKeys={true}
transition={0.5}
rightArrow={
<img
className="absolute top-1/2 transform -rotate-90 -translate-y-1/2 cursor-pointer p-0"
src={arrow}
alt=""
// onClick={(e) => e.stopPropagation()}
/>
}
leftArrow={
<img
className="absolute top-1/2 transform -translate-y-1/2 -translate-x-5 cursor-pointer rotate-90 p-2 -left-3"
src={arrow}
alt=""
// onClick={(e) => e.stopPropagation()}
/>
}
>
{blogs.map((blog, index) => (
<Suggest blog={blog} key={index} />
))}
</Carousel>
)}
</div> </div>
)} )}
<Header title={window.t("از دنیای آموزش")} />
<Target blogs={blogs?.slice(0, 4)} />
<Join /> <Join />
</div> </div>
); );
@ -126,6 +146,7 @@ export const Blogs = ({ isMobile, getList, blogs, setHeaderOptions }) => {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
isMobile: state.publicApi.isMobile, isMobile: state.publicApi.isMobile,
blogs: state.blog.list, blogs: state.blog.list,
activeHashtag: state.blog.activeHashtag,
}); });
const mapDispatchToProps = { const mapDispatchToProps = {

@ -0,0 +1,45 @@
import React from "react";
import { connect } from "react-redux";
import { useNavigate } from "react-router-dom";
const height = {
mobile: "calc((100vw - 32px) / 16 * 9)",
tablet: "calc((100vw - 32px) / 16 * 9)",
desktop: "calc((100vw / 12 * 11) / 4 / 16 * 9)",
};
export const Blog = ({ blog, device }) => {
const navigation = useNavigate();
return (
<article className="flex w-full lg:w-1/4 p-2">
<div
className="cursor-pointer flex flex-col gap-4 w-full"
onClick={() =>
navigation(`/blogs/${blog?.id}`, { state: { id: blog?.id } })
}
>
<div
className="w-full rounded-md"
style={{
backgroundImage: `url(https://dnvn.ir/api/v1/file/${blog?.fileIds})`,
backgroundRepeat: "no-repeat",
backgroundPosition: "center",
backgroundSize: "cover",
minHeight: height[device],
}}
></div>
<strong className="text-sm lg:text-tiny xl:text-base text-backgroundText h-20">
{blog?.title}
</strong>
</div>
</article>
);
};
const mapStateToProps = (state) => ({
device: state.config.device,
});
const mapDispatchToProps = {};
export default connect(mapStateToProps, mapDispatchToProps)(Blog);

@ -1,17 +1,25 @@
import React from "react"; import React from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { blog } from "../../../redux/actions";
//assets //assets
import arrowIcon from "../arrow.svg"; import arrowIcon from "../arrow.svg";
export const Hashtags = ({ hashtags }) => { export const Hashtags = ({ hashtags, setActive, activeHashtag }) => {
return ( return (
<div className="flex py-3 px-2 rounded-full border-2 border-green-50 dark:border-opacity-20 shadow-sm border-solid items-center w-full mb-7 overflow-x-scroll no-scrollbar"> <div className="flex py-1 lg:py-3 px-2 rounded-full border-2 border-green-50 dark:border-opacity-20 shadow-sm border-solid items-center w-full mb-7 overflow-x-scroll no-scrollbar">
<img src={arrowIcon} alt="" className="w-7" /> <img src={arrowIcon} alt="" className="w-7" />
<ul className="list-none flex justify-around items-center lg:flex-1 lg:ml-0 ml-4"> <ul className="list-none flex items-center lg:flex-1 lg:ml-0 ml-4">
{hashtags.map((hashtag, index) => ( {hashtags.map((hashtag, index) => (
<li className="text-tiny font-semibold cursor-pointer mx-4 lg:px-0 flex-1"> <li
{hashtag} className={`text-tiny w-16 lg:w-28 font-medium cursor-pointer rounded-md text-center py-2 transition-all mx-4 flex-1 ${
activeHashtag === hashtag
? "bg-green-400 text-white"
: "text-green79"
}`}
onClick={() => setActive(hashtag)}
>
{"#" + hashtag}
</li> </li>
))} ))}
</ul> </ul>
@ -21,8 +29,11 @@ export const Hashtags = ({ hashtags }) => {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
hashtags: state.blog.hashtags, hashtags: state.blog.hashtags,
activeHashtag: state.blog.activeHashtag,
}); });
const mapDispatchToProps = {}; const mapDispatchToProps = {
setActive: blog.setActiveHashtag,
};
export default connect(mapStateToProps, mapDispatchToProps)(Hashtags); export default connect(mapStateToProps, mapDispatchToProps)(Hashtags);

@ -13,7 +13,7 @@ export const Join = ({ isMobile, join, userId }) => {
userId ? join({ userId, email }) : join({ email }); userId ? join({ userId, email }) : join({ email });
}; };
return ( return (
<div className="w-full lg:h-72 border-2 px-3 lg:p-0 py-4 border-solid border-gray-200 dark:border-opacity-30 rounded-md flex lg:flex-row flex-col-reverse mt-7 lg:mt-32"> <div className="w-full lg:h-72 border-2 px-3 lg:p-0 py-4 border-solid border-gray-200 dark:border-opacity-30 rounded-md flex lg:flex-col-reverse mt-7 lg:mt-32">
<img <img
src={picImage} src={picImage}
alt="" alt=""

@ -7,7 +7,7 @@ export const Single = ({ blog, isMobile }) => {
return ( return (
<Link <Link
to={"/blogs/" + blog?.id} to={"/blogs/" + blog?.id}
className="flex flex-col lg:flex-row lg:gap-5 overflow-y-hidden" className="flex flex-col lg:lg:gap-5 overflow-y-hidden"
> >
<div <div
className="w-full lg:w-1/2 rounded-md overflow-hidden relative" className="w-full lg:w-1/2 rounded-md overflow-hidden relative"

@ -78,12 +78,12 @@ export const Target = ({ blogs, isMobile }) => {
const Small = ({ blogs }) => { const Small = ({ blogs }) => {
return ( return (
<div className="w-full lg:w-1/2 flex flex-row flex-wrap lg:flex-col justify-between"> <div className="w-full lg:w-1/2 flex flex-wrap lg:flex-col justify-between">
{blogs.map((blog, index) => ( {blogs.map((blog, index) => (
<Link <Link
to={"/blogs/" + blog.id} to={"/blogs/" + blog.id}
key={index} key={index}
className="lg:mb-0 mb-3 lg:flex-row lg:flex lg:gap-2" className="lg:mb-0 mb-3 lg:lg:flex lg:gap-2"
style={{ width: isMobile ? "48%" : "100%" }} style={{ width: isMobile ? "48%" : "100%" }}
> >
<img <img
@ -115,7 +115,7 @@ export const Target = ({ blogs, isMobile }) => {
); );
}; };
return ( return (
<div className="flex flex-col lg:flex-row gap-10"> <div className="flex flex-col lg:gap-10">
<Large blog={blogs[0]} /> <Large blog={blogs[0]} />
<Small blogs={blogs?.slice(0, 3)} /> <Small blogs={blogs?.slice(0, 3)} />
</div> </div>

@ -48,7 +48,7 @@ function Contact({ headerOptions, setHeaderOptions, info, isMobile, isDark }) {
/> />
</div> </div>
) : ( ) : (
<div className="flex flex-row gap-10 transform -translate-y-12 w-11/12 mx-auto"> <div className="flex gap-10 transform -translate-y-12 w-11/12 mx-auto">
<div className="w-1/3"> <div className="w-1/3">
<Ticket /> <Ticket />
</div> </div>

@ -5,7 +5,7 @@ import { connect } from "react-redux";
function Info({ info, isDark }) { function Info({ info, isDark }) {
return ( return (
<div <div
className="flex flex-row py-4 px-3 rounded-md mt-4" className="flex py-4 px-3 rounded-md mt-4"
style={{ style={{
backgroundColor: info.bg, backgroundColor: info.bg,
border: `1px solid ${info.borderColor}`, border: `1px solid ${info.borderColor}`,

@ -30,7 +30,7 @@ export const Dashboard = ({ isMobile, headerOptions, setHeaderOptions }) => {
</div> </div>
) : ( ) : (
<div className="w-full"> <div className="w-full">
<div className="gap-5 w-full h-screen pt-20 mx-auto flex flex-row bg-transparent justify-end"> <div className="gap-5 w-full h-screen pt-20 mx-auto flex bg-transparent justify-end">
<Sidebar page={page} setPage={setPage} /> <Sidebar page={page} setPage={setPage} />
<Main page={page} /> <Main page={page} />
</div> </div>

@ -51,7 +51,7 @@ const ProfileAddress = ({
isMobile ? "p-0" : "px-10" isMobile ? "p-0" : "px-10"
} mx-auto`} } mx-auto`}
> >
<div className="w-full flex flex-row justify-between items-center mt-4"> <div className="w-full flex justify-between items-center mt-4">
<button <button
className={`flex justify-center text-tiny lg:text-sm rounded-md py-3 bg-grayF9 dark:bg-blueC0 dark:bg-opacity-30 cursor:pointer ${ className={`flex justify-center text-tiny lg:text-sm rounded-md py-3 bg-grayF9 dark:bg-blueC0 dark:bg-opacity-30 cursor:pointer ${
isDark ? "text-white" : "text-gray70" isDark ? "text-white" : "text-gray70"
@ -189,7 +189,7 @@ const Location = ({
<Link <Link
style={{ border: "solid 1px #12CF7F" }} style={{ border: "solid 1px #12CF7F" }}
to={"/editAddress/" + address.id} to={"/editAddress/" + address.id}
className="w-full flex flex-row text-sm items-center justify-between px-2 py-1 rounded-sm cursor-pointer" className="w-full flex text-sm items-center justify-between px-2 py-1 rounded-sm cursor-pointer"
onClick={() => setMenu()} onClick={() => setMenu()}
> >
{window.t("ویرایش")} {window.t("ویرایش")}
@ -197,7 +197,7 @@ const Location = ({
</Link> </Link>
<div <div
style={{ border: "solid 1px #fca5a5" }} style={{ border: "solid 1px #fca5a5" }}
class="w-full flex flex-row items-center justify-between px-2 py-1 rounded-sm cursor-pointer" class="w-full flex items-center justify-between px-2 py-1 rounded-sm cursor-pointer"
onClick={() => delAddress(address.id)} onClick={() => delAddress(address.id)}
> >
<button class="text-sm ">{window.t("حذف")}</button> <button class="text-sm ">{window.t("حذف")}</button>

@ -51,7 +51,7 @@ const List = ({ mobile }) => {
<Link <Link
key={index} key={index}
to={page.link} to={page.link}
className={`w-full flex items-center justify-between mb-6 pb-4 flex-row shadow-sm`} className={`w-full flex items-center justify-between mb-6 pb-4 shadow-sm`}
> >
<div className={`flex items-center flex-row`}> <div className={`flex items-center flex-row`}>
{page.icon} {page.icon}

@ -151,8 +151,8 @@ const Location = ({
</div> </div>
<div className={"flex flex-col flex-1 mr-2"}> <div className={"flex flex-col flex-1 mr-2"}>
{active && ( {active && (
<div className={"w-full flex flex-row justify-between mb-3"}> <div className={"w-full flex justify-between mb-3"}>
<div className={"flex flex-row items-center"}> <div className={"flex items-center"}>
<strong className={"text-base font-bold text-gray1"}> <strong className={"text-base font-bold text-gray1"}>
{window.t("آدرس انتخابی شما")} {window.t("آدرس انتخابی شما")}
</strong> </strong>

@ -6,9 +6,9 @@ const Trophy = ({}) => {
const [dropdown, setDropdown] = React.useState(true); const [dropdown, setDropdown] = React.useState(true);
return ( return (
<div <div
className={`w-full flex py-5 px-3 justify-between items-center flex-row bg-yellow4 bg-opacity-40`} className={`w-full flex py-5 px-3 justify-between items-center bg-yellow4 bg-opacity-40`}
> >
<div className={`flex flex-row items-center`}> <div className={`flex items-center`}>
<svg xmlns="http://www.w3.org/2000/svg" width={23.862} height={23.862}> <svg xmlns="http://www.w3.org/2000/svg" width={23.862} height={23.862}>
<g fill="none" stroke="#d6d020" data-name="vuesax/linear/cup"> <g fill="none" stroke="#d6d020" data-name="vuesax/linear/cup">
<path <path

@ -7,7 +7,7 @@ const User = ({ user, mobile }) => {
return ( return (
<div className={`w-full`}> <div className={`w-full`}>
<button <button
className={`w-full mt-2 mb-2 flex flex-row justify-between items-center border-none`} className={`w-full mt-2 mb-2 flex justify-between items-center border-none`}
onClick={() => setDropdown(!dropdown)} onClick={() => setDropdown(!dropdown)}
> >
<div className={`flex items-center flex-row`}> <div className={`flex items-center flex-row`}>
@ -49,7 +49,7 @@ const User = ({ user, mobile }) => {
}`} }`}
> >
<div <div
className={`flex items-center w-full pb-3 mb-3 flex-row border-b border-solid border-gray-100`} className={`flex items-center w-full pb-3 mb-3 border-b border-solid border-gray-100`}
> >
<strong className="text-sm text-gray1"> <strong className="text-sm text-gray1">
{window.t("افزودن حساب کاربری جدید")} {window.t("افزودن حساب کاربری جدید")}

@ -40,7 +40,7 @@ const SidebarMenu = ({
return ( return (
<div className="flex flex-col"> <div className="flex flex-col">
<div <div
className="flex flex-row justify-between items-center py-2 my-2 cursor-pointer group hover:bg-blueC0 hover:bg-opacity-10 rounded-md px-1" className="flex justify-between items-center py-2 my-2 cursor-pointer group hover:bg-blueC0 hover:bg-opacity-10 rounded-md px-1"
onClick={() => onClick={() =>
setToggleList({ ...toggleList, [name]: !toggleList[name] }) setToggleList({ ...toggleList, [name]: !toggleList[name] })
} }
@ -69,7 +69,7 @@ const SidebarMenu = ({
{list.map((item, index) => ( {list.map((item, index) => (
<li <li
key={index} key={index}
className={`flex flex-row items-center cursor-pointer rounded-md hover:bg-gray-100`} className={`flex items-center cursor-pointer rounded-md hover:bg-gray-100`}
onClick={() => (page !== item.value ? setPage(item.value) : {})} onClick={() => (page !== item.value ? setPage(item.value) : {})}
> >
<span <span
@ -150,7 +150,7 @@ const SidebarMenu = ({
}} }}
> >
{/* profile */} {/* profile */}
<div className="flex flex-row items-center mb-10"> <div className="flex items-center mb-10">
<Avatar size={60} rounded={true} /> <Avatar size={60} rounded={true} />
<p className="text-green7B font-bold text-base flex-1 mx-2"> <p className="text-green7B font-bold text-base flex-1 mx-2">
{user.firstName === null ? "" : user.firstName + " " + user.lastName} {user.firstName === null ? "" : user.firstName + " " + user.lastName}
@ -177,7 +177,7 @@ const SidebarMenu = ({
key={i} key={i}
> >
<div <div
className={`flex flex-row items-center cursor-pointer rounded-md py-0 my-3 px-1`} className={`flex items-center cursor-pointer rounded-md py-0 my-3 px-1`}
> >
<img src={button.icon} alt="" /> <img src={button.icon} alt="" />
<strong <strong

@ -62,14 +62,14 @@ function Address({
<div className="flex items-center gap-x-4 mt-2"> <div className="flex items-center gap-x-4 mt-2">
<div <div
style={{ border: "solid 1px #fca5a5" }} style={{ border: "solid 1px #fca5a5" }}
class="w-full flex flex-row items-center justify-between px-2 py-1 rounded-sm cursor-pointer" class="w-full flex items-center justify-between px-2 py-1 rounded-sm cursor-pointer"
> >
<button class="text-sm">{window.t("حذف")}</button> <button class="text-sm">{window.t("حذف")}</button>
<img src={trash} alt="delete-address" className="w-5 mr-3" /> <img src={trash} alt="delete-address" className="w-5 mr-3" />
</div> </div>
<div <div
style={{ border: "solid 1px #12CF7F" }} style={{ border: "solid 1px #12CF7F" }}
class="w-full flex flex-row items-center justify-between px-2 py-1 rounded-sm cursor-pointer" class="w-full flex items-center justify-between px-2 py-1 rounded-sm cursor-pointer"
> >
<button class="text-sm">{window.t("ویرایش")}</button> <button class="text-sm">{window.t("ویرایش")}</button>
<img src={editButton} alt="edit-address" className="w-5 mr-3 " /> <img src={editButton} alt="edit-address" className="w-5 mr-3 " />
@ -128,14 +128,14 @@ function Address({
<div className="flex flex-col items-center gap-y-2"> <div className="flex flex-col items-center gap-y-2">
<div <div
style={{ border: "solid 1px #fca5a5" }} style={{ border: "solid 1px #fca5a5" }}
class="w-full flex flex-row items-center justify-between px-2 py-1 rounded-sm cursor-pointer" class="w-full flex items-center justify-between px-2 py-1 rounded-sm cursor-pointer"
> >
<button class="text-sm">{window.t("حذف")}</button> <button class="text-sm">{window.t("حذف")}</button>
<img src={trash} alt="delete-address" className="w-5 mr-3" /> <img src={trash} alt="delete-address" className="w-5 mr-3" />
</div> </div>
<div <div
style={{ border: "solid 1px #12CF7F" }} style={{ border: "solid 1px #12CF7F" }}
class="w-full flex flex-row items-center justify-between px-2 py-1 rounded-sm cursor-pointer" class="w-full flex items-center justify-between px-2 py-1 rounded-sm cursor-pointer"
> >
<button class="text-sm">{window.t("ویرایش")}</button> <button class="text-sm">{window.t("ویرایش")}</button>
<img src={editButton} alt="edit-address" className="w-5 mr-3 " /> <img src={editButton} alt="edit-address" className="w-5 mr-3 " />
@ -163,7 +163,7 @@ function Address({
/> />
))} ))}
</ul> </ul>
<div className="w-full flex flex-row justify-between items-center mt-4"> <div className="w-full flex justify-between items-center mt-4">
<button <button
className={`flex justify-center text-tiny py-3 rounded-md bg-grayF9 dark:bg-blueC0 dark:bg-opacity-10 w-full ${ className={`flex justify-center text-tiny py-3 rounded-md bg-grayF9 dark:bg-blueC0 dark:bg-opacity-10 w-full ${
isDark ? "text-white" : "text-gray70" isDark ? "text-white" : "text-gray70"
@ -193,7 +193,7 @@ function Address({
/> />
))} ))}
</ul> </ul>
<div className="w-full flex flex-row justify-between items-center mt-4"> <div className="w-full flex justify-between items-center mt-4">
<button <button
className={`flex justify-center text-tiny lg:text-sm rounded-md py-3 bg-grayF9 dark:bg-blueC0 dark:bg-opacity-30 ${ className={`flex justify-center text-tiny lg:text-sm rounded-md py-3 bg-grayF9 dark:bg-blueC0 dark:bg-opacity-30 ${
isDark ? "text-white" : "text-gray70" isDark ? "text-white" : "text-gray70"

@ -22,7 +22,7 @@ function PaymentMethods({ paymentMethods }) {
<strong className="font-medium dark:text-white text-base"> <strong className="font-medium dark:text-white text-base">
{window.t("انتخاب شیوه پرداخت")} {window.t("انتخاب شیوه پرداخت")}
</strong> </strong>
<ul className="list-none p-0 m-0 flex flex-row justify-between flex-wrap"> <ul className="list-none p-0 m-0 flex justify-between flex-wrap">
{paymentMethods.map((method, index) => ( {paymentMethods.map((method, index) => (
<Method method={method} key={index} /> <Method method={method} key={index} />
))} ))}

@ -62,7 +62,7 @@ function TransportDate({ transportDate, isMobile }) {
{/* <strong className="font-bold text-green7B dark:text-white lg:text-tiny"> {/* <strong className="font-bold text-green7B dark:text-white lg:text-tiny">
زمان ارسال را انتخاب کنید زمان ارسال را انتخاب کنید
</strong> </strong>
<ul className="list-none p-0 m-0 flex flex-row justify-between flex-wrap w-full gap-4 mt-4"> <ul className="list-none p-0 m-0 flex justify-between flex-wrap w-full gap-4 mt-4">
{transportDate.times.map((time, index) => ( {transportDate.times.map((time, index) => (
<Time time={time} key={index} /> <Time time={time} key={index} />
))} ))}
@ -73,7 +73,7 @@ function TransportDate({ transportDate, isMobile }) {
{/* <strong className="font-medium dark:text-white"> {/* <strong className="font-medium dark:text-white">
زمان ارسال را انتخاب کنید زمان ارسال را انتخاب کنید
</strong> </strong>
<ul className="list-none p-0 m-0 flex flex-row flex-wrap w-full gap-2"> <ul className="list-none p-0 m-0 flex flex-wrap w-full gap-2">
{transportDate.times.map((time, index) => ( {transportDate.times.map((time, index) => (
<Time time={time} key={index} /> <Time time={time} key={index} />
))} ))}

@ -102,7 +102,7 @@ function TransportMethod({
<strong className="font-medium dark:text-white"> <strong className="font-medium dark:text-white">
لطفا یک روش ارسال انتخاب کنید لطفا یک روش ارسال انتخاب کنید
</strong> </strong>
<ul className="list-none p-0 m-0 flex flex-row gap-5 flex-wrap"> <ul className="list-none p-0 m-0 flex gap-5 flex-wrap">
{list.map((method, index) => ( {list.map((method, index) => (
<Method <Method
method={method} method={method}

@ -34,7 +34,7 @@ export const DeliveryForm = ({
const PriceStatus = ({ name, value, type }) => { const PriceStatus = ({ name, value, type }) => {
return ( return (
<div className="w-full flex flex-row justify-between py-2"> <div className="w-full flex justify-between py-2">
<strong className="font-light text-sm dark:text-white">{name}</strong> <strong className="font-light text-sm dark:text-white">{name}</strong>
<span <span
className="font-bold text-sm dark:text-white" className="font-bold text-sm dark:text-white"
@ -50,13 +50,13 @@ export const DeliveryForm = ({
return isMobile ? ( return isMobile ? (
<div className="w-full flex flex-col pt-4 pb-4"> <div className="w-full flex flex-col pt-4 pb-4">
<div className="w-full flex flex-row gap-5"> <div className="w-full flex gap-5">
<Address addresses={list} setPhase={setPhase} /> <Address addresses={list} setPhase={setPhase} />
</div> </div>
<div className="w-full flex flex-row gap-5 mt-8"> <div className="w-full flex gap-5 mt-8">
<TransportMethod /> <TransportMethod />
</div> </div>
<div className="w-full flex flex-row gap-5 mt-8"> <div className="w-full flex gap-5 mt-8">
<TransportDate transportDate={form.transportDate} /> <TransportDate transportDate={form.transportDate} />
</div> </div>
{isMobile && ( {isMobile && (
@ -80,19 +80,19 @@ export const DeliveryForm = ({
</div> </div>
) : ( ) : (
<div className="w-full flex flex-col px-4 pb-10"> <div className="w-full flex flex-col px-4 pb-10">
<div className="w-full flex flex-row gap-5"> <div className="w-full flex gap-5">
<span className="w-6 h-6 rounded-full bg-grayF4 flex justify-center items-center text-sm"> <span className="w-6 h-6 rounded-full bg-grayF4 flex justify-center items-center text-sm">
1 1
</span> </span>
<Address addresses={list} setPhase={setPhase} /> <Address addresses={list} setPhase={setPhase} />
</div> </div>
<div className="w-full flex flex-row gap-5 mt-8"> <div className="w-full flex gap-5 mt-8">
<span className="w-6 h-6 rounded-full bg-grayF4 flex justify-center items-center text-sm"> <span className="w-6 h-6 rounded-full bg-grayF4 flex justify-center items-center text-sm">
2 2
</span> </span>
<TransportMethod /> <TransportMethod />
</div> </div>
{/* <div className="w-full flex flex-row gap-5 mt-8"> {/* <div className="w-full flex gap-5 mt-8">
<span className="w-6 h-6 rounded-full bg-grayF4 flex justify-center items-center text-sm"> <span className="w-6 h-6 rounded-full bg-grayF4 flex justify-center items-center text-sm">
3 3
</span> </span>

@ -8,7 +8,7 @@ function NotFound({ title, subTitle, link }) {
return ( return (
<Link <Link
to={link} to={link}
className="flex flex-row items-center justify-between py-3.5 px-2 rounded-sm bg-blueC0 bg-opacity-10 mt-4 self-end lg:self-auto lg:ml-1/2 w-full lg:w-auto" className="flex items-center justify-between py-3.5 px-2 rounded-sm bg-blueC0 bg-opacity-10 mt-4 self-end lg:self-auto lg:ml-1/2 w-full lg:w-auto"
> >
<div className="flex flex-col w-full lg:w-full"> <div className="flex flex-col w-full lg:w-full">
{title && <strong className="text-xs text-green4F text-opacity-70 lg:text-tiny">{title}</strong>} {title && <strong className="text-xs text-green4F text-opacity-70 lg:text-tiny">{title}</strong>}

@ -15,7 +15,7 @@ function Question({ item, selectFaq }) {
} }
} }
> >
<div className="flex flex-row justify-between items-center"> <div className="flex justify-between items-center">
<strong className="flex-1 text-green4F text-xs lg:text-tiny font-medium dark:text-white lg:text-green4F"> <strong className="flex-1 text-green4F text-xs lg:text-tiny font-medium dark:text-white lg:text-green4F">
{item.title} {item.title}
</strong> </strong>

@ -41,7 +41,7 @@ function Faq({ headerOptions, setHeaderOptions, isMobile, list, getList, selectF
<Question key={index} item={item} selectFaq={selectFaq} /> <Question key={index} item={item} selectFaq={selectFaq} />
))} ))}
</div> </div>
<div className="w-full flex flex-row lg:w-4/5 justify-end"> <div className="w-full flex lg:w-4/5 justify-end">
<NotFound <NotFound
title={"پرسش خود را در لیست بالا پیدا نکردید؟"} title={"پرسش خود را در لیست بالا پیدا نکردید؟"}
subTitle={"برای ما پیام ارسال کنید"} subTitle={"برای ما پیام ارسال کنید"}

@ -26,7 +26,7 @@ const Favorites = ({
}, []); }, []);
return ( return (
<div className="flex flex-row flex-wrap"> <div className="flex flex-wrap">
{bookmarkList.map((bookmark, index) => ( {bookmarkList.map((bookmark, index) => (
<Bookmark key={index} bookmark={bookmark} /> <Bookmark key={index} bookmark={bookmark} />
))} ))}

@ -23,7 +23,7 @@ const Part2 = ({ books }) => {
<div> <div>
<Link <Link
to="/products" to="/products"
className="py-3 px-4 rounded bg-grayF4 text-blue3D text-tiny flex flex-row items-center" className="py-3 px-4 rounded bg-grayF4 text-blue3D text-tiny flex items-center"
> >
مشاهده بیشتر مشاهده بیشتر
<div className="transform rotate-90 translate-y-px mr-1"> <div className="transform rotate-90 translate-y-px mr-1">

@ -15,7 +15,7 @@ const Part4 = ({ books, grades }) => {
<div> <div>
<Link <Link
to="/products" to="/products"
className="py-3 px-4 rounded bg-grayF4 text-blue3D text-tiny flex flex-row items-center" className="py-3 px-4 rounded bg-grayF4 text-blue3D text-tiny flex items-center"
> >
مشاهده بیشتر مشاهده بیشتر
<div className="transform rotate-90 translate-y-px mr-1"> <div className="transform rotate-90 translate-y-px mr-1">

@ -14,7 +14,7 @@ const SalesContainer = ({ books }) => {
return ( return (
<div className="w-full my-10"> <div className="w-full my-10">
<div className="w-full py-10 pl-2 bg-white flex justify-between items-center gap-3"> <div className="w-full py-10 pl-2 bg-white flex justify-between items-center gap-3">
<div className="flex flex-row items-center pl-4"> <div className="flex items-center pl-4">
{/* <div className="w-6 h-6 bg-blue-300 ml-4 rounded-full"></div> */} {/* <div className="w-6 h-6 bg-blue-300 ml-4 rounded-full"></div> */}
<div className="text-3xl leading-normal"> <div className="text-3xl leading-normal">
<h3 className=" bg-blueC0 text-white text-center bold text-7xl"> <h3 className=" bg-blueC0 text-white text-center bold text-7xl">

@ -6,7 +6,7 @@ import _ from "lodash";
export default function Lights({ degrees}) { export default function Lights({ degrees}) {
return ( return (
<div className="w-full"> <div className="w-full">
<header className="container hidden flex-row px-12 lg:px-0 justify-between z-20 transform -translate-y-16 lg:-translate-y-24"> <header className="container hidden px-12 lg:px-0 justify-between z-20 transform -translate-y-16 lg:-translate-y-24">
{degrees.map((light, index) => ( {degrees.map((light, index) => (
<Light degree={light} key={index} /> <Light degree={light} key={index} />
))} ))}

@ -101,10 +101,10 @@ function Page1({ list, top }) {
/> />
</div> </div>
<div <div
className="container flex flex-row justify-between relative transform translate-y-12" className="container flex justify-between relative transform translate-y-12"
style={{ alignItems: "start" }} style={{ alignItems: "start" }}
> >
<div className="list-none flex flex-row bg-blueB0 bg-opacity-40 p-2.5 rounded-md backdrop-filter backdrop-blur-md"> <div className="list-none flex bg-blueB0 bg-opacity-40 p-2.5 rounded-md backdrop-filter backdrop-blur-md">
<strong className="text-white text-sm font-light ml-1 border-l-2 pl-2 border-gray-300"> <strong className="text-white text-sm font-light ml-1 border-l-2 pl-2 border-gray-300">
لیست محصولات لیست محصولات
</strong> </strong>
@ -129,7 +129,7 @@ function Page1({ list, top }) {
</p> </p>
<Link <Link
to="/products" to="/products"
className="flex flex-row items-center text-white text-xs bg-blueC0 px-4 py-3 rounded-md backdrop-filter backdrop-blur-md mt-5 self-end animate-bounce" className="flex items-center text-white text-xs bg-blueC0 px-4 py-3 rounded-md backdrop-filter backdrop-blur-md mt-5 self-end animate-bounce"
> >
ورود به فروشگاه <img src={arrowLeftWhite} alt="" className="mr-2" /> ورود به فروشگاه <img src={arrowLeftWhite} alt="" className="mr-2" />
</Link> </Link>

@ -5,7 +5,7 @@ export default function PDF({ link }) {
return ( return (
<a <a
href={link.value} href={link.value}
className="w-full flex flex-row justify-between py-3 px-4 rounded-md bg-yellow2 my-2" className="w-full flex justify-between py-3 px-4 rounded-md bg-yellow2 my-2"
> >
<p className="text-xs font-medium text-yellow1">{link.name}</p> <p className="text-xs font-medium text-yellow1">{link.name}</p>
<img src={linkIcon} className="w-5 h-5" /> <img src={linkIcon} className="w-5 h-5" />

@ -6,7 +6,7 @@ export default function PDF({ pdf }) {
<a <a
download download
href={pdf.value} href={pdf.value}
className="w-full flex flex-row justify-between py-3 px-4 rounded-md bg-redFF my-2" className="w-full flex justify-between py-3 px-4 rounded-md bg-redFF my-2"
> >
<p className="text-xs font-medium text-red5F">{pdf.name}</p> <p className="text-xs font-medium text-red5F">{pdf.name}</p>
<img src={pdfIcon} className="w-5 h-5" /> <img src={pdfIcon} className="w-5 h-5" />

@ -44,7 +44,7 @@ function QrResult({ book, grades, checked, dataTypes, list }) {
)} )}
onClick={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}
> >
<div className="w-full flex flex-row items-center"> <div className="w-full flex items-center">
<img src={book.imageUrl} alt={book.name} className="rounded-md w-1/3" /> <img src={book.imageUrl} alt={book.name} className="rounded-md w-1/3" />
<div className="flex flex-col"> <div className="flex flex-col">
<h1 className="font-semibold text-primary">{book.name}</h1> <h1 className="font-semibold text-primary">{book.name}</h1>
@ -60,7 +60,7 @@ function QrResult({ book, grades, checked, dataTypes, list }) {
className="flex flex-col justify-start rounded-md border border-blueFE overflow-hidden" className="flex flex-col justify-start rounded-md border border-blueFE overflow-hidden"
style={{ borderWidth: 1, borderColor: "#C1E0FE", borderStyle: "solid" }} style={{ borderWidth: 1, borderColor: "#C1E0FE", borderStyle: "solid" }}
> >
<ul className="w-full flex flex-row list-none items-center"> <ul className="w-full flex list-none items-center">
{dataTypes.map((item, index) => ( {dataTypes.map((item, index) => (
<li <li
key={index} key={index}

@ -10,7 +10,7 @@ function Page3({ top, translateY }) {
<div <div
className={_.join( className={_.join(
[ [
"fixed left-0 h-screen w-full bg-white transition-opacity duration-1000 flex flex-row justify-center items-end z-30", "fixed left-0 h-screen w-full bg-white transition-opacity duration-1000 flex justify-center items-end z-30",
top > 50 ? "opacity-0" : "opacity-100", top > 50 ? "opacity-0" : "opacity-100",
], ],
" " " "

@ -35,7 +35,7 @@ function Page4({ top }) {
رنگی پر نشد، به یاد هم باشیم شاید فردا ما هم در کنار هم نباشیم رنگی پر نشد، به یاد هم باشیم شاید فردا ما هم در کنار هم نباشیم
</p> </p>
<div <div
className="flex flex-row justify-center w-full mt-5" className="flex justify-center w-full mt-5"
style={{ width: "30%" }} style={{ width: "30%" }}
> >
<img src={bazarImage} alt="" className="w-36 mx-5 cursor-pointer" /> <img src={bazarImage} alt="" className="w-36 mx-5 cursor-pointer" />

@ -18,7 +18,7 @@ export default function Question({ question }) {
onClick={() => setSelect(option)} onClick={() => setSelect(option)}
className={_.join( className={_.join(
[ [
"rounded-md w-full overflow-hidden flex flex-row items-center my-2 cursor-pointer transition-all duration-500", "rounded-md w-full overflow-hidden flex items-center my-2 cursor-pointer transition-all duration-500",
], ],
" " " "
)} )}

@ -15,17 +15,17 @@ function Test({ title, duration, questions, translateY }) {
}} }}
> >
<header <header
className="w-3/4 flex flex-row justify-between py-3 px-3 rounded-md" className="w-3/4 flex justify-between py-3 px-3 rounded-md"
style={{ border: "1px solid #777" }} style={{ border: "1px solid #777" }}
> >
<div className="flex flex-row items-center"> <div className="flex items-center">
<span <span
className="w-2 h-2 rounded-full ml-2" className="w-2 h-2 rounded-full ml-2"
style={{ backgroundColor: "#CEFDFF" }} style={{ backgroundColor: "#CEFDFF" }}
></span> ></span>
<h1 className="text-blueE8 text-md font-medium">{title}</h1> <h1 className="text-blueE8 text-md font-medium">{title}</h1>
</div> </div>
<div className="flex flex-row items-center"> <div className="flex items-center">
<img src={timerIcon} className="w-4 h-4 ml-1" /> <img src={timerIcon} className="w-4 h-4 ml-1" />
<div className="text-sm text-green71"> <div className="text-sm text-green71">
{_.join(["زمان باقیمانده", duration], " ")} {_.join(["زمان باقیمانده", duration], " ")}

@ -36,7 +36,7 @@ function LessonPlayList({
{ {
<div className={_.join(["w-full mb-2.5 flex flex-col border"], " ")}> <div className={_.join(["w-full mb-2.5 flex flex-col border"], " ")}>
{/* {bookId && ( {/* {bookId && (
<header className="mb-1 flex flex-row items-center"> <header className="mb-1 flex items-center">
<h3 className="py-1 px-2.5 m-0 bg-white inline"> <h3 className="py-1 px-2.5 m-0 bg-white inline">
{ {
realCategories.filter( realCategories.filter(
@ -57,7 +57,7 @@ function LessonPlayList({
<div <div
className={_.join( className={_.join(
[ [
"flex flex-row items-center py-2", "flex items-center py-2",
video?.id === selectedVideo?.id ? "bg-white" : "", video?.id === selectedVideo?.id ? "bg-white" : "",
], ],
" " " "

@ -31,7 +31,7 @@ function VodTube({
onClick={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}
className={_.join( className={_.join(
[ [
"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", "fixed flex 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 > 10 ? "opacity-0 z-0" : "opacity-100 z-10", top > 10 ? "opacity-0 z-0" : "opacity-100 z-10",
], ],
" " " "
@ -59,7 +59,7 @@ function VodTube({
{/* <p className="desktop">{selectedVideo.text}</p> */} {/* <p className="desktop">{selectedVideo.text}</p> */}
</section> </section>
<section className="md:hidden sm:hidden xs:hidden pb-7 flex flex-col"> <section className="md:hidden sm:hidden xs:hidden pb-7 flex flex-col">
<header className="flex flex-row justify-between items-center px-5 py-0"> <header className="flex justify-between items-center px-5 py-0">
<h2 className="m-0">نظرات</h2> <h2 className="m-0">نظرات</h2>
<button className="border-0">بستن نظرات</button> <button className="border-0">بستن نظرات</button>
</header> </header>

@ -12,7 +12,7 @@ function Blogs({ list, isDark, setActive }) {
return ( return (
<div className="w-full pr-4"> <div className="w-full pr-4">
<div className="w-full flex flex-col rounded-md py-4 overflow-hidden"> <div className="w-full flex flex-col rounded-md py-4 overflow-hidden">
<header className="w-full flex flex-row justify-between items-center"> <header className="w-full flex justify-between items-center">
<strong className="text-green7B dark:text-white font-bold text-base lg:text-sm"> <strong className="text-green7B dark:text-white font-bold text-base lg:text-sm">
خواندنیها خواندنیها
</strong> </strong>
@ -32,7 +32,7 @@ function Blogs({ list, isDark, setActive }) {
)} )}
</Link> </Link>
</header> </header>
<ul className="list-none w-full overflow-x-scroll pt-3 flex flex-row pb-16 no-scrollbar"> <ul className="list-none w-full overflow-x-scroll pt-3 flex pb-16 no-scrollbar">
{list.map((blog, index) => ( {list.map((blog, index) => (
<Blog blog={blog} key={index} setActive={setActive} /> <Blog blog={blog} key={index} setActive={setActive} />
))} ))}
@ -47,7 +47,7 @@ const Blog = ({ blog, setActive }) => {
<li className="flex flex-col ml-3"> <li className="flex flex-col ml-3">
<Link <Link
to={"/blogs/" + blog?.id} to={"/blogs/" + blog?.id}
className="flex flex-row justify-center items-end rounded-md" className="flex justify-center items-end rounded-md"
style={{ style={{
background: `url(https://dnvn.ir/api/v1/file/${blog?.fileIds})`, background: `url(https://dnvn.ir/api/v1/file/${blog?.fileIds})`,
backgroundPosition: "contain", backgroundPosition: "contain",
@ -65,8 +65,8 @@ const Blog = ({ blog, setActive }) => {
<h2 className="text-xs font-semibold text-blue5F dark:text-white leading-5"> <h2 className="text-xs font-semibold text-blue5F dark:text-white leading-5">
{blog.title} {blog.title}
</h2> </h2>
<div className="w-full flex flex-row justify-between items-center mt-3"> <div className="w-full flex justify-between items-center mt-3">
<div className="flex flex-row items-center"> <div className="flex items-center">
<img <img
src={`https://dnvn.ir/api/v1/file/${blog?.fileIds}`} src={`https://dnvn.ir/api/v1/file/${blog?.fileIds}`}
alt="" alt=""
@ -76,7 +76,7 @@ const Blog = ({ blog, setActive }) => {
{"حامد دژبانی نسب"} {"حامد دژبانی نسب"}
</span> </span>
</div> </div>
<div className="flex flex-row items-center"> <div className="flex items-center">
<span className="text-xs font-light text-gray70 dark:text-greenBA"> <span className="text-xs font-light text-gray70 dark:text-greenBA">
{_.join(["زمان مناسب", "30"], " ")} {_.join(["زمان مناسب", "30"], " ")}
</span> </span>

@ -41,7 +41,7 @@ function MyBooks({ books, grades, isMobile }) {
کتابهای من کتابهای من
</strong> </strong>
{isMobile ? ( {isMobile ? (
<ul className="list-none w-full overflow-x-scroll pt-2 flex flex-row lg:pt-5 lg:flex-wrap lg:overflow-y-scroll gap-3 lg:gap-10 no-scrollbar"> <ul className="list-none w-full overflow-x-scroll pt-2 flex lg:pt-5 lg:flex-wrap lg:overflow-y-scroll gap-3 lg:gap-10 no-scrollbar">
{books?.slice(0, 5)?.map((book, index) => ( {books?.slice(0, 5)?.map((book, index) => (
<Book book={book} key={index} /> <Book book={book} key={index} />
))} ))}

@ -47,7 +47,7 @@ function Videos({ videos, grades, isDark, isMobile }) {
return ( return (
<div className="w-full px-4 lg:py-4"> <div className="w-full px-4 lg:py-4">
<div className="w-full flex flex-col py-4 lg:px-3 overflow-hidden lg:border lg:border-solid lg:border-gray-200 rounded-md lg:bg-blueC0 lg:bg-opacity-5"> <div className="w-full flex flex-col py-4 lg:px-3 overflow-hidden lg:border lg:border-solid lg:border-gray-200 rounded-md lg:bg-blueC0 lg:bg-opacity-5">
<header className="w-full flex flex-row justify-between items-center"> <header className="w-full flex justify-between items-center">
<strong className="text-green7B dark:text-white font-bold text-base lg:text-base mt-2"> <strong className="text-green7B dark:text-white font-bold text-base lg:text-base mt-2">
دورههای ویدئویی شما دورههای ویدئویی شما
</strong> </strong>
@ -66,7 +66,7 @@ function Videos({ videos, grades, isDark, isMobile }) {
)} )}
</header> </header>
{isMobile ? ( {isMobile ? (
<ul className="list-none w-full overflow-x-scroll pt-3 gap-3 lg:gap-5 flex flex-row lg:pt-5 lg:flex-wrap lg:overflow-y-scroll no-scrollbar"> <ul className="list-none w-full overflow-x-scroll pt-3 gap-3 lg:gap-5 flex lg:pt-5 lg:flex-wrap lg:overflow-y-scroll no-scrollbar">
{videos?.slice(0, 5)?.map((video, index) => ( {videos?.slice(0, 5)?.map((video, index) => (
<Video video={video} key={index} /> <Video video={video} key={index} />
))} ))}

@ -6,7 +6,7 @@ import interactiveIcon from "../../../../../assets/icons/interactive.svg";
function Features({ features }) { function Features({ features }) {
return ( return (
<div className="w-full flex flex-row flex-wrap justify-between px-2"> <div className="w-full flex flex-wrap justify-between px-2">
{features.map((feature, index) => ( {features.map((feature, index) => (
<Feature feature={feature} key={index} /> <Feature feature={feature} key={index} />
))} ))}

@ -66,7 +66,7 @@ function Header({ list }) {
<div className="w-full flex justify-center mt-5"> <div className="w-full flex justify-center mt-5">
<Link <Link
to="/products" to="/products"
className="flex flex-row items-center text-white text-tiny bg-blueC0 px-4 py-3 rounded-md backdrop-filter backdrop-blur-md mt-5 self-end" className="flex items-center text-white text-tiny bg-blueC0 px-4 py-3 rounded-md backdrop-filter backdrop-blur-md mt-5 self-end"
> >
ورود به فروشگاه ورود به فروشگاه
</Link> </Link>
@ -79,7 +79,7 @@ function Header({ list }) {
</div> </div>
<h1 className="inline">با طعم لذت</h1> <h1 className="inline">با طعم لذت</h1>
</div> </div>
<div className="flex flex-row my-1.5"> <div className="flex my-1.5">
<h1 className="inline">از اول تا یازدهم &nbsp;</h1> <h1 className="inline">از اول تا یازدهم &nbsp;</h1>
<div className="relative"> <div className="relative">
<h1 className="inline z-20 pb-1">کنارتونیم</h1> <h1 className="inline z-20 pb-1">کنارتونیم</h1>

@ -15,7 +15,7 @@ function Platforms({ platforms }) {
const Platform = ({ platform }) => { const Platform = ({ platform }) => {
return ( return (
<div <div
className="w-full flex flex-row rounded-sm p-4 items-start mb-5" className="w-full flex rounded-sm p-4 items-start mb-5"
style={{ style={{
backgroundColor: platform.backgroundColor, backgroundColor: platform.backgroundColor,
border: `1px solid ${platform.borderColor}`, border: `1px solid ${platform.borderColor}`,

@ -13,12 +13,12 @@ function Responsive() {
}} }}
> >
<div className="flex flex-col items-center text-center font-extrabold text-blue5F dark:text-gray-300 text-lg mt-3 transform translate-y-4"> <div className="flex flex-col items-center text-center font-extrabold text-blue5F dark:text-gray-300 text-lg mt-3 transform translate-y-4">
<div className="flex flex-row "> <div className="flex ">
<h1 className="inline z-50"> <h1 className="inline z-50">
از طریق موبایل یا کامپیوتر میتونی از طریق موبایل یا کامپیوتر میتونی
</h1> </h1>
</div> </div>
<div className="flex flex-row my-1.5"> <div className="flex my-1.5">
<div className="relative"> <div className="relative">
<h1 className="inline z-50 pb-1">به محتوای دیجیتال &nbsp;</h1> <h1 className="inline z-50 pb-1">به محتوای دیجیتال &nbsp;</h1>
<span className="h-1 w-full absolute bottom-0 left-0 bg-green1"></span> <span className="h-1 w-full absolute bottom-0 left-0 bg-green1"></span>

@ -3,8 +3,8 @@ import _ from "lodash";
export default function Book({ book }) { export default function Book({ book }) {
return ( return (
<div className="w-full flex flex-row justify-between py-3 border-b border-solid border-blueFF1 dark:border-gray45"> <div className="w-full flex justify-between py-3 border-b border-solid border-blueFF1 dark:border-gray45">
<div className="flex flex-row items-center flex-1"> <div className="flex items-center flex-1">
<img <img
src={book} src={book}
className="rounded-md" className="rounded-md"
@ -16,7 +16,7 @@ export default function Book({ book }) {
<span className="mt-2 text-xs lg:text-sm text-gray70 dark:text-white">نسخه دیجیتال</span> <span className="mt-2 text-xs lg:text-sm text-gray70 dark:text-white">نسخه دیجیتال</span>
</div> </div>
</div> </div>
<div className="flex flex-row items-center"> <div className="flex items-center">
<span className="py-1 px-2 rounded-sm text-green4F2 text-sm lg:text-base bg-grayF9 dark:bg-gray-500 dark:text-white"> <span className="py-1 px-2 rounded-sm text-green4F2 text-sm lg:text-base bg-grayF9 dark:bg-gray-500 dark:text-white">
1 1
</span> </span>

@ -25,11 +25,11 @@ function OrderDetails({ order, setHeaderOptions, headerOptions }) {
},[]); },[]);
return ( return (
<div className="px-4 flex flex-col py-5 lg:pt-24 lg:w-3/5 lg:mx-auto"> <div className="px-4 flex flex-col py-5 lg:pt-24 lg:w-3/5 lg:mx-auto">
<div className="flex flex-row w-full justify-between items-center p-3 bg-blueC0 bg-opacity-10 rounded-t-md dark:bg-blueC0 dark:bg-opacity-10"> <div className="flex w-full justify-between items-center p-3 bg-blueC0 bg-opacity-10 rounded-t-md dark:bg-blueC0 dark:bg-opacity-10">
<strong className="font-medium text-sm lg:text-tiny text-blue52 dark:text-white"> <strong className="font-medium text-sm lg:text-tiny text-blue52 dark:text-white">
{_.join(["شماره سفارش:", order.number], " ")} {_.join(["شماره سفارش:", order.number], " ")}
</strong> </strong>
<div className="flex flex-row items-center"> <div className="flex items-center">
<span className="text-xs lg:text-tiny font-light text-blue52 dark:text-white"> <span className="text-xs lg:text-tiny font-light text-blue52 dark:text-white">
{status[order.status]} {status[order.status]}
</span> </span>
@ -39,20 +39,20 @@ function OrderDetails({ order, setHeaderOptions, headerOptions }) {
></div> ></div>
</div> </div>
</div> </div>
<div className="w-full flex flex-row items-center py-4 border-b border-solid border-blueFF1 dark:border-gray45"> <div className="w-full flex items-center py-4 border-b border-solid border-blueFF1 dark:border-gray45">
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">آدرس تحویل:</strong> <strong className="text-xs lg:text-tiny text-green4F dark:text-white">آدرس تحویل:</strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{order.address} {order.address}
</span> </span>
</div> </div>
<div className="w-full flex flex-row justify-between py-0 border-b border-solid border-blueFF1 dark:border-gray45"> <div className="w-full flex justify-between py-0 border-b border-solid border-blueFF1 dark:border-gray45">
<div className="flex flex-row py-4"> <div className="flex py-4">
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">مشخصات تحویل گیرنده:</strong> <strong className="text-xs lg:text-tiny text-green4F dark:text-white">مشخصات تحویل گیرنده:</strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{order.name} {order.name}
</span> </span>
</div> </div>
<div className="flex flex-row py-4"> <div className="flex py-4">
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">شماره موبایل:</strong> <strong className="text-xs lg:text-tiny text-green4F dark:text-white">شماره موبایل:</strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{order.cellphone} {order.cellphone}
@ -72,50 +72,50 @@ function OrderDetails({ order, setHeaderOptions, headerOptions }) {
<Book book={item} key={index} /> <Book book={item} key={index} />
))} ))}
</div> </div>
<div className="w-full flex flex-row justify-between py-2 border-b border-solid border-blueFF1 dark:border-gray45"> <div className="w-full flex justify-between py-2 border-b border-solid border-blueFF1 dark:border-gray45">
<div className="flex flex-row py-4"> <div className="flex py-4">
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">مبلغ سبد خرید:</strong> <strong className="text-xs lg:text-tiny text-green4F dark:text-white">مبلغ سبد خرید:</strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{_.join([order.shoppingCardPrice, "تومان"], " ")} {_.join([order.shoppingCardPrice, "تومان"], " ")}
</span> </span>
</div> </div>
<div className="flex flex-row py-4"> <div className="flex py-4">
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">تخفیف:</strong> <strong className="text-xs lg:text-tiny text-green4F dark:text-white">تخفیف:</strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{_.join([order.discountPrice, "تومان"], " ")} {_.join([order.discountPrice, "تومان"], " ")}
</span> </span>
</div> </div>
</div> </div>
<div className="w-full flex flex-row justify-between py-2 border-b border-solid border-blueFF1 dark:border-gray45"> <div className="w-full flex justify-between py-2 border-b border-solid border-blueFF1 dark:border-gray45">
<div className="flex flex-row py-4"> <div className="flex py-4">
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> هزینه ارسال کالا:</strong> <strong className="text-xs lg:text-tiny text-green4F dark:text-white"> هزینه ارسال کالا:</strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{_.join([order.sendPrice, "تومان"], " ")} {_.join([order.sendPrice, "تومان"], " ")}
</span> </span>
</div> </div>
<div className="flex flex-row py-4 border"> <div className="flex py-4 border">
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">جمع هزینه پرداختی:</strong> <strong className="text-xs lg:text-tiny text-green4F dark:text-white">جمع هزینه پرداختی:</strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{_.join([order.totalPrice, "تومان"], " ")} {_.join([order.totalPrice, "تومان"], " ")}
</span> </span>
</div> </div>
</div> </div>
<div className="w-full flex flex-row justify-between py-2 border-b border-solid border-blueFF1 dark:border-gray45"> <div className="w-full flex justify-between py-2 border-b border-solid border-blueFF1 dark:border-gray45">
<div className="flex flex-row py-4"> <div className="flex py-4">
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">نحوه پرداخت:</strong> <strong className="text-xs lg:text-tiny text-green4F dark:text-white">نحوه پرداخت:</strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{order.payMethod} {order.payMethod}
</span> </span>
</div> </div>
<div className="flex flex-row py-4"> <div className="flex py-4">
<strong className="text-xs lg:text-tiny text-green4F dark:text-white"> شماره تراکنش:</strong> <strong className="text-xs lg:text-tiny text-green4F dark:text-white"> شماره تراکنش:</strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{order.transactionNumber} {order.transactionNumber}
</span> </span>
</div> </div>
</div> </div>
<div className="w-full flex flex-row justify-between py-2"> <div className="w-full flex justify-between py-2">
<div className="w-full flex flex-row py-4"> <div className="w-full flex py-4">
<strong className="text-xs lg:text-tiny text-green4F dark:text-white">تاریخ تحویل:</strong> <strong className="text-xs lg:text-tiny text-green4F dark:text-white">تاریخ تحویل:</strong>
<span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white"> <span className="flex-1 font-light text-right mr-2 text-xs lg:text-tiny text-green4F dark:text-white">
{order.date} {order.date}

@ -21,11 +21,11 @@ const status = {
function Order({ order, isMobile }) { function Order({ order, isMobile }) {
return ( return (
<div className="w-full flex flex-col rounded-md overflow-hidden my-3 border border-solid border-blueC0 border-opacity-50 dark:border-blueC0 dark:border-opacity-10 lg:w-4/5 mx-auto"> <div className="w-full flex flex-col rounded-md overflow-hidden my-3 border border-solid border-blueC0 border-opacity-50 dark:border-blueC0 dark:border-opacity-10 lg:w-4/5 mx-auto">
<div className="flex flex-row w-full justify-between items-center p-3 bg-blueC0 bg-opacity-10 dark:bg-blueC0 dark:bg-opacity-10"> <div className="flex w-full justify-between items-center p-3 bg-blueC0 bg-opacity-10 dark:bg-blueC0 dark:bg-opacity-10">
<strong className="font-medium text-sm lg:text-tiny text-green4F dark:text-white"> <strong className="font-medium text-sm lg:text-tiny text-green4F dark:text-white">
{_.join(["شماره سفارش:", order.number], " ")} {_.join(["شماره سفارش:", order.number], " ")}
</strong> </strong>
<div className="flex flex-row items-center"> <div className="flex items-center">
<span className="text-xs lg:text-tiny font-light text-green4F dark:text-white"> <span className="text-xs lg:text-tiny font-light text-green4F dark:text-white">
{status[order.status]} {status[order.status]}
</span> </span>
@ -35,9 +35,9 @@ function Order({ order, isMobile }) {
></div> ></div>
</div> </div>
</div> </div>
<div className="w-full flex flex-row justify-between p-3"> <div className="w-full flex justify-between p-3">
<div className="flex flex-col"> <div className="flex flex-col">
<div className="flex flex-row mb-2"> <div className="flex mb-2">
{order.items.length < 2 {order.items.length < 2
? order?.items?.map((item, index) => ( ? order?.items?.map((item, index) => (
<img <img
@ -63,7 +63,7 @@ function Order({ order, isMobile }) {
))} ))}
{isMobile && order.items.length >= 2 && ( {isMobile && order.items.length >= 2 && (
<div <div
className="flex flex-row items-center justify-center relative rounded-md overflow-hidden bg-grayEE dark:bg-gray-400" className="flex items-center justify-center relative rounded-md overflow-hidden bg-grayEE dark:bg-gray-400"
style={{ style={{
width: 60, width: 60,
height: 90, height: 90,
@ -104,7 +104,7 @@ function Order({ order, isMobile }) {
</strong> </strong>
<Link <Link
to="/orders/order" to="/orders/order"
className="rounded-md flex flex-row justify-center px-5 py-2.5 border border-solid border-blueC0 text-green4F bg-blueC0 bg-opacity-10" className="rounded-md flex justify-center px-5 py-2.5 border border-solid border-blueC0 text-green4F bg-blueC0 bg-opacity-10"
> >
جزئیات سفارش جزئیات سفارش
<img <img

@ -7,8 +7,8 @@ function Comment({ comment }) {
className="flex flex-col py-3 px-2 rounded-md shadow-all border border-gray-200 border-solid dark:border-opacity-10 ml-4 w-auto" className="flex flex-col py-3 px-2 rounded-md shadow-all border border-gray-200 border-solid dark:border-opacity-10 ml-4 w-auto"
style={{ minWidth: "250px" }} style={{ minWidth: "250px" }}
> >
<header className="flex flex-row justify-between"> <header className="flex justify-between">
<div className="flex flex-row items-center"> <div className="flex items-center">
<img src={userImage} alt="" className="h-10 w-10 rounded-full" /> <img src={userImage} alt="" className="h-10 w-10 rounded-full" />
<strong className="text-blue5F text-md mr-1 dark:text-white"> <strong className="text-blue5F text-md mr-1 dark:text-white">
{comment?.name} {comment?.name}

@ -16,7 +16,7 @@ export const ProductOverAll = ({ book, grades, isDark, loading }) => {
const [type, setType] = useState("1"); const [type, setType] = useState("1");
return ( return (
<div className="w-full flex flex-col"> <div className="w-full flex flex-col">
<header className={`w-full flex flex-row justify-between gap-5`}> <header className={`w-full flex justify-between gap-5`}>
<ProductImages images={book?.fileIds} /> <ProductImages images={book?.fileIds} />
<div className="flex flex-col w-1/2 divide-y divide-solid divide-gray-200"> <div className="flex flex-col w-1/2 divide-y divide-solid divide-gray-200">
<div className="w-full flex flex-col pr-2 py-2 border-0"> <div className="w-full flex flex-col pr-2 py-2 border-0">
@ -43,7 +43,7 @@ export const ProductOverAll = ({ book, grades, isDark, loading }) => {
به من کمک کن انتخاب کنم به من کمک کن انتخاب کنم
</p> </p>
</div> </div>
<div className="w-full flex flex-row justify-between items-center mt-4 gap-5"> <div className="w-full flex justify-between items-center mt-4 gap-5">
<Button <Button
title="نسخه فیزیکی" title="نسخه فیزیکی"
backgroundColor={isDark ? "bg-transparent" : "bg-white"} backgroundColor={isDark ? "bg-transparent" : "bg-white"}
@ -102,7 +102,7 @@ export const ProductOverAll = ({ book, grades, isDark, loading }) => {
<div className="flex py-4"> <div className="flex py-4">
<Link <Link
to={"/videos/" + book?.id} to={"/videos/" + book?.id}
className="bg-blueC0 text-green7B bg-opacity-5 font-semibold text-tiny rounded-md border border-solid border-blueC0 w-2/3 py-4 text-center flex flex-row items-center justify-center" className="bg-blueC0 text-green7B bg-opacity-5 font-semibold text-tiny rounded-md border border-solid border-blueC0 w-2/3 py-4 text-center flex items-center justify-center"
> >
مشاهده دوره ویدیویی این محصول مشاهده دوره ویدیویی این محصول
<img <img

@ -9,7 +9,7 @@ import Progress from "../../../components/Progress";
function Rate({ avarage, all, fields, desktop }) { function Rate({ avarage, all, fields, desktop }) {
return ( return (
<div className="w-full flex flex-row justify-between items-center mt-5"> <div className="w-full flex justify-between items-center mt-5">
<div className="flex flex-col items-center justify-center h-full ml-4"> <div className="flex flex-col items-center justify-center h-full ml-4">
{ {
desktop ? desktop ?

@ -79,7 +79,7 @@ export const Product = ({
</div> </div>
</header> </header>
<ul <ul
className="list-none flex flex-row divide-x items-center mt-5" className="list-none flex divide-x items-center mt-5"
style={{ direction: "ltr" }} style={{ direction: "ltr" }}
> >
<li className="border-solid border-blueFE flex-1 flex-shrink-0 text-center text-tiny leading-5 font-medium text-green7B dark:text-white"> <li className="border-solid border-blueFE flex-1 flex-shrink-0 text-center text-tiny leading-5 font-medium text-green7B dark:text-white">
@ -95,7 +95,7 @@ export const Product = ({
<h2 className="text-green7B text-base font-semibold mt-10 dark:text-greenBA"> <h2 className="text-green7B text-base font-semibold mt-10 dark:text-greenBA">
نسخه محصول را انتخاب کنید نسخه محصول را انتخاب کنید
</h2> </h2>
<div className="w-full flex flex-row justify-between items-center mt-5"> <div className="w-full flex justify-between items-center mt-5">
<ButtonBetween <ButtonBetween
width="100%" width="100%"
item={"خرید نسخه فیزیکی کتاب"} item={"خرید نسخه فیزیکی کتاب"}
@ -111,7 +111,7 @@ export const Product = ({
} }
/> />
</div> </div>
<div className="w-full flex flex-row justify-between items-center mt-4 gap-2"> <div className="w-full flex justify-between items-center mt-4 gap-2">
<ButtonBetween <ButtonBetween
width="72%" width="72%"
item={"خرید نسخه دیجیتال کتاب"} item={"خرید نسخه دیجیتال کتاب"}
@ -134,7 +134,7 @@ export const Product = ({
مشاهده نمونه مشاهده نمونه
</a> </a>
</div> </div>
<div className="w-full flex flex-row justify-between items-center mt-4"> <div className="w-full flex justify-between items-center mt-4">
<ButtonBetween <ButtonBetween
width="72%" width="72%"
item={"خرید نسخه ویدئویی کتاب"} item={"خرید نسخه ویدئویی کتاب"}
@ -173,7 +173,7 @@ export const Product = ({
<Rate value={book?.rate || 0} /> <Rate value={book?.rate || 0} />
</div> </div>
<div <div
className="flex flex-row w-full pb-4 mt-10 no-scrollbar" className="flex w-full pb-4 mt-10 no-scrollbar"
style={{ overflowX: "scroll" }} style={{ overflowX: "scroll" }}
> >
{[0, 1, 2, 2].map((comment, index) => ( {[0, 1, 2, 2].map((comment, index) => (

@ -40,9 +40,9 @@ export const Products = ({
</div> </div>
) : ( ) : (
<div <div
className={`w-full flex flex-row gap-10 px-5 overflow-y-hidden mt-3 justify-center lg:pt-24 lg:mt-0`} className={`w-full flex gap-10 px-5 overflow-y-hidden mt-3 justify-center lg:pt-24 lg:mt-0`}
> >
<div className="w-11/12 flex flex-row gap-5 justify-end"> <div className="w-11/12 flex gap-5 justify-end">
<Sidebar /> <Sidebar />
<Main books={books} grades={grades} /> <Main books={books} grades={grades} />
</div> </div>

@ -248,7 +248,7 @@ export const Main = ({
</div> </div>
)} )}
<div className="w-full flex flex-row flex-wrap mt-0 border-t-2 border-solid border-gray-100 overflow-y-hidden gap-4 justify-evenly pt-3"> <div className="w-full flex flex-wrap mt-0 border-t-2 border-solid border-gray-100 overflow-y-hidden gap-4 justify-evenly pt-3">
{elements {elements
?.slice((page - 1) * num, page * num) ?.slice((page - 1) * num, page * num)
.map((product, index) => ( .map((product, index) => (

@ -45,7 +45,7 @@ export const Sidebar = ({
return ( return (
<div className="flex flex-col"> <div className="flex flex-col">
<div <div
className="flex flex-row justify-between items-center py-5 cursor-pointer" className="flex justify-between items-center py-5 cursor-pointer"
onClick={() => dropdownActionMap[name]()} onClick={() => dropdownActionMap[name]()}
> >
<strong className="font-semibold text-tiny text-green4F"> <strong className="font-semibold text-tiny text-green4F">
@ -69,7 +69,7 @@ export const Sidebar = ({
{list.map((item, index) => ( {list.map((item, index) => (
<li <li
key={index} key={index}
className="flex flex-row items-center mb-3" className="flex items-center mb-3"
onClick={() => onClick={() =>
active !== item active !== item
? setFilterOptions({ ...filterOptions, [name]: item }) ? setFilterOptions({ ...filterOptions, [name]: item })
@ -88,7 +88,7 @@ export const Sidebar = ({
const CkeckItem = ({ title, name }) => { const CkeckItem = ({ title, name }) => {
return ( return (
<div <div
className="flex flex-row justify-between items-center py-4" className="flex justify-between items-center py-4"
onClick={() => onClick={() =>
setFilterOptions({ setFilterOptions({
...filterOptions, ...filterOptions,

@ -30,7 +30,7 @@ export const Header = ({
700 700
)} )}
/> />
<div className="w-full flex flex-row justify-between mt-3"> <div className="w-full flex justify-between mt-3">
<Select <Select
margin="ml-1" margin="ml-1"
fill="fill-green-700 dark:fill-white" fill="fill-green-700 dark:fill-white"

@ -83,7 +83,7 @@ export const Main = ({ books, filterOptions, grades }) => {
<span className="text-tiny lg:text-sm text-green7B dark:text-greenBA font-light mb-4"> <span className="text-tiny lg:text-sm text-green7B dark:text-greenBA font-light mb-4">
{"پایه" + " " + grades[product?.gradeId]} {"پایه" + " " + grades[product?.gradeId]}
</span> </span>
<div className="w-full flex flex-row justify-center font-bold lg:font-medium text-lg lg:text-tiny text-blue5F dark:text-white"> <div className="w-full flex justify-center font-bold lg:font-medium text-lg lg:text-tiny text-blue5F dark:text-white">
{product?.product[2]?.price + " " + "تومان"} {product?.product[2]?.price + " " + "تومان"}
</div> </div>
</Link> </Link>
@ -106,7 +106,7 @@ export const Main = ({ books, filterOptions, grades }) => {
<span className="text-tiny lg:text-xs text-green7B dark:text-greenBA font-light mb-4"> <span className="text-tiny lg:text-xs text-green7B dark:text-greenBA font-light mb-4">
{"پایه" + " " + grades[product?.gradeId]} {"پایه" + " " + grades[product?.gradeId]}
</span> </span>
<div className="w-full flex flex-row justify-center font-bold lg:font-medium text-lg lg:text-sm text-blue5F dark:text-white"> <div className="w-full flex justify-center font-bold lg:font-medium text-lg lg:text-sm text-blue5F dark:text-white">
{product?.product[0]?.price + " " + "تومان"} {product?.product[0]?.price + " " + "تومان"}
</div> </div>
</Link> </Link>
@ -127,7 +127,7 @@ export const Main = ({ books, filterOptions, grades }) => {
<span className="text-tiny lg:text-xs text-green7B dark:text-greenBA font-light mb-4"> <span className="text-tiny lg:text-xs text-green7B dark:text-greenBA font-light mb-4">
{"پایه" + " " + grades[product?.gradeId]} {"پایه" + " " + grades[product?.gradeId]}
</span> </span>
<div className="w-full flex flex-row justify-center font-bold lg:font-medium text-lg lg:text-sm text-blue5F dark:text-white"> <div className="w-full flex justify-center font-bold lg:font-medium text-lg lg:text-sm text-blue5F dark:text-white">
{product?.product[1]?.price + " " + "تومان"} {product?.product[1]?.price + " " + "تومان"}
</div> </div>
</Link> </Link>

@ -4,7 +4,7 @@ import linkIcon from "./links.svg";
export default function Links({ data }) { export default function Links({ data }) {
return ( return (
<div className="w-full flex-row justify-between items-center rounded-md bg-yellow-100 bg-opacity-20 py-3 px-2 mt-5 relative dark:bg-opacity-10"> <div className="w-full justify-between items-center rounded-md bg-yellow-100 bg-opacity-20 py-3 px-2 mt-5 relative dark:bg-opacity-10">
<div className="flex flex-col"> <div className="flex flex-col">
<strong className="text-sm font-normal dark:text-white">لینک ها</strong> <strong className="text-sm font-normal dark:text-white">لینک ها</strong>
{data.map((link, i) => ( {data.map((link, i) => (

@ -3,7 +3,7 @@ import pdfIcon from "./pdf.svg";
export default function PDF({ data }) { export default function PDF({ data }) {
return ( return (
<div className="w-full flex-row justify-between items-center rounded-md bg-red-100 bg-opacity-50 py-6 px-2 mt-5 relative dark:bg-opacity-10"> <div className="w-full justify-between items-center rounded-md bg-red-100 bg-opacity-50 py-6 px-2 mt-5 relative dark:bg-opacity-10">
<strong className="text-right text-red-900 text-xs font-normal dark:text-white">{data.name}</strong> <strong className="text-right text-red-900 text-xs font-normal dark:text-white">{data.name}</strong>
<img src={pdfIcon} className="w-8 absolute left-2 top-1/2 transform -translate-y-1/2" /> <img src={pdfIcon} className="w-8 absolute left-2 top-1/2 transform -translate-y-1/2" />
</div> </div>

@ -12,7 +12,7 @@ export default function Tab({ data }) {
const [dataType, setDataType] = useState("all"); const [dataType, setDataType] = useState("all");
return ( return (
<div className="w-full flex flex-col rounded-md overflow-hidden mt-5 border border-solid border-blueFF1 dark:border-opacity-10"> <div className="w-full flex flex-col rounded-md overflow-hidden mt-5 border border-solid border-blueFF1 dark:border-opacity-10">
<div className="w-full flex flex-row justify-between"> <div className="w-full flex justify-between">
<button <button
onClick={() => setDataType("all")} onClick={() => setDataType("all")}
className={`py-2 w-1/6 border-b border-solid text-blueC0 text-sm dark:bg-opacity-10 dark:text-white border-blueFF1 dark:border-opacity-10 ${ className={`py-2 w-1/6 border-b border-solid text-blueC0 text-sm dark:bg-opacity-10 dark:text-white border-blueFF1 dark:border-opacity-10 ${

@ -10,7 +10,7 @@ function Code({ codeId, setCodeId, userId, factorId }) {
} }
return ( return (
<div className="flex w-full flex-row border border-blueC0 border-solid rounded-md mt-3 mb-4 overflow-hidden lg:w-2/5 lg:mt-5"> <div className="flex w-full border border-blueC0 border-solid rounded-md mt-3 mb-4 overflow-hidden lg:w-2/5 lg:mt-5">
<input <input
type="text" type="text"
className="border-0 flex-1 text-right pr-3 font-medium text-tiny dark:bg-gray2077 placeholder:text-blue5F dark:text-white outline-none lg:text-base lg:font-bold" className="border-0 flex-1 text-right pr-3 font-medium text-tiny dark:bg-gray2077 placeholder:text-blue5F dark:text-white outline-none lg:text-base lg:font-bold"

@ -11,8 +11,8 @@ import deleteIcon from "../../../assets/icons/delete.svg";
function Product({ product, grades, pushToCart, isMobile, loading }) { function Product({ product, grades, pushToCart, isMobile, loading }) {
return isMobile ? ( return isMobile ? (
<div className="flex flex-row justify-between py-5 border-b border-solid border-grayDB dark:border-gray45"> <div className="flex justify-between py-5 border-b border-solid border-grayDB dark:border-gray45">
<div className="flex flex-row "> <div className="flex ">
<img <img
src={"https://dnvn.ir/api/v1/file/" + product.product.book.fileIds} src={"https://dnvn.ir/api/v1/file/" + product.product.book.fileIds}
className="rounded-md w-20" className="rounded-md w-20"
@ -48,7 +48,7 @@ function Product({ product, grades, pushToCart, isMobile, loading }) {
/> />
<div className="flex flex-col items-center"> <div className="flex flex-col items-center">
{product.productType === 2 && ( {product.productType === 2 && (
<div className="flex flex-row items-center mb-3"> <div className="flex items-center mb-3">
<button <button
className="rounded-md pt-2 pb-1.5 px-3 border border-solid border-blueC0 text-blueC0" className="rounded-md pt-2 pb-1.5 px-3 border border-solid border-blueC0 text-blueC0"
onClick={() => onClick={() =>
@ -114,7 +114,7 @@ function Product({ product, grades, pushToCart, isMobile, loading }) {
</div> </div>
) : ( ) : (
<div <div
className="flex flex-row w-full gap-10 py-4 border-b border-solid border-gray-200" className="flex w-full gap-10 py-4 border-b border-solid border-gray-200"
onClick={() => localStorage.setItem("cartItem", product?.id)} onClick={() => localStorage.setItem("cartItem", product?.id)}
> >
<div className="w-3/4 flex flex-row"> <div className="w-3/4 flex flex-row">
@ -126,7 +126,7 @@ function Product({ product, grades, pushToCart, isMobile, loading }) {
<strong className="text-lg text-blue5F mb-1 dark:text-white font-semibold"> <strong className="text-lg text-blue5F mb-1 dark:text-white font-semibold">
{product?.product?.book?.name} {product?.product?.book?.name}
</strong> </strong>
<div className="flex flex-row items-center mt-4"> <div className="flex items-center mt-4">
<span className="w-2 h-2 bg-greenBA rounded-md ml-1"></span> <span className="w-2 h-2 bg-greenBA rounded-md ml-1"></span>
<div className="text-gray70 text-sm dark:text-greenBA"> <div className="text-gray70 text-sm dark:text-greenBA">
{"پایه" + " " + grades[product?.product?.book?.gradeId]} {"پایه" + " " + grades[product?.product?.book?.gradeId]}
@ -136,7 +136,7 @@ function Product({ product, grades, pushToCart, isMobile, loading }) {
{product?.productType === 2 ? "نسخه فیزیکی" : "نسخه دیجیتال"} {product?.productType === 2 ? "نسخه فیزیکی" : "نسخه دیجیتال"}
</div> </div>
</div> </div>
<div className="flex flex-row items-center pl-4 mt-6"> <div className="flex items-center pl-4 mt-6">
<strong className="font-semibold text-xl text-blue5F dark:text-white"> <strong className="font-semibold text-xl text-blue5F dark:text-white">
&nbsp;{separate(product?.product?.price * product.count)} &nbsp;{separate(product?.product?.price * product.count)}
&nbsp;&nbsp;تومان &nbsp;&nbsp;تومان
@ -144,7 +144,7 @@ function Product({ product, grades, pushToCart, isMobile, loading }) {
</div> </div>
</div> </div>
</div> </div>
<div className="w-1/4 flex flex-row items-center"> <div className="w-1/4 flex items-center">
<button <button
className="rounded-md pt-1 px-1.5 border border-solid border-blueC0 text-blueC0 text-lg font-bold" className="rounded-md pt-1 px-1.5 border border-solid border-blueC0 text-blueC0 text-lg font-bold"
onClick={() => onClick={() =>

@ -85,7 +85,7 @@ function ShoppingCart({
const Table = () => { const Table = () => {
return ( return (
<div className="w-full flex flex-col"> <div className="w-full flex flex-col">
<header className="w-full flex flex-row gap-10"> <header className="w-full flex gap-10">
<strong className="w-3/4 pb-2 border-b border-solid border-gray-200 text-gray70 text-sm font-normal"> <strong className="w-3/4 pb-2 border-b border-solid border-gray-200 text-gray70 text-sm font-normal">
کالاهای انتخابی کالاهای انتخابی
</strong> </strong>
@ -112,7 +112,7 @@ function ShoppingCart({
const PriceStatus = ({ name, value, type }) => { const PriceStatus = ({ name, value, type }) => {
return isMobile ? ( return isMobile ? (
<div className="w-full flex flex-row justify-between py-3"> <div className="w-full flex justify-between py-3">
<strong className="font-semibold text-tiny dark:text-white text-blue5F"> <strong className="font-semibold text-tiny dark:text-white text-blue5F">
{name} {name}
</strong> </strong>
@ -138,7 +138,7 @@ function ShoppingCart({
</span> </span>
</div> </div>
) : ( ) : (
<div className="w-full flex flex-row justify-between py-4"> <div className="w-full flex justify-between py-4">
<strong className="font-semibold text-tiny dark:text-white text-blue5F"> <strong className="font-semibold text-tiny dark:text-white text-blue5F">
{name} {name}
</strong> </strong>
@ -217,7 +217,7 @@ function ShoppingCart({
type="error" type="error"
/> */} /> */}
</div> </div>
<div className="flex flex-row justify-between items-center w-full py-3"> <div className="flex justify-between items-center w-full py-3">
<strong className="font-bold text-tiny text-blue5F dark:text-white"> <strong className="font-bold text-tiny text-blue5F dark:text-white">
جمع کل سبد خرید جمع کل سبد خرید
</strong> </strong>
@ -228,7 +228,7 @@ function ShoppingCart({
</p> </p>
</div> </div>
<div <div
className="w-full rounded-md flex flex-row justify-center items-center py-2.5 px-3 mt-5 mb-4" className="w-full rounded-md flex justify-center items-center py-2.5 px-3 mt-5 mb-4"
style={{ backgroundColor: isDark ? "#DEFFF111" : "#DEFFF188" }} style={{ backgroundColor: isDark ? "#DEFFF111" : "#DEFFF188" }}
> >
<img src={alertIcon} className="w-5 ml-2" /> <img src={alertIcon} className="w-5 ml-2" />
@ -246,7 +246,7 @@ function ShoppingCart({
/> />
{phase !== "products" && ( {phase !== "products" && (
<button <button
className="bg-transparent mt-4 text-base border border-blueC0 text-blueC0 font-bold rounded-md py-3.5 flex flex-row justify-center items-center" className="bg-transparent mt-4 text-base border border-blueC0 text-blueC0 font-bold rounded-md py-3.5 flex justify-center items-center"
onClick={() => setPhase("products")} onClick={() => setPhase("products")}
> >
{window.t("بازگشت")} {window.t("بازگشت")}
@ -271,7 +271,7 @@ function ShoppingCart({
</div> </div>
) : ( ) : (
<div <div
className={`w-11/12 mx-auto flex flex-row relative gap-10 px-5 mt-10 pb-20 pt-16 ${ className={`w-11/12 mx-auto flex relative gap-10 px-5 mt-10 pb-20 pt-16 ${
desktopContentTransform ? "top-24" : "" desktopContentTransform ? "top-24" : ""
}`} }`}
> >
@ -309,7 +309,7 @@ function ShoppingCart({
type="error" type="error"
/> */} /> */}
</div> </div>
<div className="flex flex-row justify-between items-center w-full py-4 border-t border-b border-grayDB border-solid"> <div className="flex justify-between items-center w-full py-4 border-t border-b border-grayDB border-solid">
<strong className="font-semibold text-tiny text-blue5F dark:text-white"> <strong className="font-semibold text-tiny text-blue5F dark:text-white">
جمع کل سبد خرید جمع کل سبد خرید
</strong> </strong>
@ -322,7 +322,7 @@ function ShoppingCart({
</div> </div>
{phase === "products" && ( {phase === "products" && (
<div <div
className="w-full rounded-md flex flex-row justify-center items-center py-2.5 px-3 mt-5 mb-4" className="w-full rounded-md flex justify-center items-center py-2.5 px-3 mt-5 mb-4"
style={{ backgroundColor: "#DEFFF188" }} style={{ backgroundColor: "#DEFFF188" }}
> >
<img src={alertIcon} className="w-5 ml-2" /> <img src={alertIcon} className="w-5 ml-2" />
@ -377,7 +377,7 @@ function ShoppingCart({
/> />
{phase === "deliveryForm" && ( {phase === "deliveryForm" && (
<button <button
className="bg-transparent mt-4 text-base lg:text-tiny border border-blueC0 text-blueC0 font-bold rounded-md py-3.5 lg:py-4 flex flex-row justify-center items-center" className="bg-transparent mt-4 text-base lg:text-tiny border border-blueC0 text-blueC0 font-bold rounded-md py-3.5 lg:py-4 flex justify-center items-center"
onClick={() => setPhase("products")} onClick={() => setPhase("products")}
> >
{window.t("بازگشت")} {window.t("بازگشت")}

@ -18,7 +18,7 @@ const Videos = ({ videos }) => {
return ( return (
<div <div
className="flex flex-row w-full bg-gray-300" className="flex w-full bg-gray-300"
style={{ height: "calc(100vh / 1.5)" }} style={{ height: "calc(100vh / 1.5)" }}
></div> ></div>
); );

@ -110,7 +110,7 @@ const Season = ({
onClick={() => toggle(season[0].categoryId)} onClick={() => toggle(season[0].categoryId)}
> >
<button <button
className="flex flex-row justify-between items-center rounded-md py-3 px-3 mb-3 bg-blueC0 bg-opacity-5 border border-solid border-green-300" className="flex justify-between items-center rounded-md py-3 px-3 mb-3 bg-blueC0 bg-opacity-5 border border-solid border-green-300"
// onClick={() => // onClick={() =>
// setActiveSeason(season.name === activeSeason ? null : season.name) // setActiveSeason(season.name === activeSeason ? null : season.name)
// } // }
@ -148,7 +148,7 @@ const Season = ({
) : ( ) : (
<li className="w-full flex flex-col bg-blueC0 bg-opacity-10 rounded-md overflow-hidden shadow-md mb-1"> <li className="w-full flex flex-col bg-blueC0 bg-opacity-10 rounded-md overflow-hidden shadow-md mb-1">
<header <header
className="w-full flex flex-row justify-between items-center py-3 px-6" className="w-full flex justify-between items-center py-3 px-6"
onClick={() => toggle(season[0].categoryId)} onClick={() => toggle(season[0].categoryId)}
> >
<strong className="text-tiny text-green7B font-medium"> <strong className="text-tiny text-green7B font-medium">

@ -56,7 +56,7 @@ function Video({
)} )}
<div className="w-full flex flex-col"> <div className="w-full flex flex-col">
<div <div
className="w-full flex flex-row flex-1 = relative overflow-hidden" className="w-full flex flex-1 = relative overflow-hidden"
style={{}} style={{}}
> >
<img <img
@ -111,7 +111,7 @@ function Video({
</div> </div>
) : ( ) : (
<div className="flex flex-col w-11/12 min-h-screen mx-auto pb-20 pt-24"> <div className="flex flex-col w-11/12 min-h-screen mx-auto pb-20 pt-24">
<header className="w-full flex flex-row gap-12"> <header className="w-full flex gap-12">
<div className="w-9/12"> <div className="w-9/12">
<Videos videos={book?.fileIds} /> <Videos videos={book?.fileIds} />
{seasons?.length > 0 && ( {seasons?.length > 0 && (
@ -185,11 +185,11 @@ function Video({
</div> </div>
</div> </div>
<div className="bg-grayF9 w-full flex flex-col rounded-md divide-y divide-solid divide-gray-200 mb-4 px-4"> <div className="bg-grayF9 w-full flex flex-col rounded-md divide-y divide-solid divide-gray-200 mb-4 px-4">
<div className="flex flex-row items-center w-full gap-5 my-5"> <div className="flex items-center w-full gap-5 my-5">
<img src={tickIcon} alt="" className="w-9" /> <img src={tickIcon} alt="" className="w-9" />
<p className="text-blue52 text-sm font-light">{`توصیه خرید توسط ${book?.product[2]?.suggestedCounter} نفر`}</p> <p className="text-blue52 text-sm font-light">{`توصیه خرید توسط ${book?.product[2]?.suggestedCounter} نفر`}</p>
</div> </div>
<div className="flex flex-row items-center py-3"> <div className="flex items-center py-3">
<img <img
src={ src={
isDark ? bookmarkDeactiveDarkIcon : bookmarkDeactiveLightIcon isDark ? bookmarkDeactiveDarkIcon : bookmarkDeactiveLightIcon
@ -203,7 +203,7 @@ function Video({
</span> </span>
</div> </div>
<div className="flex flex-col w-full py-4 px-4"> <div className="flex flex-col w-full py-4 px-4">
<div className="flex flex-row items-center justify-center gap-2"> <div className="flex items-center justify-center gap-2">
<strong className="text-blueC0 text-5xl"> <strong className="text-blueC0 text-5xl">
{separate(book?.product[2]?.price)} {separate(book?.product[2]?.price)}
</strong> </strong>
@ -240,7 +240,7 @@ function Video({
</div> </div>
<Link <Link
to={"/products/" + location.getId()} to={"/products/" + location.getId()}
className="bg-blueC0 text-green7B bg-opacity-5 font-semibold text-tiny rounded-md border border-solid border-blueC0 w-full py-4 text-center flex flex-row items-center justify-center" className="bg-blueC0 text-green7B bg-opacity-5 font-semibold text-tiny rounded-md border border-solid border-blueC0 w-full py-4 text-center flex items-center justify-center"
> >
مشاهده کتاب این محصول مشاهده کتاب این محصول
<img src={arrow} alt="" className="mr-2 transform rotate-90 w-5" /> <img src={arrow} alt="" className="mr-2 transform rotate-90 w-5" />

@ -5,7 +5,7 @@ const Season = ({ season }) => {
const Unit = ({ unit }) => { const Unit = ({ unit }) => {
return ( return (
<div className="w-full flex flex-col rounded-md overflow-hidden mb-3 border border-solid border-blueFE dark:border-opacity-60 bg-blueFF dark:bg-opacity-10"> <div className="w-full flex flex-col rounded-md overflow-hidden mb-3 border border-solid border-blueFE dark:border-opacity-60 bg-blueFF dark:bg-opacity-10">
<div className="w-full flex flex-row justify-between items-center py-3 px-2 border-b border-solid border-blueFE dark:border-opacity-60"> <div className="w-full flex justify-between items-center py-3 px-2 border-b border-solid border-blueFE dark:border-opacity-60">
<strong className="text-blueC0 text-sm dark:text-white font-normal"> <strong className="text-blueC0 text-sm dark:text-white font-normal">
{unit.name} {unit.name}
</strong> </strong>
@ -17,7 +17,7 @@ const Season = ({ season }) => {
{unit.play && ( {unit.play && (
<Link <Link
to={"/videos/0/display"} to={"/videos/0/display"}
className="flex flex-1 flex-row items-center py-2.5 px-2 border-l border-solid border-blueFE dark:border-opacity-60 justify-center text-sm text-blueC0 dark:text-white" className="flex flex-1 items-center py-2.5 px-2 border-l border-solid border-blueFE dark:border-opacity-60 justify-center text-sm text-blueC0 dark:text-white"
> >
نمایش نمایش
</Link> </Link>
@ -25,7 +25,7 @@ const Season = ({ season }) => {
{unit.download && ( {unit.download && (
<Link <Link
to="/videos/0/download" to="/videos/0/download"
className="flex flex-1 flex-row items-center py-2.5 px-2 justify-center text-sm text-blueC0 dark:text-white" className="flex flex-1 items-center py-2.5 px-2 justify-center text-sm text-blueC0 dark:text-white"
> >
دانلود دانلود
</Link> </Link>
@ -36,7 +36,7 @@ const Season = ({ season }) => {
}; };
return ( return (
<div className="w-full flex flex-col"> <div className="w-full flex flex-col">
<button className="flex flex-row justify-between items-center rounded-md py-3 px-3 mb-3 bg-blueC0"> <button className="flex justify-between items-center rounded-md py-3 px-3 mb-3 bg-blueC0">
<strong className="text-sm text-white font-medium"> <strong className="text-sm text-white font-medium">
{season.name} {season.name}
</strong> </strong>

@ -39,7 +39,7 @@ function VideoDisplay({
</div> </div>
) : ( ) : (
<div className="w-11/12 flex flex-col mb-6 justify-center items-center mx-auto pt-24 pb-20"> <div className="w-11/12 flex flex-col mb-6 justify-center items-center mx-auto pt-24 pb-20">
<div className="w-full flex flex-row justify-between overflow-hidden relative gap-2 mt-4"> <div className="w-full flex justify-between overflow-hidden relative gap-2 mt-4">
<div className="flex flex-col w-8/12"> <div className="flex flex-col w-8/12">
<JolPlayer <JolPlayer
fileIds={selectedVideo?.fileIds} fileIds={selectedVideo?.fileIds}

@ -8,7 +8,7 @@ function MostViewedVideo({ videos, grades }) {
return ( return (
<div className="w-full flex flex-col"> <div className="w-full flex flex-col">
<Header title="پربازدیدترین" link="/videos/video" /> <Header title="پربازدیدترین" link="/videos/video" />
<div className="w-full flex flex-row overflow-x-scroll pb-4 no-scrollbar"> <div className="w-full flex overflow-x-scroll pb-4 no-scrollbar">
{videos.map((video, index) => ( {videos.map((video, index) => (
<Video key={index} video={video} grades={grades} /> <Video key={index} video={video} grades={grades} />
))} ))}
@ -24,7 +24,7 @@ const Video = ({ video, grades }) => {
className="flex flex-col rounded-md ml-4 shadow-md p-2 border border-solid border-gray-200 dark:border-opacity-30 mt-3" className="flex flex-col rounded-md ml-4 shadow-md p-2 border border-solid border-gray-200 dark:border-opacity-30 mt-3"
> >
<div <div
className="w-full flex flex-row flex-1 justify-between items-center relative overflow-hidden" className="w-full flex flex-1 justify-between items-center relative overflow-hidden"
style={{ style={{
backgroundImage: `url(${posterImage})`, backgroundImage: `url(${posterImage})`,
backgroundSize: "100% 100%", backgroundSize: "100% 100%",
@ -44,7 +44,7 @@ const Video = ({ video, grades }) => {
<strong className="text-base mt-0 text-blue5F dark:text-white font-bold"> <strong className="text-base mt-0 text-blue5F dark:text-white font-bold">
{"دوره ویدئویی" + " " + video.name} {"دوره ویدئویی" + " " + video.name}
</strong> </strong>
<div className="w-full flex flex-row justify-between items-center mt-3"> <div className="w-full flex justify-between items-center mt-3">
<span className="text-green7B text-sm dark:text-white"> <span className="text-green7B text-sm dark:text-white">
{"پایه" + " " + grades[video.gradeId]} {"پایه" + " " + grades[video.gradeId]}
</span> </span>

@ -9,7 +9,7 @@ const NewestVideo = ({ videos, grades }) => {
return ( return (
<div className="w-full flex flex-col"> <div className="w-full flex flex-col">
<Header title="جدیدترین دورهها" link="/videos/video" /> <Header title="جدیدترین دورهها" link="/videos/video" />
<div className="w-full flex flex-row flex-wrap justify-between overflow-x-scroll mt-3"> <div className="w-full flex flex-wrap justify-between overflow-x-scroll mt-3">
{videos.slice(0, 4).map((video, index) => ( {videos.slice(0, 4).map((video, index) => (
<Video key={index} video={video} grades={grades} /> <Video key={index} video={video} grades={grades} />
))} ))}

@ -15,7 +15,7 @@ const VerticalGradeFilter = ({ grades }) => {
return ( return (
<div className="w-full flex flex-col mt-3"> <div className="w-full flex flex-col mt-3">
<Header title={"پایه تحصیلی"} link="videos/video" /> <Header title={"پایه تحصیلی"} link="videos/video" />
<div className="flex flex-row w-full overflow-x-scroll pb-3"> <div className="flex w-full overflow-x-scroll pb-3">
{Object.keys(grades).map((grade, index) => ( {Object.keys(grades).map((grade, index) => (
<Grade grade={grade} key={index} /> <Grade grade={grade} key={index} />
))} ))}

Loading…
Cancel
Save