diff --git a/src/views/Home/HomeSearch/Select/index.js b/src/views/Home/HomeSearch/Select/index.js
index 92625ec..32afa4f 100644
--- a/src/views/Home/HomeSearch/Select/index.js
+++ b/src/views/Home/HomeSearch/Select/index.js
@@ -56,7 +56,8 @@ export default function CustomizedSelects(props) {
parent.setState({
filters: {
...parent.state.filters,
- [name]: e.target.value === "همه" ? [] : [e.target.value],
+ [name]:
+ e.target.value === "پایه تحصیلی" ? [] : [e.target.value],
},
})
}
diff --git a/src/views/Home/HomeSearch/index.js b/src/views/Home/HomeSearch/index.js
index 512036f..cc62780 100644
--- a/src/views/Home/HomeSearch/index.js
+++ b/src/views/Home/HomeSearch/index.js
@@ -25,7 +25,7 @@ class HomeSearch extends Component {
render() {
const { height, levels } = this.props;
- return (
+ return window.innerWidth > 1000 ? (
+ >
);
}
}
diff --git a/src/views/Home/HomeSearch/index.scss b/src/views/Home/HomeSearch/index.scss
index 85cc2ff..a67fcff 100644
--- a/src/views/Home/HomeSearch/index.scss
+++ b/src/views/Home/HomeSearch/index.scss
@@ -48,9 +48,10 @@
padding: 5px 10px 5px 100px !important;
}
}
+
&__select {
- position: relative;
- margin-left: 20px;
+ // position: relative;
+ // margin-left: 20px;
& img {
position: absolute;
left: 27px;
@@ -67,3 +68,99 @@
padding: 7px 50px;
}
}
+
+.home-mobile-search {
+ // width: 100%;
+ // padding: 5px;
+ // box-shadow: 0px 0px 2px rgb(200, 200, 200);
+ // border-radius: 7px;
+ justify-content: space-between;
+ align-items: center;
+ flex: 1;
+ margin: 10px 7px 0;
+ font-family: numeralLight;
+ &__input:focus {
+ // border: 1px solid green;
+ box-shadow: 0px 0px 6px rgb(42, 197, 63);
+ }
+ &__input {
+ width: 100%;
+ padding: 10px;
+ box-shadow: 0px 0px 2px rgb(200, 200, 200);
+ border: 0px;
+ flex: 1;
+ border: 0px;
+ border-radius: 7px;
+ font-size: 11px;
+ color: green;
+ // padding: 5px 10px 0px;
+ font-size: 16px;
+ &::placeholder {
+ color: #d8dce5;
+ font-size: 16px;
+ }
+ &:focus {
+ outline: 0px !important;
+ }
+ }
+ .MuiFormControl-root {
+ margin: 0px !important;
+ margin-right: 0px !important;
+ width: 100%;
+ select:focus {
+ // border: 1px solid green;
+ box-shadow: 0px 0px 6px rgb(42, 197, 63);
+ }
+ select {
+ padding: 10px;
+ box-shadow: 0px 0px 2px rgb(200, 200, 200);
+ font-family: numeralLight;
+ height: 100%;
+ width: 100% !important;
+ direction: rtl;
+ border: 0px !important;
+ border-radius: 7px;
+ text-align: center !important;
+
+ color: #02733c !important;
+ &:focus {
+ background-color: white !important;
+ }
+ }
+ .MuiNativeSelect-icon {
+ display: none;
+ }
+ .MuiNativeSelect-select {
+ // padding: 5px 10px 5px 100px !important;
+ }
+ }
+ &__select {
+ position: relative;
+ width: 100%;
+ // margin-left: 5px;
+ position: relative;
+ top: 5px;
+ & img {
+ position: relative;
+ top: -20px;
+ left: 10px;
+ float: left;
+ width: 20px;
+ height: 10px;
+ }
+ select {
+ width: 100%;
+ }
+ }
+ &__submit {
+ position: relative;
+ top: -37px;
+ left: 5px;
+ border: 0px;
+ background-color: #7dc241;
+ font-size: 13px;
+ color: white;
+ border-radius: 5px;
+ padding: 5px 7px;
+ }
+}
diff --git a/src/views/Home/HomeSlider/Blog/index.js b/src/views/Home/HomeSlider/Blog/index.js
index f662cbb..3e6950e 100644
--- a/src/views/Home/HomeSlider/Blog/index.js
+++ b/src/views/Home/HomeSlider/Blog/index.js
@@ -110,14 +110,19 @@ export default class Simple extends Component {
{/*
*/}
-
+
مطالعه کامل در {data.duration} دقیقه
تاریخ انتشار {moment(data.createdAt).format("YYYY/MM/DD")}
-
{data.buttonText}
+
+ {data.buttonText || "ادامه مطلب"}
+
-
{data.name}
-
{data.subTitle}
+
+ {data.name}
+
+ {data.subTitle ? (
+
+ {data.subTitle}
+
+ ) : null}
{data.price ? (
{data.price} تومان
diff --git a/src/views/Home/HomeSlider/Simple/index.scss b/src/views/Home/HomeSlider/Simple/index.scss
index 7afd08e..f59cc23 100644
--- a/src/views/Home/HomeSlider/Simple/index.scss
+++ b/src/views/Home/HomeSlider/Simple/index.scss
@@ -1,5 +1,6 @@
.slider-simple {
- padding: 10px;
+ padding: 0 10px;
+ text-align: center;
a {
width: 100%;
text-decoration: none;
@@ -13,13 +14,14 @@
}
h1 {
font-family: numeralMedium;
- margin-top: 15px;
- color: #7dc241;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ color: #41c26f;
letter-spacing: -1px;
}
h2 {
font-family: numeralLight;
- margin-top: 10px;
+ margin-top: 5px;
color: #6f7074;
}
}
@@ -32,7 +34,7 @@
}
&__price {
width: 100%;
- margin-top: 15px;
+ margin-top: 5px;
text-align: center;
&--old {
font-family: numeralLight;
diff --git a/src/views/Home/HomeSlider/index.js b/src/views/Home/HomeSlider/index.js
index 8158929..7ee34be 100644
--- a/src/views/Home/HomeSlider/index.js
+++ b/src/views/Home/HomeSlider/index.js
@@ -146,7 +146,7 @@ export default class HomeSlider extends Component {
itemsToShow={number}
isRTL={true}
enableTilt={false}
- showArrows={true}
+ showArrows={false}
pagination={false}
>
{data.map((item, i) => (
diff --git a/src/views/Home/HomeStatic/Identifier/index.js b/src/views/Home/HomeStatic/Identifier/index.js
index 0d0be38..0752b61 100644
--- a/src/views/Home/HomeStatic/Identifier/index.js
+++ b/src/views/Home/HomeStatic/Identifier/index.js
@@ -1,29 +1,17 @@
-import React from 'react';
-import Flex from '../Flex/index';
-import Simple from '../Simple/index';
-import Vitrin from '../Vitrin/index';
-import Column from '../3D/index';
+import React from "react";
+import Flex from "../Flex/index";
+import Simple from "../Simple/index";
+import Vitrin from "../Vitrin/index";
+import Column from "../3D/index";
-export default function Identifier(props){
- const {data} = props;
- return(
+export default function Identifier(props) {
+ const { data, status } = props;
+ return (
<>
- {
- data.design === 'flex' ?
-
: null
- }
- {
- data.design === 'simple' ?
-
: null
- }
- {
- data.design === 'vitrin' ?
-
: null
- }
- {
- data.design === '3d' ?
-
: null
- }
+ {data.design === "flex" ?
: null}
+ {data.design === "simple" ?
: null}
+ {data.design === "vitrin" ?
: null}
+ {data.design === "3d" ?
: null}
>
);
-}
\ No newline at end of file
+}
diff --git a/src/views/Home/HomeStatic/Simple/index.js b/src/views/Home/HomeStatic/Simple/index.js
index 4e354fa..90252cc 100644
--- a/src/views/Home/HomeStatic/Simple/index.js
+++ b/src/views/Home/HomeStatic/Simple/index.js
@@ -9,7 +9,7 @@ const fontSize = {
};
export default function Simple(props) {
- const { data } = props;
+ const { data, status } = props;
const parentStyle = {
// backgroundImage: `url('${data.imageUrl}')`,
background: data.fileId
diff --git a/src/views/Home/HomeStatic/Vitrin/index.js b/src/views/Home/HomeStatic/Vitrin/index.js
index 946bf16..8b2d0ba 100644
--- a/src/views/Home/HomeStatic/Vitrin/index.js
+++ b/src/views/Home/HomeStatic/Vitrin/index.js
@@ -23,38 +23,39 @@ export default function Vitrin(props) {
};
return (
-
-
+
{data.title}
-
+
{data.books.map((item, i) => (
))}
-
+
مشاهده بیشتر
-
+
-
+
);
}
const Item = (props) => {
const { data } = props;
return (
-
-
+
);
};
diff --git a/src/views/Home/HomeStatic/index.js b/src/views/Home/HomeStatic/index.js
index 772c494..d9cd7f3 100644
--- a/src/views/Home/HomeStatic/index.js
+++ b/src/views/Home/HomeStatic/index.js
@@ -1,9 +1,9 @@
import React, { Component } from "react";
import ChevronLeftIcon from "@material-ui/icons/ChevronLeft";
import Identifier from "./Identifier/index";
-
+import proxy from "~/Redux/proxy";
import "./index.scss";
-
+const status = proxy.status();
const maxDesktopSize = 1250;
const fontSize = {
@@ -49,11 +49,15 @@ export default class HomeStatic extends Component {
{window.innerWidth < 1000 ? (
- {data.map((item, i) => (
-
- ))}
+ {data.map((item, i) =>
+ status ? (
+
+ ) : (
+
+ )
+ )}
) : null}
>
@@ -85,7 +89,29 @@ const Item = (props) => {
alt="عکس"
/>
- ) : null}
+ ) : (
+
+
+
+
+ {props.data.topText}
+
+
+ {props.data.bottomText}
+
+
+
+ )}
>
);
};
diff --git a/src/views/Home/HomeStatic/index.scss b/src/views/Home/HomeStatic/index.scss
index d18bb21..4a9fa42 100644
--- a/src/views/Home/HomeStatic/index.scss
+++ b/src/views/Home/HomeStatic/index.scss
@@ -1,6 +1,7 @@
.home-static {
margin: 20px 0px;
width: 100%;
+ justify-content: space-between;
&__list {
justify-content: space-between;
width: 100%;
@@ -24,6 +25,35 @@
}
}
}
+ &__list2 {
+ justify-content: space-between;
+ // width: 50%;
+ &--item {
+ // box-shadow: 0px 0px 5px rgb(200, 200, 200);
+ border: 1px solid #eee;
+ font-family: numeralMedium;
+ align-items: center;
+ border-radius: 10px;
+ margin: 5px;
+ padding: 15px 10px;
+ justify-content: space-around;
+ text-align: center;
+ div {
+ text-align: right;
+ h2 {
+ // font-weight: bold;
+ font-size: 20px;
+ letter-spacing: -1px;
+ }
+ }
+ img {
+ padding-top: 5px;
+ margin: auto;
+ // border-radius: 10px;
+ height: 35px;
+ }
+ }
+ }
}
.mobile-home-static {
diff --git a/src/views/Home/Navbar/Laptop/index.js b/src/views/Home/Navbar/Laptop/index.js
index e67d916..0076713 100644
--- a/src/views/Home/Navbar/Laptop/index.js
+++ b/src/views/Home/Navbar/Laptop/index.js
@@ -91,7 +91,7 @@ export default class LaptopNavbar extends Component {
to={"/auth"}
className="laptop-navbar__signup"
>
- ورود به حساب کاربری
+ ورود یا ثبتنام
>
)}
diff --git a/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js b/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js
index e2ad286..c0c1c29 100644
--- a/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js
+++ b/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js
@@ -20,7 +20,7 @@ import mobileMail from "~/assets/icons/mobileMail.svg";
import mobileProfile from "~/assets/icons/mobileProfile.svg";
import mobileDanger from "~/assets/icons/mobileDanger.svg";
import mobileLogout from "~/assets/icons/mobileLogout.svg";
-
+import proxy from "~/Redux/proxy";
import "./NavbarDrawer.scss";
class NavbarDrawer extends Component {
state = {
@@ -28,44 +28,102 @@ class NavbarDrawer extends Component {
};
render() {
+ const statusx = proxy.status();
+ this.links = [
+ {
+ name: "صفحه اصلی",
+ link: "/",
+ icon:
,
+ toast: "",
+ message: "",
+ },
+ {
+ name: "ورود یا ثبت نام",
+ link: "/auth",
+ icon:
,
+ toast: "",
+ message: "",
+ },
+ {
+ name: "فروشگاه",
+ link: "/products",
+ icon:
,
+ toast: "",
+ message: "",
+ },
+ {
+ name: "بلاگ",
+ link: "/blogs",
+ icon:
,
+ toast: "",
+ message: "",
+ },
+ {
+ name: "پشتیبانی",
+ link: "/support",
+ icon:
,
+ toast: "",
+ message: "",
+ // onClick: this.props.logout,
+ },
+ {
+ name: "خروج",
+ link: "/auth",
+ icon:
,
+ toast: "",
+ message: "",
+ onClick: () => {
+ localStorage.removeItem("refresh");
+ localStorage.removeItem("access");
+ localStorage.removeItem("userData");
+ window.location.reload();
+ },
+ },
+ ];
const { status } = this.props;
+
let score = 2;
return (
-
- <>
-
-
-
{status.firstName + " " + status.lastName}
-
- >
+ {statusx ? (
+
+ <>
+
- {this.state.dropdown ? (
-
this.setState({ dropdown: false })}
- >
- {score ? {score} امتیاز : null}
-
-
- ) : (
-
this.setState({ dropdown: true })}
- >
- {score ? {score} امتیاز : null}{" "}
-
-
- )}
-
+
+
{status.firstName + " " + status.lastName}
+
+ >
+
+ {this.state.dropdown ? (
+
this.setState({ dropdown: false })}
+ >
+ {score ? {score} امتیاز : null}
+
+
+ ) : (
+
this.setState({ dropdown: true })}
+ >
+ {score ? {score} امتیاز : null}{" "}
+
+
+ )}
+
+ ) : null}
{this.state.dropdown ? (
{/* {this.props.users.map((item, i) => (
@@ -87,7 +145,7 @@ class NavbarDrawer extends Component {
) : null}
- {this.props.links.map((item, key) => (
+ {(statusx ? this.props.links : this.links).map((item, key) => (
maxDesktopSize ? 15 : window.innerWidth / 85,
+ a: window.innerWidth > maxDesktopSize ? 15 : window.innerWidth / 85,
+ },
+ mobile: {
+ h1: window.innerWidth > maxMobileSize ? 30 : window.innerWidth / 18,
+ p: window.innerWidth > maxMobileSize ? 18 : window.innerWidth / 28,
+ h2: window.innerWidth > maxMobileSize ? 20 : window.innerWidth / 23,
+ li: window.innerWidth > maxMobileSize ? 16 : window.innerWidth / 28,
+ },
+};
const useStyles = makeStyles({
list: {
width: window.innerWidth * 0.8,
@@ -26,6 +40,7 @@ const useStyles = makeStyles({
});
export default function MobileNavbar(props) {
+ const status = proxy.status();
const classes = useStyles();
const [state, setState] = useState({
top: false,
@@ -63,21 +78,62 @@ export default function MobileNavbar(props) {
/>
);
+ if (!status)
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ ورود یا ثبتنام
+
+ {page !== "home" ? (
+
+
+
+ ) : null}
+
+
+ {list(props, "right")}
+
+
+ );
return (
-
-
+ */}
+
+
+
diff --git a/src/views/Home/Navbar/Mobile/index.scss b/src/views/Home/Navbar/Mobile/index.scss
index 7de9890..7c59898 100644
--- a/src/views/Home/Navbar/Mobile/index.scss
+++ b/src/views/Home/Navbar/Mobile/index.scss
@@ -9,11 +9,27 @@
z-index: 400;
padding: 0px 10px 0px;
height: 50px;
+ box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3);
+ &__signup {
+ font-family: numeralLight;
+ text-decoration: none;
+ color: white;
+ background-color: #6cbe44;
+ border-radius: 6px;
+ padding: 5px 10px;
+ &:hover {
+ color: white;
+ }
+ }
&__menu {
justify-self: flex-start;
img {
width: 26px;
}
+ .logo {
+ width: 85px;
+ margin-right: 10px;
+ }
}
&__logo {
position: absolute;
@@ -26,6 +42,13 @@
width: 85px;
}
}
+ &__logo2 {
+ margin: 0 10px;
+ img {
+ // transform: translate(20px, 0px);
+ width: 85px;
+ }
+ }
&__left {
justify-self: flex-end;
img {
diff --git a/src/views/Home/SingleBlog/index.js b/src/views/Home/SingleBlog/index.js
index 14707eb..2462a42 100644
--- a/src/views/Home/SingleBlog/index.js
+++ b/src/views/Home/SingleBlog/index.js
@@ -32,7 +32,7 @@ export default class SingleBlog extends Component {
style={{ fontSize: fontSize.desktop.a }}
to={"/blogs/" + data.id}
>
- ادامه
+ ادامه مطلب
diff --git a/src/views/Home/index.js b/src/views/Home/index.js
index 8924800..17076ac 100644
--- a/src/views/Home/index.js
+++ b/src/views/Home/index.js
@@ -36,59 +36,46 @@ import Loader from "~/components/Loader/index";
// import home_ar from "~/assets/icons/home_ar(2).png";
import "./index.scss";
+
class Home extends Component {
componentDidMount() {
+ const mobile = window.innerWidth < 1000;
window.scrollTo(0, 0);
- if (window.innerWidth < 1000) {
+ if (mobile && this.props.status) {
this.props.getHomeData({ device: 2 });
} else {
- this.props.getHomeData({ device: 1 });
+ this.props.getHomeData({ device: 1, mobile: mobile ? 1 : 0 });
}
}
render() {
- const { homeData, loading } = this.props;
+ const { homeData, loading, status } = this.props;
+ const mobile = window.innerWidth < 1000;
+ if (loading)
+ return (
+
+
+
+ );
return (
<>
- {window.innerWidth > 1000 ? (
- !loading ? (
- <>
-
-
- {homeData.map((item, i) => (
-
- ))}
-
-
- >
- ) : (
-
-
-
- )
- ) : null}
- {window.innerWidth < 1000 ? (
- !loading ? (
- <>
-
-
- {homeData.map((item, i) => (
-
- ))}
-
- >
- ) : (
-
-
-
- )
- ) : null}
+ <>
+
+
+ {homeData.map((item, i) => (
+
+ ))}
+
+ {window.innerWidth > 1000 ?
: null}
+ >
>
);
}
@@ -144,7 +131,7 @@ const Identifier = (props) => {
/>
) : null
) : null}
- {props.item.type === "search" && window.innerWidth > 1000 ? (
+ {props.item.type === "search" ? (
) : null}
{props.item.type === "membership" && window.innerWidth > 1000 ? (
diff --git a/src/views/MyBooks/index.js b/src/views/MyBooks/index.js
index 6f4c04d..2a5c46c 100644
--- a/src/views/MyBooks/index.js
+++ b/src/views/MyBooks/index.js
@@ -27,7 +27,8 @@ const fontSize = {
class MyBooks extends React.Component {
componentDidMount() {
- this.props.getList();
+ console.log(this.props);
+ // this.props.getList();
window.scrollTo(0, 0);
}
@@ -109,7 +110,7 @@ class MyBooks extends React.Component {
export default connect(
(state) => ({
- list: state.userProduct.mylist,
+ list: state.userProduct.mylist || [],
checkEmpty: state.userProduct.checkEmpty,
// status: state.user.status,
}),
diff --git a/src/views/Products/Product/index.js b/src/views/Products/Product/index.js
index 7dae0ee..a05f714 100644
--- a/src/views/Products/Product/index.js
+++ b/src/views/Products/Product/index.js
@@ -29,8 +29,8 @@ export default class Product extends Component {
return (
<>
{window.innerWidth < 1000 ? (
-
{product.name}
-
@@ -50,7 +50,7 @@ export default class Product extends Component {
{product.product[1].price} تومان
-
+
-
+
) : null}
{window.innerWidth > 1000 ? (