master
Gorji 3 years ago
parent abaa0c00e8
commit ba0f1125b9
  1. 7
      src/Redux/reducers/book.js
  2. BIN
      src/assets/icons/logo.png
  3. BIN
      src/assets/icons/logo2.png
  4. BIN
      src/assets/icons/logoMobile.png
  5. BIN
      src/assets/icons/logoMobile2.png
  6. 3
      src/views/Activation/index.js
  7. 8
      src/views/Activation/index.scss
  8. 62
      src/views/Auth/Profile/index.js
  9. 8
      src/views/Cart/Table/index.js
  10. 2
      src/views/Cart/Table/index.scss
  11. 48
      src/views/ChatRoom/Body/Message/Comment/index.js
  12. 176
      src/views/ChatRoom/Body/Message/Normal/index.js
  13. 46
      src/views/Home/HomeSearch/Select/index.js
  14. 2
      src/views/Home/HomeSearch/index.js
  15. 5
      src/views/Home/HomeStatic/Flex/index.js
  16. 2
      src/views/Home/HomeStatic/Simple/index.js
  17. 13
      src/views/Home/HomeStatic/Vitrin/index.js
  18. 5
      src/views/Home/HomeStatic/index.js
  19. 8
      src/views/Home/HomeStatic/index.scss
  20. 32
      src/views/Home/Membership/index.js
  21. 2
      src/views/Home/Navbar/Laptop/index.js
  22. 19
      src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js
  23. 6
      src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.scss
  24. 2
      src/views/Home/Navbar/Mobile/index.js
  25. 11
      src/views/Home/index.scss
  26. 62
      src/views/NewProfile/index.js
  27. 4
      src/views/Product/AddToCart/index.js
  28. 27
      src/views/Product/index.js
  29. 10
      src/views/Products/Product/index.scss
  30. 30
      src/views/Products/index.js
  31. 8
      src/views/Products/index.scss
  32. 6
      src/views/Support/index.js

