From f0e7f8005cc3f102d427243778c8c95c1e02756f Mon Sep 17 00:00:00 2001 From: RezaAshrafi77 Date: Fri, 27 Aug 2021 19:58:50 +0430 Subject: [PATCH] reza added some changes --- src/AppRouter.js | 12 +- src/Redux/reducers/book.js | 2 - src/views/Auth/Login/Cellphone/index.js | 8 -- src/views/Contact/index.js | 6 +- .../Mobile/NavbarDrawer/NavbarDrawer.js | 2 +- src/views/MyBooks/BreadCrumb/index.js | 45 +++++++ src/views/MyBooks/BreadCrumb/index.scss | 8 ++ src/views/MyBooks/index.js | 120 +++++++----------- src/views/MyBooks/index.scss | 14 ++ src/views/Product/index.scss | 7 +- src/views/QR/BookContent/index.js | 12 +- src/views/QR/BookContent/index.scss | 92 +++++++------- src/views/QR/Image/Modal/index.js | 6 +- src/views/QR/Image/Modal/index.scss | 1 - src/views/QR/Image/index.js | 24 +++- src/views/QR/Image/index.scss | 1 + src/views/QR/PDF/index.js | 80 ++++++++---- src/views/QR/PDF/index.scss | 16 ++- src/views/QR/PowerPoint/index.js | 81 ++++++++---- src/views/QR/PowerPoint/index.scss | 10 ++ src/views/QR/VideoBox/index.js | 43 ++++--- src/views/QR/VideoBox/index.scss | 24 ++-- src/views/QR/VoiceBox/index.js | 4 +- src/views/QR/index.js | 75 +++++++---- src/views/QR/index.scss | 11 +- src/views/Support/index.js | 8 +- 26 files changed, 448 insertions(+), 264 deletions(-) create mode 100644 src/views/MyBooks/BreadCrumb/index.js create mode 100644 src/views/MyBooks/BreadCrumb/index.scss create mode 100644 src/views/MyBooks/index.scss diff --git a/src/AppRouter.js b/src/AppRouter.js index 0cb14e9..16fb2fb 100644 --- a/src/AppRouter.js +++ b/src/AppRouter.js @@ -43,7 +43,7 @@ class AppRouter extends Component { const mobile = window.innerWidth < 1000 ? true : false; let home = mobile ? ( - {proxy.status ? ( + {proxy.status() ? ( this.props.profile ? ( ) : ( @@ -123,7 +123,15 @@ class AppRouter extends Component { - + {proxy.status() ? ( + + ) : ( + + )} diff --git a/src/Redux/reducers/book.js b/src/Redux/reducers/book.js index ccb2049..f98232b 100644 --- a/src/Redux/reducers/book.js +++ b/src/Redux/reducers/book.js @@ -94,8 +94,6 @@ export default function book(state = initialState, action) { ? bySubjectFilter.filter((item1) => item1.name.indexOf(search) !== -1) : bySubjectFilter; - console.log(bySearchFilter); - if (sort === "گران ترین") { finalSort = bySearchFilter.sort((item1, item2) => { return item1.product[0].price - item2.product[0].price; diff --git a/src/views/Auth/Login/Cellphone/index.js b/src/views/Auth/Login/Cellphone/index.js index 4b0a1d1..55afdfd 100644 --- a/src/views/Auth/Login/Cellphone/index.js +++ b/src/views/Auth/Login/Cellphone/index.js @@ -78,10 +78,6 @@ export default class Cellphone extends Component {
-
- {" "} - حساب کاربری ندارید ؟ همین حالا -
شرایط استفاده و حریم خصوصی
@@ -147,10 +143,6 @@ export default class Cellphone extends Component { style={{ fontSize: fontSize.mobile.div }} className="mobile-auth-cellphone__footer d-flex flex-column justify-content-center align-items-center" > -
- {" "} - حساب کاربری ندارید ؟ همین حالا -
شرایط استفاده و حریم خصوصی
diff --git a/src/views/Contact/index.js b/src/views/Contact/index.js index 281ac3d..4c0ebb4 100644 --- a/src/views/Contact/index.js +++ b/src/views/Contact/index.js @@ -36,11 +36,11 @@ class Contact extends Component { } render() { - const { loading, contactData } = this.props; + const { contactData } = this.props; return ( <> {window.innerWidth > 1000 ? ( - !loading ? ( + contactData ? ( <>
@@ -107,7 +107,7 @@ class Contact extends Component { ) ) : null} {window.innerWidth < 1000 ? ( - !loading ? ( + contactData ? (
diff --git a/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js b/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js index 2ad6694..adbae9b 100644 --- a/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js +++ b/src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js @@ -164,7 +164,7 @@ NavbarDrawer.defaultProps = { }, { name: "بلاگ", - link: "/blog", + link: "/blogs", icon: بلاگ, toast: "", message: "", diff --git a/src/views/MyBooks/BreadCrumb/index.js b/src/views/MyBooks/BreadCrumb/index.js new file mode 100644 index 0000000..dbd670a --- /dev/null +++ b/src/views/MyBooks/BreadCrumb/index.js @@ -0,0 +1,45 @@ +import React from "react"; +import Breadcrumbs from "@material-ui/core/Breadcrumbs"; +import { Link } from "react-router-dom"; + +import "./index.scss"; + +function handleClick(event) { + event.preventDefault(); + console.info("You clicked a breadcrumb."); +} + +const maxDesktopSize = 1250; +const maxMobileSize = 650; + +const fontSize = { + desktop: window.innerWidth > maxDesktopSize ? 12 : window.innerWidth / 90, + mobile: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 25, +}; + +export default function ActiveLastBreadcrumb(props) { + const { name } = props; + return ( + + 1000 ? fontSize.desktop : fontSize.mobile, + }} + to={"/"} + > + صفحه اصلی + + 1000 ? fontSize.desktop : fontSize.mobile, + color: "#00CC69", + }} + to={"/mybooks"} + > + کتاب‌های من + + + ); +} diff --git a/src/views/MyBooks/BreadCrumb/index.scss b/src/views/MyBooks/BreadCrumb/index.scss new file mode 100644 index 0000000..e10f243 --- /dev/null +++ b/src/views/MyBooks/BreadCrumb/index.scss @@ -0,0 +1,8 @@ +.MuiBreadcrumbs-li{ + a { + text-decoration: none; + font-family: numeralLight; + color: #6F7074; + letter-spacing: -1px; + } +} diff --git a/src/views/MyBooks/index.js b/src/views/MyBooks/index.js index abf8c0f..928f897 100644 --- a/src/views/MyBooks/index.js +++ b/src/views/MyBooks/index.js @@ -5,6 +5,7 @@ import { Link } from "react-router-dom"; import Navbar from "../Home/Navbar/index"; import Footer from "../Home/Footer/index"; +import BreadCrumbs from "./BreadCrumb/index"; import sciense_6 from "~/assets/images/olum6.jpg"; import sciense_8 from "~/assets/images/olum8.jpg"; @@ -12,7 +13,7 @@ import sciense_9 from "~/assets/images/olum9.jpg"; import sciense_7 from "~/assets/images/olum7.jpg"; import shimi_10 from "~/assets/images/shimi10.jpg"; import zist_10 from "~/assets/images/zist10.jpg"; - +import "./index.scss"; const maxDesktopSize = 1250; const maxMobileSize = 550; @@ -21,6 +22,10 @@ const fontSize = { h1: window.innerWidth > maxMobileSize ? 24 : window.innerWidth / 20, a: window.innerHeight > maxMobileSize ? 15 : window.innerWidth / 30, }, + desktop: { + h1: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 70, + a: window.innerHeight > maxDesktopSize ? 15 : window.innerWidth / 85, + }, }; class MyBooks extends React.Component { @@ -29,13 +34,19 @@ class MyBooks extends React.Component { } render() { - const { books } = this.props; + const { list } = this.props; return ( <> {window.innerWidth > 1000 ? ( <>
+ +
+ {list.map((item, i) => ( + + ))} +