reza added new home to mobile

master
ravino 3 years ago
parent e399caa05b
commit 6bfcf9e65b
  1. 2
      src/assets/icons/ppt.svg
  2. 1
      src/assets/icons/qr-code.svg
  3. BIN
      src/assets/icons/qr.png
  4. 1
      src/assets/icons/qr.svg
  5. 36
      src/views/Home/HomeStatic/Flex/index.js
  6. 19
      src/views/Home/HomeStatic/Identifier/index.js
  7. 29
      src/views/Home/HomeStatic/Simple/index.js
  8. 93
      src/views/Home/HomeStatic/index.js
  9. 37
      src/views/Home/HomeStatic/index.scss
  10. 2
      src/views/Home/Navbar/Mobile/NavbarDrawer/NavbarDrawer.js
  11. 1031
      src/views/Home/index.js

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="67.237" height="63.032" viewBox="0 0 67.237 63.032"><defs><style>.a{fill:#0d9189;}</style></defs><g transform="translate(0 -16.01)"><g transform="translate(0 16.01)"><path class="a" d="M37.06,16.49a2.115,2.115,0,0,0-1.727-.445l-33.619,6.3A2.1,2.1,0,0,0,0,24.412V70.638A2.1,2.1,0,0,0,1.715,72.7L35.333,79a2.009,2.009,0,0,0,.387.038,2.1,2.1,0,0,0,2.1-2.1V18.108A2.1,2.1,0,0,0,37.06,16.49ZM33.619,74.407,4.2,68.894V26.156l29.416-5.513Z" transform="translate(0 -16.01)"/></g><g transform="translate(33.619 24.412)"><path class="a" d="M287.517,79.99H258.1a2.1,2.1,0,0,0,0,4.2h27.315v37.821H258.1a2.1,2.1,0,0,0,0,4.2h29.416a2.1,2.1,0,0,0,2.1-2.1V82.091A2.1,2.1,0,0,0,287.517,79.99Z" transform="translate(-256 -79.99)"/></g><g transform="translate(33.619 58.031)"><path class="a" d="M279.113,335.99H258.1a2.1,2.1,0,1,0,0,4.2h21.012a2.1,2.1,0,1,0,0-4.2Z" transform="translate(-256 -335.99)"/></g><g transform="translate(12.607 37.019)"><path class="a" d="M98.1,175.99a2.1,2.1,0,0,0-2.1,2.1V199.1a2.1,2.1,0,0,0,4.2,0V178.091A2.1,2.1,0,0,0,98.1,175.99Z" transform="translate(-96 -175.99)"/></g><g transform="translate(12.607 37.019)"><path class="a" d="M104.4,175.99H98.1a2.1,2.1,0,0,0,0,4.2h6.3a4.2,4.2,0,1,1,0,8.4H98.1a2.1,2.1,0,1,0,0,4.2h6.3a8.4,8.4,0,0,0,0-16.809Z" transform="translate(-96 -175.99)"/></g><g transform="translate(37.821 32.817)"><path class="a" d="M298.506,143.99A10.506,10.506,0,1,0,309.012,154.5,10.518,10.518,0,0,0,298.506,143.99Zm0,16.809a6.3,6.3,0,1,1,6.3-6.3A6.311,6.311,0,0,1,298.506,160.8Z" transform="translate(-288 -143.99)"/></g><g transform="translate(46.226 32.817)"><path class="a" d="M362.506,152.395h-6.3v-6.3a2.1,2.1,0,0,0-4.2,0v8.4a2.1,2.1,0,0,0,2.1,2.1h8.4a2.1,2.1,0,1,0,0-4.2Z" transform="translate(-352 -143.99)"/></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="81.033" height="81.033" viewBox="0 0 81.033 81.033"><defs><style>.a{fill:#fff;}</style></defs><path class="a" d="M4.748,4.748H18.992V0H0V18.992H4.748Zm0,0"/><path class="a" d="M392,0V4.748h14.244V18.992h4.748V0Zm0,0" transform="translate(-329.959)"/><path class="a" d="M406.244,406.244H392v4.748h18.992V392h-4.748Zm0,0" transform="translate(-329.959 -329.959)"/><path class="a" d="M4.748,392H0v18.992H18.992v-4.748H4.748Zm0,0" transform="translate(0 -329.959)"/><path class="a" d="M61,60V83.74H84.74V69.5h4.748V64.748H84.74V60ZM79.992,78.992H65.748V64.748H79.992Zm0,0" transform="translate(-51.346 -50.504)"/><path class="a" d="M299.488,298.488v-23.74h-9.5V270h-4.748v4.748H271V279.5h4.748v4.748H271v4.748h4.748v9.5ZM280.5,279.5H294.74V293.74H280.5Zm0,0" transform="translate(-228.11 -227.268)"/><path class="a" d="M75.244,244.748h9.5V240H61v4.748h9.5V249.5H65.748v4.748H70.5v9.5H65.748v4.748H70.5v4.748h23.74v-4.748H89.488V263.74H84.74v4.748h-9.5V263.74h4.748v-4.748H75.244Zm0,0" transform="translate(-51.346 -202.016)"/><path class="a" d="M121,120h4.748v4.748H121Zm0,0" transform="translate(-101.85 -101.008)"/><path class="a" d="M361,120h4.748v4.748H361Zm0,0" transform="translate(-303.866 -101.008)"/><path class="a" d="M315.244,83.74h9.5V60H301V83.74h9.5v4.748h4.748Zm-9.5-4.748V64.748h14.244V78.992Zm0,0" transform="translate(-253.362 -50.504)"/><path class="a" d="M400.5,244.748V240H391v4.748Zm0,0" transform="translate(-329.118 -202.016)"/><path class="a" d="M361,360h4.748v4.748H361Zm0,0" transform="translate(-303.866 -303.024)"/><path class="a" d="M241,330h4.748v4.748H241Zm0,0" transform="translate(-202.858 -277.772)"/><path class="a" d="M181,309.5h4.748V300H181Zm0,0" transform="translate(-152.354 -252.52)"/><path class="a" d="M211,270h4.748v4.748H211Zm0,0" transform="translate(-177.606 -227.268)"/><path class="a" d="M65.748,330H61v9.5h4.748Zm0,0" transform="translate(-51.346 -277.772)"/><path class="a" d="M61,420h4.748v4.748H61Zm0,0" transform="translate(-51.346 -353.528)"/><path class="a" d="M241,60h4.748v4.748H241Zm0,0" transform="translate(-202.858 -50.504)"/><path class="a" d="M241,129.5h4.748V120H241Zm0,0" transform="translate(-202.858 -101.008)"/><path class="a" d="M245.748,214.748V210H241v9.5h18.992v-4.748Zm0,0" transform="translate(-202.858 -176.764)"/></svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="22.88" height="22.88" viewBox="0 0 22.88 22.88"><defs><style>.a{fill:#4d4d4f;}</style></defs><path class="a" d="M1.341,1.341H5.362V0H0V5.362H1.341Zm0,0" transform="translate(0 0)"/><path class="a" d="M392,0V1.341h4.022V5.362h1.341V0Zm0,0" transform="translate(-374.483 0)"/><path class="a" d="M396.022,396.022H392v1.341h5.362V392h-1.341Zm0,0" transform="translate(-374.483 -374.483)"/><path class="a" d="M1.341,392H0v5.362H5.362v-1.341H1.341Zm0,0" transform="translate(0 -374.483)"/><path class="a" d="M61,60v6.7h6.7V62.681h1.341V61.341H67.7V60Zm5.362,5.362H62.341V61.341h4.022Zm0,0" transform="translate(-58.274 -57.319)"/><path class="a" d="M279.044,278.044v-6.7h-2.681V270h-1.341v1.341H271v1.341h1.341v1.341H271v1.341h1.341v2.681Zm-5.362-5.362H277.7V276.7h-4.022Zm0,0" transform="translate(-258.89 -257.935)"/><path class="a" d="M65.022,241.341H67.7V240H61v1.341h2.681v1.341H62.341v1.341h1.341V246.7H62.341v1.341h1.341v1.341h6.7v-1.341H69.044V246.7H67.7v1.341H65.022V246.7h1.341v-1.341H65.022Zm0,0" transform="translate(-58.274 -229.275)"/><path class="a" d="M121,120h1.341v1.341H121Zm0,0" transform="translate(-115.593 -114.638)"/><path class="a" d="M361,120h1.341v1.341H361Zm0,0" transform="translate(-344.868 -114.638)"/><path class="a" d="M305.022,66.7H307.7V60H301v6.7h2.681v1.341h1.341Zm-2.681-1.341V61.341h4.022v4.022Zm0,0" transform="translate(-287.549 -57.319)"/><path class="a" d="M393.681,241.341V240H391v1.341Zm0,0" transform="translate(-373.528 -229.275)"/><path class="a" d="M361,360h1.341v1.341H361Zm0,0" transform="translate(-344.868 -343.913)"/><path class="a" d="M241,330h1.341v1.341H241Zm0,0" transform="translate(-230.231 -315.253)"/><path class="a" d="M181,302.681h1.341V300H181Zm0,0" transform="translate(-172.912 -286.594)"/><path class="a" d="M211,270h1.341v1.341H211Zm0,0" transform="translate(-201.571 -257.935)"/><path class="a" d="M62.341,330H61v2.681h1.341Zm0,0" transform="translate(-58.274 -315.253)"/><path class="a" d="M61,420h1.341v1.341H61Zm0,0" transform="translate(-58.274 -401.232)"/><path class="a" d="M241,60h1.341v1.341H241Zm0,0" transform="translate(-230.231 -57.319)"/><path class="a" d="M241,122.681h1.341V120H241Zm0,0" transform="translate(-230.231 -114.638)"/><path class="a" d="M242.341,211.341V210H241v2.681h5.362v-1.341Zm0,0" transform="translate(-230.231 -200.616)"/></svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="81.033" height="81.033" viewBox="0 0 81.033 81.033"><defs><style>.a{fill:#fff;}</style></defs><path class="a" d="M4.748,4.748H18.992V0H0V18.992H4.748Zm0,0"/><path class="a" d="M392,0V4.748h14.244V18.992h4.748V0Zm0,0" transform="translate(-329.959)"/><path class="a" d="M406.244,406.244H392v4.748h18.992V392h-4.748Zm0,0" transform="translate(-329.959 -329.959)"/><path class="a" d="M4.748,392H0v18.992H18.992v-4.748H4.748Zm0,0" transform="translate(0 -329.959)"/><path class="a" d="M61,60V83.74H84.74V69.5h4.748V64.748H84.74V60ZM79.992,78.992H65.748V64.748H79.992Zm0,0" transform="translate(-51.346 -50.504)"/><path class="a" d="M299.488,298.488v-23.74h-9.5V270h-4.748v4.748H271V279.5h4.748v4.748H271v4.748h4.748v9.5ZM280.5,279.5H294.74V293.74H280.5Zm0,0" transform="translate(-228.11 -227.268)"/><path class="a" d="M75.244,244.748h9.5V240H61v4.748h9.5V249.5H65.748v4.748H70.5v9.5H65.748v4.748H70.5v4.748h23.74v-4.748H89.488V263.74H84.74v4.748h-9.5V263.74h4.748v-4.748H75.244Zm0,0" transform="translate(-51.346 -202.016)"/><path class="a" d="M121,120h4.748v4.748H121Zm0,0" transform="translate(-101.85 -101.008)"/><path class="a" d="M361,120h4.748v4.748H361Zm0,0" transform="translate(-303.866 -101.008)"/><path class="a" d="M315.244,83.74h9.5V60H301V83.74h9.5v4.748h4.748Zm-9.5-4.748V64.748h14.244V78.992Zm0,0" transform="translate(-253.362 -50.504)"/><path class="a" d="M400.5,244.748V240H391v4.748Zm0,0" transform="translate(-329.118 -202.016)"/><path class="a" d="M361,360h4.748v4.748H361Zm0,0" transform="translate(-303.866 -303.024)"/><path class="a" d="M241,330h4.748v4.748H241Zm0,0" transform="translate(-202.858 -277.772)"/><path class="a" d="M181,309.5h4.748V300H181Zm0,0" transform="translate(-152.354 -252.52)"/><path class="a" d="M211,270h4.748v4.748H211Zm0,0" transform="translate(-177.606 -227.268)"/><path class="a" d="M65.748,330H61v9.5h4.748Zm0,0" transform="translate(-51.346 -277.772)"/><path class="a" d="M61,420h4.748v4.748H61Zm0,0" transform="translate(-51.346 -353.528)"/><path class="a" d="M241,60h4.748v4.748H241Zm0,0" transform="translate(-202.858 -50.504)"/><path class="a" d="M241,129.5h4.748V120H241Zm0,0" transform="translate(-202.858 -101.008)"/><path class="a" d="M245.748,214.748V210H241v9.5h18.992v-4.748Zm0,0" transform="translate(-202.858 -176.764)"/></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -0,0 +1,36 @@
import React from 'react';
const maxMobileSize = 550;
const fontSize = {
h1: window.innerWidth > maxMobileSize ? 20 : window.innerWidth / 28,
span: window.innerWidth > maxMobileSize ? 12 : window.innerWidth / 32,
};
export default function Flex(props){
const {data} = props;
const style = {
background: `linear-gradient(${data.backgroundColor.angle},${data.backgroundColor.first} , ${data.backgroundColor.second})`,
flex: data.flex,
margin: 5,
borderRadius: 10,
color: data.color,
}
return(
<div className="mobile-home-static__flex d-flex align-items-center justify-content-center" style={style}>
<div className="mobile-home-static__flex--right d-flex flex-column">
<h1 style={{ fontSize: fontSize.h1 }}>{data.title}</h1>
{
data.badge ?
<span className="d-flex justify-content-center" style={{ fontSize: fontSize.span, backgroundColor: '#F1F907', color: '#4D4D4F'}}>{data.badge}</span> : null
}
<span style={{ fontSize: fontSize.span }}>{data.subTitle}</span>
</div>
<img src={data.imageUrl} alt={data.title} />
</div>
);
}

@ -0,0 +1,19 @@
import React from 'react';
import Flex from '../Flex/index';
import Simple from '../Simple/index';
export default function Identifier(props){
const {data} = props;
return(
<>
{
data.design === 'flex' ?
<Flex data={data} /> : null
}
{
data.design === 'simple' ?
<Simple data={data} /> : null
}
</>
);
}

@ -0,0 +1,29 @@
import React from 'react';
const maxMobileSize = 550;
const fontSize = {
h1: window.innerWidth > maxMobileSize ? 20 : window.innerWidth / 28,
span: window.innerWidth > maxMobileSize ? 12 : window.innerWidth / 32,
};
export default function Simple(props){
const {data} = props;
const style = {
backgroundImage: `url('${data.imageUrl}')`,
backgroundColor: `linear-gradient(${data.backgroundColor.angle},${data.backgroundColor.first} , ${data.backgroundColor.second})`,
flex: data.flex,
margin: 5,
borderRadius: 10,
color: data.color,
};
return(
<div className="mobile-home-static__simple d-flex flex-column justify-content-center" style={style}>
<h1 style={{ fontSize: fontSize.h1 }}>{data.title}</h1>
</div>
);
}

@ -1,5 +1,6 @@
import React, { Component } from "react";
import ChevronLeftIcon from "@material-ui/icons/ChevronLeft";
import Identifier from "./Identifier/index";
import "./index.scss";
@ -13,35 +14,56 @@ const fontSize = {
export default class HomeStatic extends Component {
render() {
const { data, height, title } = this.props;
const { data, height, title, designType } = this.props;
return (
<section
className={
title ? "home-static d-flex flex-column" : "home-static d-flex"
}
>
{title ? (
<div className="home-scroll__header d-flex">
<h1>{title}</h1>
<div className="home-scroll__header--more d-flex">
<span>موارد بیشتر</span>
<ChevronLeftIcon
style={{
width: 20,
height: 20,
color: "black",
marginRight: 1,
}}
/>
<>
{
window.innerWidth > 1000 ?
<section
className={
title ? "home-static d-flex flex-column" : "home-static d-flex"
}
>
{title ? (
<div className="home-scroll__header d-flex">
<h1>{title}</h1>
<div className="home-scroll__header--more d-flex">
<span>موارد بیشتر</span>
<ChevronLeftIcon
style={{
width: 20,
height: 20,
color: "black",
marginRight: 1,
}}
/>
</div>
</div>
) : null}
<div className="home-static__list d-flex">
{data.map((item, i) => (
<Item data={item} height={height} key={i} />
))}
</div>
</div>
) : null}
<div className="home-static__list d-flex">
{data.map((item, i) => (
<Item data={item} height={height} key={i} />
))}
</div>
</section>
</section> : null
}
{
window.innerWidth < 1000 ?
<section
className="mobile-home-static d-flex"
style={{ minHeight : height }}
>
{
data.map((item,i) => (
<Identifier
data={item}
key={i}
/>
))
}
</section> : null
}
</>
);
}
}
@ -64,22 +86,7 @@ const Item = (props) => {
<img src={props.data.image} alt="عکس" />
</div>
) : null}
{
window.innerWidth < 1000 ? (
<div
style={{
width: `${props.data.width}%`,
}}
className="home-static__list--item d-flex p-2 mobile-static"
>
<div className="d-flex flex-column">
<h1 style={{ color: "#02733c" }}>{props.data.topText}</h1>
<h2 style={{ color: "#7dc241" }}>{props.data.bottomText}</h2>
</div>
<img src={props.data.image} alt="عکس" />
</div>
) : null
}
</>
);
};