@ -11,6 +11,7 @@ const initialState = {
};
const grades = [
"پیش دبستان",
"اول",
"دوم",
"سوم",
@ -32,7 +33,11 @@ export default function book(state = initialState, action) {
if (window.innerWidth < 1000) {
itemsSubject.unshift("نام کتاب");
}
let itemsLevel = data.map((item) => grades[item.gradeId]);
let itemsLevel = data
.map((item) => item.gradeId * 1)
.sort((a, b) => a - b)
.map((e) => grades[e]);
console.log(itemsLevel);
if (window.innerWidth < 1000) {
itemsLevel.unshift("پایه تحصیلی");
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

@ -112,8 +112,7 @@ export default class Activation extends Component {
<div className="mobile-activation__description d-flex">
<span>.</span>
<p style={{ fontSize: fontSize.mobile.p }}>
کد فعال سازی در اختیار شما قرار گرفته است را در قسمت زیر وارد
وارد تا کتاب الکترونیک آن فعالسازی شود
برای خدمات هوشمند کتاب کد فعال سازی را اینجا وارد نمایید
</p>
</div>
<form

@ -6,6 +6,7 @@
direction: rtl;
padding-top: 70px;
overflow-x: hidden;
&__back {
width: 100%;
justify-content: flex-end;
@ -23,7 +24,7 @@
}
}
&__header {
margin-top: 30px;
margin: auto;
h1 {
font-family: numeralBold;
margin-top: 15px;
@ -36,7 +37,7 @@
}
&__description {
width: 100%;
margin-top: 30px;
margin-top: 10px;
span {
font-size: 50px;
color: #00cc69;
@ -55,6 +56,7 @@
font-family: numeralMedium;
position: fixed;
bottom: 20px;
background-color: white !important;
input {
width: 100%;
background-color: #f6f6f6;
@ -80,7 +82,7 @@
border-radius: 10px;
color: white;
border: 0px;
margin-top: 20px;
margin-top: 10px;
letter-spacing: -1px;
&:focus:enabled {
text-decoration: none;

@ -120,6 +120,21 @@ class Profile extends Component {
};
render() {
const grades = [
"پیش دبستان",
"اول",
"دوم",
"سوم",
"چهارم",
"پنجم",
"ششم",
"هفتم",
"هشتم",
"نهم",
"دهم",
"یازدهم",
"دوازدهم",
];
const { user, profile } = this.props;
return (
<>
@ -203,20 +218,7 @@ class Profile extends Component {
<div className="mb-2">
<Select
parent={this}
options={[
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
]}
options={grades}
name="gradeId"
label={"پایه تحصیلی"}
/>
@ -226,7 +228,7 @@ class Profile extends Component {
<div className="mb-2">
<MultipleSelector
parent={this}
options={[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]}
options={grades}
name="gradeId"
label={"پایه تحصیلی"}
selectedOptions={this.state.gradeId}
@ -392,20 +394,7 @@ class Profile extends Component {
{this.state.userRoleId === "دانش آموز" ? (
<Select
parent={this}
options={[
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
]}
options={grades}
name="gradeId"
label={"پایه تحصیلی"}
/>
@ -413,20 +402,7 @@ class Profile extends Component {
{this.state.userRoleId === "معلم" ? (
<MultipleSelector
parent={this}
options={[
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
]}
options={grades}
name="gradeId"
label={"پایه تحصیلی"}
selectedOptions={this.state.gradeId}

@ -63,9 +63,10 @@ function BasicTable(props) {
const classes = useStyles();
const { list, handleCounter, handleDelete, route } = props;
const sum = () => {
console.log(list);
let total = 0;
for (let i = 0; i < list.length; i++) {
total += list[i].number;
total += list[i].count * 1;
}
return total;
};
@ -108,11 +109,6 @@ function BasicTable(props) {
))}
{route === "cart" ? (
<TableRow>
<TableCell
align="right"
component="th"
scope="row"
></TableCell>
<TableCell align="center">
<span style={{ color: "grey" }}>
مبلغ کل {props.payPrice}

@ -3,7 +3,7 @@
font-family: numeralLight;
img {
height: 100px;
width: 70px;
// width: 70px;
border-radius: 10px;
}
&__info {

@ -1,25 +1,25 @@
import React, { Component } from 'react';
import DoneIcon from '@material-ui/icons/Done';
import DoneAllIcon from '@material-ui/icons/DoneAll';
import EditIcon from '@material-ui/icons/Edit';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import './index.scss';
import Menu from '@material-ui/core/Menu';
import MenuItem from '@material-ui/core/MenuItem';
import ReplyIcon from '@material-ui/icons/Reply';
import ForwardIcon from '@material-ui/icons/Forward';
import DeleteIcon from '@material-ui/icons/Delete';
import ScheduleIcon from '@material-ui/icons/Schedule';
import React, { Component } from "react";
import DoneIcon from "@material-ui/icons/Done";
import DoneAllIcon from "@material-ui/icons/DoneAll";
import EditIcon from "@material-ui/icons/Edit";
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
import "./index.scss";
import Menu from "@material-ui/core/Menu";
import MenuItem from "@material-ui/core/MenuItem";
import ReplyIcon from "@material-ui/icons/Reply";
import ForwardIcon from "@material-ui/icons/Forward";
import DeleteIcon from "@material-ui/icons/Delete";
import ScheduleIcon from "@material-ui/icons/Schedule";
const menu = [
{ text: 'پسند', icon: FavoriteIcon, onClick: () => {} },
{ text: 'تبادل نظر', icon: TextsmsIcon, onClick: () => {} },
{ text: 'پاسخ', icon: ReplyIcon, onClick: () => {} },
{ text: 'باز ارسال', icon: ForwardIcon, onClick: () => {} },
{ text: "پسند", icon: FavoriteIcon, onClick: () => {} },
{ text: "تبادل نظر", icon: TextsmsIcon, onClick: () => {} },
{ text: "پاسخ", icon: ReplyIcon, onClick: () => {} },
{ text: "باز ارسال", icon: ForwardIcon, onClick: () => {} },
];
const selfMenu = [
{ text: 'باز ارسال', icon: ForwardIcon, onClick: () => {} },
{ text: 'ویرایش', icon: EditIcon, onClick: () => {} },
{ text: 'حذف', icon: DeleteIcon, onClick: () => {} },
{ text: "باز ارسال", icon: ForwardIcon, onClick: () => {} },
{ text: "ویرایش", icon: EditIcon, onClick: () => {} },
{ text: "حذف", icon: DeleteIcon, onClick: () => {} },
];
export default class Comment extends Component {
state = { messageMenu: null };
@ -42,14 +42,12 @@ export default class Comment extends Component {
<div
className="comment-message d-flex flex-column d-flex"
style={{
filter: document !== null ? 'blur(16px)' : 'blur(0px)',
filter: document !== null ? "blur(4px)" : "blur(0px)",
}}
>
<div className={`comment-message__box`}>
<div
className="comment-message__box--detail d-flex"
>
<div onClick={() => addcounter('nothing')}>
<div className="comment-message__box--detail d-flex">
<div onClick={() => addcounter("nothing")}>
<ExpandMoreIcon fontSize="small" onClick={this.handleClick} />
</div>
<Menu
@ -65,7 +63,7 @@ export default class Comment extends Component {
onClick={() => {
this.handleClose();
e.onClick();
addcounter('nothing');
addcounter("nothing");
}}
>
<e.icon fontSize="small" />

@ -1,33 +1,33 @@
import React, { Component } from 'react';
import ReactAudioPlayer from 'react-audio-player';
import ReactPlayer from 'react-player';
import CloudDownloadIcon from '@material-ui/icons/CloudDownload';
import Avatar from '@material-ui/core/Avatar';
import moment from 'jalali-moment';
import DoneIcon from '@material-ui/icons/Done';
import DoneAllIcon from '@material-ui/icons/DoneAll';
import EditIcon from '@material-ui/icons/Edit';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import './index.scss';
import Menu from '@material-ui/core/Menu';
import MenuItem from '@material-ui/core/MenuItem';
import ReplyIcon from '@material-ui/icons/Reply';
import ForwardIcon from '@material-ui/icons/Forward';
import DeleteIcon from '@material-ui/icons/Delete';
import FavoriteIcon from '@material-ui/icons/Favorite';
import TextsmsIcon from '@material-ui/icons/Textsms';
import ScheduleIcon from '@material-ui/icons/Schedule';
import React, { Component } from "react";
import ReactAudioPlayer from "react-audio-player";
import ReactPlayer from "react-player";
import CloudDownloadIcon from "@material-ui/icons/CloudDownload";
import Avatar from "@material-ui/core/Avatar";
import moment from "jalali-moment";
import DoneIcon from "@material-ui/icons/Done";
import DoneAllIcon from "@material-ui/icons/DoneAll";
import EditIcon from "@material-ui/icons/Edit";
import ExpandMoreIcon from "@material-ui/icons/ExpandMore";
import "./index.scss";
import Menu from "@material-ui/core/Menu";
import MenuItem from "@material-ui/core/MenuItem";
import ReplyIcon from "@material-ui/icons/Reply";
import ForwardIcon from "@material-ui/icons/Forward";
import DeleteIcon from "@material-ui/icons/Delete";
import FavoriteIcon from "@material-ui/icons/Favorite";
import TextsmsIcon from "@material-ui/icons/Textsms";
import ScheduleIcon from "@material-ui/icons/Schedule";
const file = (fileId) => `${window.baseURL}/file/download/${fileId}`;
const menu = [
{ text: 'پسند', icon: FavoriteIcon, onClick: () => {} },
{ text: 'تبادل نظر', icon: TextsmsIcon, onClick: () => {} },
{ text: 'پاسخ', icon: ReplyIcon, onClick: () => {} },
{ text: 'باز ارسال', icon: ForwardIcon, onClick: () => {} },
{ text: "پسند", icon: FavoriteIcon, onClick: () => {} },
{ text: "تبادل نظر", icon: TextsmsIcon, onClick: () => {} },
{ text: "پاسخ", icon: ReplyIcon, onClick: () => {} },
{ text: "باز ارسال", icon: ForwardIcon, onClick: () => {} },
];
const selfMenu = [
{ text: 'باز ارسال', icon: ForwardIcon, onClick: () => {} },
{ text: 'ویرایش', icon: EditIcon, onClick: () => {} },
{ text: 'حذف', icon: DeleteIcon, onClick: () => {} },
{ text: "باز ارسال", icon: ForwardIcon, onClick: () => {} },
{ text: "ویرایش", icon: EditIcon, onClick: () => {} },
{ text: "حذف", icon: DeleteIcon, onClick: () => {} },
];
export default class NormalMessage extends Component {
state = { messageMenu: null };
@ -42,7 +42,15 @@ export default class NormalMessage extends Component {
});
};
render() {
const { message, user, document, isSelf, prevUserId, children,addcounter } = this.props;
const {
message,
user,
document,
isSelf,
prevUserId,
children,
addcounter,
} = this.props;
const { messageMenu } = this.state;
const hasavatar = prevUserId != message.userId;
@ -50,41 +58,44 @@ export default class NormalMessage extends Component {
<div
className="normal-message d-flex flex-column d-flex"
style={{
filter: document !== null ? 'blur(16px)' : 'blur(0px)',
filter: document !== null ? "blur(4px)" : "blur(0px)",
}}
>
{hasavatar && false && (
<Avatar
alt={user.name}
src={window.baseURL + '/file/download/' + user.fileId}
src={window.baseURL + "/file/download/" + user.fileId}
className=""
style={{
marginTop: -5,
backgroundColor: user.color,
alignSelf: isSelf ? 'flex-end' : 'flex-start',
alignSelf: isSelf ? "flex-end" : "flex-start",
}}
>
{user.name
.split(' ')
.split(" ")
.map((e) => e.slice(0, 1))
.join(' ')}
.join(" ")}
</Avatar>
)}
<div
className="d-flex"
style={{ direction: isSelf ? 'rtl' : 'ltr', marginTop: hasavatar ? 0 : 0 }}
style={{
direction: isSelf ? "rtl" : "ltr",
marginTop: hasavatar ? 0 : 0,
}}
>
<div
className={
message.type == 'text'
message.type == "text"
? `normal-message__box `
: `normal-message__box normal-message__box--file`
}
style={{
paddingTop: hasavatar ? 25 : 15,
backgroundColor: isSelf ? 'white' : 'rgb(220, 248, 198)',
width: 'calc(100%-70px)',
backgroundColor: isSelf ? "white" : "rgb(220, 248, 198)",
width: "calc(100%-70px)",
}}
>
<div
@ -92,12 +103,15 @@ export default class NormalMessage extends Component {
style={{
top: 0,
direction: isSelf ? 'ltr' : 'rtl',
direction: isSelf ? "ltr" : "rtl",
paddingRight: isSelf ? 20 : 20,
paddingLeft: isSelf ? 0 : 0,
}}
>
<div style={{ color: isSelf ? '#aaa' : 'gray' }} onClick={() => addcounter('nothing')}>
<div
style={{ color: isSelf ? "#aaa" : "gray" }}
onClick={() => addcounter("nothing")}
>
<ExpandMoreIcon fontSize="small" onClick={this.handleClick} />
</div>
<Menu
@ -113,7 +127,7 @@ export default class NormalMessage extends Component {
onClick={() => {
this.handleClose();
e.onClick();
addcounter('nothing');
addcounter("nothing");
}}
>
{e.text}
@ -121,50 +135,67 @@ export default class NormalMessage extends Component {
</MenuItem>
))}
</Menu>
{hasavatar && <div style={{ color: isSelf ? '#aaa' : 'gray' }}>{user.name}</div>}
{hasavatar && (
<div style={{ color: isSelf ? "#aaa" : "gray" }}>
{user.name}
</div>
)}
</div>
{message.type == 'text' ? (
<p style={{ color: isSelf ? 'black' : 'black' }}>{message.text}</p>
{message.type == "text" ? (
<p style={{ color: isSelf ? "black" : "black" }}>
{message.text}
</p>
) : null}
{message.type == 'voice' ? (
{message.type == "voice" ? (
<ReactAudioPlayer src={file(message.fileId)} controls />
) : null}
{message.type == 'image' ? (
{message.type == "image" ? (
<div className="normal-message__box--caption">
<a href={file(message.fileId)} download>
<img src={file(message.fileId)} download alt="" />
</a>
<p style={{ color: isSelf ? 'black' : 'black' }}>{message.text}</p>
<p style={{ color: isSelf ? "black" : "black" }}>
{message.text}
</p>
</div>
) : null}
{message.type == 'video' ? (
{message.type == "video" ? (
<div className="normal-message__box--caption">
<a href={file(message.fileId)} download>
<ReactPlayer url={file(message.fileId)} controls width={'100%'} height={250} />
<ReactPlayer
url={file(message.fileId)}
controls
width={"100%"}
height={250}
/>
</a>
<p style={{ color: isSelf ? 'black' : 'black' }}>{message.text}</p>
<p style={{ color: isSelf ? "black" : "black" }}>
{message.text}
</p>
</div>
) : null}
{message.type == 'audio' ? (
{message.type == "audio" ? (
<div className="normal-message__box--caption">
<ReactAudioPlayer src={file(message.fileId)} controls />
<p style={{ color: isSelf ? 'black' : 'black' }}>{message.text}</p>
<p style={{ color: isSelf ? "black" : "black" }}>
{message.text}
</p>
</div>
) : null}
{message.type == 'document' ? (
{message.type == "document" ? (
<a
href={file(message.fileId)}
download
className="normal-message__box--document d-flex"
style={{
backgroundColor: isSelf ? 'rgb(15, 93, 190)' : 'white',
color: isSelf ? 'black' : 'black',
backgroundColor: isSelf ? "rgb(15, 93, 190)" : "white",
color: isSelf ? "black" : "black",
}}
>
<CloudDownloadIcon
style={{
color: isSelf ? 'black' : 'black',
color: isSelf ? "black" : "black",
width: 32,
height: 32,
marginRight: 10,
@ -174,41 +205,52 @@ export default class NormalMessage extends Component {
</a>
) : null}
<div className={'normal-message__box--date d-flex ' + (isSelf ? 'self' : '')}>
<span style={{ color: isSelf ? '#aaa' : 'gray' }}>
<div
className={
"normal-message__box--date d-flex " + (isSelf ? "self" : "")
}
>
<span style={{ color: isSelf ? "#aaa" : "gray" }}>
{message.updatedAt != message.createdAt ? (
<>
<span> ویرایش در</span>
{moment(message.updatedAt).format(' hh:mm jMM/jDD')}
{moment(message.updatedAt).format(" hh:mm jMM/jDD")}
</>
) : (
moment(message.createdAt).format('hh:mm')
moment(message.createdAt).format("hh:mm")
)}
</span>
<span
style={{
color: isSelf ? '#aaa' : 'gray',
padding: '0 2px',
color: isSelf ? "#aaa" : "gray",
padding: "0 2px",
}}
>
{isSelf && message.status == 0 && <ScheduleIcon fontSize="small" />}
{isSelf && message.status == 0 && (
<ScheduleIcon fontSize="small" />
)}
{isSelf && message.status == 2 && <DoneIcon fontSize="small" />}
{isSelf && message.status == 1 && (
<DoneAllIcon fontSize="small" style={{ color: '#00afea', fontSize: '17px' }} />
<DoneAllIcon
fontSize="small"
style={{ color: "#00afea", fontSize: "17px" }}
/>
)}
</span>
</div>
</div>
<div className={isSelf ? 'icons self' : 'icons'} onClick={() => addcounter('nothing')}>
<div
className={isSelf ? "icons self" : "icons"}
onClick={() => addcounter("nothing")}
>
{!isSelf ? (
<>
{' '}
{" "}
<div>
<span> {10}</span>
<FavoriteIcon fontSize="samall" color="primary" />
</div>
<div>
<span> {10}</span>
@ -231,10 +273,10 @@ export default class NormalMessage extends Component {
<div
className="f-flex keys"
style={{
width: 'calc(100% - 70px)',
width: "calc(100% - 70px)",
marginRight: isSelf ? 0 : 70,
marginLeft: isSelf ? 70 : 0,
alignSelf: isSelf ? 'flex-end' : 'flex-start',
alignSelf: isSelf ? "flex-end" : "flex-start",
}}
>
{children}

@ -1,37 +1,37 @@
import React from 'react';
import { makeStyles, withStyles } from '@material-ui/core/styles';
import FormControl from '@material-ui/core/FormControl';
import NativeSelect from '@material-ui/core/NativeSelect';
import InputBase from '@material-ui/core/InputBase';
import React from "react";
import { makeStyles, withStyles } from "@material-ui/core/styles";
import FormControl from "@material-ui/core/FormControl";
import NativeSelect from "@material-ui/core/NativeSelect";
import InputBase from "@material-ui/core/InputBase";
const BootstrapInput = withStyles((theme) => ({
root: {
'label + &': {
"label + &": {
marginTop: theme.spacing(3),
},
},
input: {
borderRadius: 4,
position: 'relative',
position: "relative",
backgroundColor: theme.palette.background.paper,
border: '1px solid #ced4da',
border: "1px solid #ced4da",
fontSize: 16,
padding: '10px 26px 10px 12px',
transition: theme.transitions.create(['border-color', 'box-shadow']),
padding: "10px 26px 10px 12px",
transition: theme.transitions.create(["border-color", "box-shadow"]),
// Use the system font instead of the default Roboto font.
fontFamily: [
'-apple-system',
'BlinkMacSystemFont',
"-apple-system",
"BlinkMacSystemFont",
'"Segoe UI"',
'Roboto',
"Roboto",
'"Helvetica Neue"',
'Arial',
'sans-serif',
"Arial",
"sans-serif",
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
].join(','),
'&:focus': {
].join(","),
"&:focus": {
borderRadius: 4,
},
},
@ -45,7 +45,7 @@ const useStyles = makeStyles((theme) => ({
export default function CustomizedSelects(props) {
const classes = useStyles();
const [age, setAge] = React.useState('');
const [age, setAge] = React.useState("");
const handleChange = (event) => {
setAge(event.target.value);
};
@ -58,11 +58,11 @@ export default function CustomizedSelects(props) {
onChange={handleChange}
input={<BootstrapInput />}
>
{
props.options.map(item => (
<option value={item}>{item}</option>
))
}
{props.options.map((item, i) => (
<option value={item} key={i}>
{item}
</option>
))}
</NativeSelect>
</FormControl>
</div>

@ -17,7 +17,7 @@ export default class HomeSearch extends Component {
/>
<div className="home-search__select">
<Select options={data} />
<img src={dropdown} alt='فلش' />
<img src={dropdown} alt="فلش" />
</div>
<button className="home-search__submit">جستجو</button>
</div>

@ -4,7 +4,7 @@ import { Link } from "react-router-dom";
const maxMobileSize = 550;
const fontSize = {
h1: window.innerWidth > maxMobileSize ? 20 : window.innerWidth / 25,
h1: window.innerWidth > maxMobileSize ? 19 : window.innerWidth / 25,
span: window.innerWidth > maxMobileSize ? 12 : window.innerWidth / 35,
};
@ -16,7 +16,8 @@ export default function Flex(props) {
margin: 5,
borderRadius: 10,
color: data.color,
filter: data.link === "/chatroom" ? "blur(1.5px) grayscale(100%)" : "",
opacity: data.link === "/chatroom" ? 0.5 : 1,
filter: data.link === "/chatroom" ? "blur(1px) grayscale(100%)" : "",
};
return (
<Link

@ -4,7 +4,7 @@ import { Link } from "react-router-dom";
const maxMobileSize = 550;
const fontSize = {
h1: window.innerWidth > maxMobileSize ? 20 : window.innerWidth / 28,
h1: window.innerWidth > maxMobileSize ? 19 : window.innerWidth / 28,
span: window.innerWidth > maxMobileSize ? 12 : window.innerWidth / 32,
};

@ -4,7 +4,7 @@ import { Link } from "react-router-dom";
const maxMobileSize = 550;
const fontSize = {
h1: window.innerWidth > maxMobileSize ? 20 : window.innerWidth / 25,
h1: window.innerWidth > maxMobileSize ? 19 : window.innerWidth / 25,
span: window.innerWidth > maxMobileSize ? 12 : window.innerWidth / 34,
};
@ -23,21 +23,24 @@ export default function Vitrin(props) {
};
return (
<Link
to={data.link}
<div
className="mobile-home-static__vitrin d-flex flex-column"
style={style}
>
<Link to={data.link}>
<h1 style={{ fontSize: fontSize.h1 }}>{data.title}</h1>
<div className="d-flex align-items-end">
</Link>
<div className="d-flex align-items-end" style={{ margin: "auto" }}>
{data.books.map((item, i) => (
<Item data={item} key={i} />
))}
<Link to={data.link} style={{ fontSize: fontSize.span }}>
مشاهده بیشتر
</Link>
</div>
</Link>
</div>
);
}

@ -47,7 +47,10 @@ export default class HomeStatic extends Component {
</section>
) : null}
{window.innerWidth < 1000 ? (
<section className="mobile-home-static d-flex">
<section
className="mobile-home-static d-flex"
style={{ height: height }}
>
{data.map((item, i) => (
<Identifier data={item} key={i} />
))}

@ -33,7 +33,8 @@
text-decoration: none;
img {
// margin-right: 20px;
width: 30%;
// width: 30%;
margin: 0 10px;
height: 70%;
transform: scale(1.3);
}
@ -58,11 +59,12 @@
}
&--product {
width: 24%;
margin: 3px;
margin: 2px;
border-radius: 10px;
img {
width: 100%;
height: 70px;
max-height: 90px;
border-radius: 10px;
}
}

@ -1,43 +1,45 @@
import React, { Component } from "react";
import Input from './Input/index';
import Input from "./Input/index";
import "./index.scss";
export default class Membership extends Component {
render() {
return (
<>
{
window.innerWidth > 1000 ?
{window.innerWidth > 1000 ? (
<div className="membership d-flex">
<div className="d-flex flex-column">
<h1><strong>دانوینی</strong> شو</h1>
<h1>
<strong>دانوینی</strong> شو
</h1>
<p>مشخصات خودت رو وارد کنید و امتیاز هدیه بگیرید</p>
</div>
<div className="d-flex">
<Input label={'نامونام خانوادگی'} name={'name'} />
<Input label={'شماره تماس'} name={'mobile'} />
<Input label={"نام و نام خانوادگی"} name={"name"} />
<Input label={"شماره تماس"} name={"mobile"} />
<button className="membership__submit">دریافت هدیه</button>
</div>
</div> : null
}
{
window.innerWidth < 1000 ?
</div>
) : null}
{window.innerWidth < 1000 ? (
<div className="mobile-membership d-flex">
<div className="d-flex flex-column">
<h1><strong>دانوینی</strong> شو</h1>
<h1>
<strong>دانوینی</strong> شو
</h1>
<p>مشخصات خودت رو وارد کنید و امتیاز هدیه بگیرید</p>
</div>
<div className="d-flex flex-column align-items-center">
<div>
<Input label={'نامونام خانوادگی'} name={'name'} />
<Input label={"نامونام خانوادگی"} name={"name"} />
</div>
<div>
<Input label={'شماره تماس'} name={'mobile'} />
<Input label={"شماره تماس"} name={"mobile"} />
</div>
<button className="mobile-membership__submit">دریافت هدیه</button>
</div>
</div> : null
}
</div>
) : null}
</>
);
}

@ -72,7 +72,7 @@ export default class LaptopNavbar extends Component {
LaptopNavbar.defaultProps = {
links: [
{ name: "صفحه اصلی", to: "/", page: "home" },
{ name: "فروشگاه ", to: "/products", page: "products" },
{ name: "سبد خرید ", to: "/cart", page: "cart" },
{ name: "سوالات متداول", to: "/faq", page: "faq" },
{ name: "درباره ما", to: "/about", page: "about" },
{ name: "تماس با ما", to: "/contact", page: "contact" },

@ -29,6 +29,7 @@ class NavbarDrawer extends Component {
render() {
const { status } = this.props;
let score = 2;
return (
<div className="navbar-drawer d-flex flex-column">
<div className="navbar-drawer__header d-flex align-items-center">
@ -52,16 +53,16 @@ class NavbarDrawer extends Component {
className="navbar-drawer__header--dropdown"
onClick={() => this.setState({ dropdown: false })}
>
<span>25 امتیاز</span>
<KeyboardArrowUpIcon style={{ color: "grey", fontSize: 45 }} />
{score ? <span>{score} امتیاز</span> : null}
<KeyboardArrowUpIcon style={{ color: "grey", fontSize: 30 }} />
</div>
) : (
<div
className="navbar-drawer__header--dropdown"
onClick={() => this.setState({ dropdown: true })}
>
<span>25 امتیاز</span>
<KeyboardArrowDownIcon style={{ color: "grey", fontSize: 45 }} />
{score ? <span>{score} امتیاز</span> : null}{" "}
<KeyboardArrowDownIcon style={{ color: "grey", fontSize: 30 }} />
</div>
)}
</div>
@ -148,8 +149,8 @@ NavbarDrawer.defaultProps = {
message: "",
},
{
name: "فروشگاه",
link: "/products",
name: "سبد خرید",
link: "/cart",
icon: <img src={mobileBasket} alt="فروشگاه" />,
toast: "",
message: "",
@ -165,8 +166,8 @@ NavbarDrawer.defaultProps = {
name: "دانوینیها",
link: "/",
icon: <img src={mobileProfile} alt="دانوینیها" />,
toast: "",
message: "",
toast: "به زودی این بخش فعال می شود",
message: "به زودی",
},
{
name: "پشتیبانی",
@ -181,7 +182,7 @@ NavbarDrawer.defaultProps = {
link: "/profile",
icon: <img src={mobileMail} alt="ویرایش مشخصات" />,
toast: "",
message: "4 پیام",
// message: "4 پیام",
},
{
name: "خروج",

@ -25,7 +25,7 @@
margin-right: 10px;
& h1 {
margin-bottom: 0px;
font-size: calc(100vw / 22);
font-size: 17px;
color: #4d4d4f;
letter-spacing: -1px;
}
@ -41,10 +41,11 @@
top: 10px;
span {
background-color: #6cbe44;
color: white;
padding: 2px 4px;
border-radius: 7px;
font-size: calc(100vw / 27);
font-size: 15px;
}
}
& img {
@ -57,6 +58,7 @@
&__dropdown {
width: calc(100vw * 0.8);
margin: 10px auto;
background-color: #eee;
.navbar-drawer-user {
padding: 10px 10px;
width: 100%;

@ -79,7 +79,9 @@ export default function MobileNavbar(props) {
</Link>
<div className="mobile-navbar__left">
{page === "home" ? (
<Link to={"/products"}>
<img src={search} alt="جستجو" />
</Link>
) : (
<div className="d-flex align-items-center">
<Link to={"/products"}>

@ -16,3 +16,14 @@
overflow-x: hidden;
padding-top: 70px;
}
body::-webkit-scrollbar,
.no-scroll::-webkit-scrollbar {
display: none !important;
}
body,
.no-scroll {
-ms-overflow-style: none !important; /* IE and Edge */
scrollbar-width: none !important; /* Firefox */
}

@ -194,6 +194,21 @@ class NewProfile extends Component {
render() {
const { user, profile } = this.props;
const grades = [
"پیش دبستان",
"اول",
"دوم",
"سوم",
"چهارم",
"پنجم",
"ششم",
"هفتم",
"هشتم",
"نهم",
"دهم",
"یازدهم",
"دوازدهم",
];
return (
<>
{window.innerWidth > 1000 ? (
@ -275,20 +290,7 @@ class NewProfile extends Component {
<div className="mb-2">
<Select
parent={this}
options={[
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
]}
options={grades}
name="gradeId"
label={"پایه تحصیلی"}
/>
@ -298,7 +300,7 @@ class NewProfile extends Component {
<div className="mb-2">
<MultipleSelector
parent={this}
options={[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]}
options={grades}
name="gradeId"
label={"پایه تحصیلی"}
selectedOptions={this.state.gradeId}
@ -444,20 +446,7 @@ class NewProfile extends Component {
{this.state.userRoleId === "دانش آموز" ? (
<Select
parent={this}
options={[
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
]}
options={grades}
name="gradeId"
label={"پایه تحصیلی"}
/>
@ -465,20 +454,7 @@ class NewProfile extends Component {
{this.state.userRoleId === "معلم" ? (
<MultipleSelector
parent={this}
options={[
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
]}
options={grades}
name="gradeId"
label={"پایه تحصیلی"}
selectedOptions={this.state.gradeId}

@ -37,9 +37,11 @@ function AddToCart(props) {
</strong>{" "}
تومان
</div>
{off ? (
<span style={{ fontSize: fontSize.desktop.span }}>
{off} نخفیف
{off} تومان تخفیف
</span>
) : null}
</div>
<button
style={{ fontSize: fontSize.desktop.button }}

@ -256,6 +256,33 @@ class Product extends Component {
</div>
</div>
</div>
<div
className="d-flex"
style={{
// position: "fixed",
// bottom: 1,
width: "100%",
height: "40px",
}}
>
<Link
to={"/cart"}
style={{
width: "100%",
color: "white",
backgroundColor: "#7fc75d",
cursor: "pointer",
borderRadius: 8,
textDecoration: "none",
padding: "5px 10px",
margin: "5px 10px 1px",
textAlign: "center",
}}
>
رفتن به سبد خرید
</Link>
</div>
<MaterialModal
openComment={this.state.openComment}
handleOpenComment={this.handleOpenComment}

@ -62,7 +62,7 @@
}
width: 100%;
background-color: #fafafa;
margin: 20px;
margin: 15px 10px 0;
border-radius: 0.5rem;
box-shadow: 0 3px 8px 0 rgb(0 0 0 / 16%);
img {
@ -124,21 +124,23 @@
}
width: calc(50% - 20px);
background-color: #fafafa;
margin: 10px;
margin: 8px;
border-radius: 0.5rem;
box-shadow: 0 3px 8px 0 rgb(0 0 0 / 16%);
img {
width: 80%;
margin: 10px auto;
margin: 5px auto;
border-radius: 8px;
}
&__info {
width: 80%;
margin: 10px auto;
margin: 0px auto;
h1 {
font-family: NumeralLight;
color: #4d4d4d;
letter-spacing: -1px;
margin: 0px;
text-align: center;
}
a {
width: 48%;

@ -2,7 +2,7 @@ import React, { Component } from "react";
import FilterListIcon from "@material-ui/icons/FilterList";
import { connect } from "react-redux";
import { book } from "~/Redux/actions";
import { Link } from "react-router-dom";
import Navbar from "../Home/Navbar/index";
import Footer from "../Home/Footer/index";
import Select from "./Select/index";
@ -86,6 +86,7 @@ class Products extends Component {
<>
<div className="mobile-products d-flex flex-column">
<Navbar page={"products"} />
<div className="mobile-products__search d-flex">
<input
type="search"
@ -104,6 +105,33 @@ class Products extends Component {
<FilterListIcon style={{ fontSize: 40, color: "#a5a5a5" }} />
</div>
<List search={this.state.search} />
<div
className="d-flex"
style={{
position: "fixed",
bottom: 1,
width: "100%",
height: "40px",
}}
>
<Link
to={"/cart"}
style={{
width: "100%",
color: "white",
backgroundColor: "#7fc75d",
cursor: "pointer",
borderRadius: 8,
textDecoration: "none",
padding: "5px 10px",
margin: "5px 10px 1px",
textAlign: "center",
}}
>
سبد خرید
</Link>
</div>
</div>
</>
) : null}

@ -14,11 +14,13 @@
}
}
}
.MuiMenuItem-root {
font-family: numeralLight !important;
}
.mobile-products {
width: 100vw;
max-width: 600px;
margin: 0px auto;
margin: 0px auto 40px;
padding: 0px;
direction: rtl;
overflow-x: hidden;
@ -41,7 +43,7 @@
&__search {
// width: 100%;
position: relative;
margin: 15px 10px;
margin: 5px 10px;
height: 35px;
img {
position: absolute;

@ -44,8 +44,8 @@ class Support extends Component {
<Navbar page={"contact"} />
<div className="mobile-contact__form d-flex flex-column">
<h1 style={{ fontSize: fontSize.mobile.h1 }}>پشتیبانی</h1>
<Input label={"نامونام خانوادگی"} name={"name"} parent={this} />
<Input label={"شماره تماس"} name={"cellphone"} parent={this} />
{/* <Input label={"نام و نام خانوادگی"} name={"name"} parent={this} />
<Input label={"شماره تماس"} name={"cellphone"} parent={this} /> */}
<Select
name="unit"
options={[
@ -68,7 +68,7 @@ class Support extends Component {
/>
) : null}
<Input label={"موضوع پیام"} name={"subject"} parent={this} />
<textarea placeholder="متن پیام" name="text" rows="5"></textarea>
<textarea placeholder="متن پیام" name="text" rows="8"></textarea>
<button>ارسال</button>
</div>
</div>

Loading…
Cancel
Save