@ -27,22 +27,29 @@
}
.mobile-static{
div{
h1{
font-size: calc(100vw / 27);
letter-spacing: -1px;
margin-bottom: 5px;
}
h2{
font-size: calc(100vw / 35);
letter-spacing: -1px;
margin-bottom: 0px;
.mobile-home-static{
&__flex{
padding: 0px 10px;
img {
// margin-right: 20px;
height: 40px;
width: 40px;
// max-width: 80px;
// max-width: 80px;
}
&--right{
margin-left: 10px;
h1{
font-family: numeralBold;
text-align: justify;
}
span{
letter-spacing: -1px;
}
}
}
img {
// margin-right: 20px;
height: 50px;
width: 50px;
&__simple{
padding: 0px 10px;
}
}

@ -13,7 +13,7 @@ import user1 from "../../../../../assets/images/user1.png";
import user2 from "../../../../../assets/images/user2.png";
import mobileHome from "../../../../../assets/icons/mobileHome.svg";
import mobileAr from "../../../../../assets/icons/mobileAr.svg";
import qrcode from "../../../../../assets/icons/qr-code.svg";
import qrcode from "../../../../../assets/icons/qr.svg";
import mobileBasket from "../../../../../assets/icons/mobileBasket.svg";
import mobileBlog from "../../../../../assets/icons/mobileBlog.svg";
import mobileMail from "../../../../../assets/icons/mobileMail.svg";

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save