reza added something

temp
Reza_ashrafi 3 years ago
commit 6b4e5d43f6
  1. 12
      src/components/Footer/index.js
  2. 12
      src/components/Navbar/index.js
  3. 12
      src/components/Product/index.js
  4. 14
      src/components/SalesContainer/index.js
  5. 4
      src/components/StarRating/index.js
  6. 6
      src/views/Home/Desktop/Part2/index.js

@ -21,10 +21,10 @@ const FooterDesign1 = ({ color, bg, links, hasHeader }) => {
<div className="flex items-center ml-8 "> <div className="flex items-center ml-8 ">
<img src={callIcon} className="p-2" /> <img src={callIcon} className="p-2" />
<div> <div>
<h1 className="text-3xl text-bold mb-2 font-black"> <h1 className="text-2xl text-bold mb-2 font-black">
<span className=" text-blueC0">7</span> روز هفته <span className="font-black text-blueC0">24</span> ساعته <span className=" text-blueC0">7</span> روز هفته <span className="font-black text-blueC0">24</span> ساعته
</h1> </h1>
<p className="text-xl font-light text-blue-700">منتظر شنیدن صدای گرمتان هستیم</p> <p className="text-lg font-light text-blue-700">منتظر شنیدن صدای گرمتان هستیم</p>
</div> </div>
</div> </div>
@ -36,19 +36,19 @@ const FooterDesign1 = ({ color, bg, links, hasHeader }) => {
</div> </div>
: null} : null}
<footer <footer
className={`flex flex-col bg-gray-200 py-10 md:flex-row justify-around items-start md:items-start relative shadow-md ${bg}`} className={`flex flex-col bg-gray-200 py-16 md:flex-row justify-around items-start md:items-start relative shadow-md ${bg}`}
> >
<div className="w-11/12 flex justify-between"> <div className="w-11/12 flex justify-between">
<div className="flex items-start"> <div className="flex items-start">
<> <>
{ {
links.map((section, index) => <ul className={index != 0 ? 'mr-20' : ''} key={index}> links.map((section, index) => <ul className={index != 0 ? 'mr-16' : ''} key={index}>
{ {
section.map((link, index) => <li section.map((link, index) => <li
className={`font-light text-xs leading-7 hover:font-bold ${color}`} className={`font-light text-md leading-7 hover:font-bold ${color}`}
key={index} key={index}
> >
<a href="" className={`${index == 0 ? ' text-sm font-bold' : ''}`}>{link}</a> <a href="" className={`${index == 0 ? ' text-lg font-bold' : ''}`}>{link}</a>
</li>) </li>)
} }
</ul>) </ul>)

@ -212,7 +212,7 @@ function Navbar({
{/* portrait end */} {/* portrait end */}
</div> </div>
) : ( ) : (
<header className={`rounded-b-md w-full bg-transparent pb-4`}> <header className={`rounded-b-md w-full bg-transparent pb-1`}>
<div className="flex flex-row justify-between items-center px-20 border-b border-gray-200 border-solid py-4 "> <div className="flex flex-row justify-between items-center px-20 border-b border-gray-200 border-solid py-4 ">
<div className="divide-x flex flex-row transform gap-4"> <div className="divide-x flex flex-row transform gap-4">
{/* <span className="text-sm font-normal text-blue52"> {/* <span className="text-sm font-normal text-blue52">
@ -269,7 +269,7 @@ function Navbar({
</div> </div>
<div <div
className={`flex items-center relative w-full py-4 px-20 border-b border-solid border-gray-200 transform bg-white ${ className={`flex items-center relative w-full py-2 px-20 border-b border-solid border-gray-200 transform bg-white ${
desktopEndTransform ? "" : "" desktopEndTransform ? "" : ""
}`} }`}
style={ style={
@ -282,11 +282,13 @@ function Navbar({
<img <img
src={darkCrimsonHamburgerMenu} src={darkCrimsonHamburgerMenu}
alt="" alt=""
className="w-5 transform translate-y-1 ml-2" className="w-8 transform translate-y-1 ml-2"
/> />
{/* <img src={whiteHamburgerMenu} alt="" className="w-3 h-3" /> */} {/* <img src={whiteHamburgerMenu} alt="" className="w-3 h-3" /> */}
<span className={`text-sm text-blue52 ${productCategoryTextColor}`}> <span className={`text-sm text-blue52 ${productCategoryTextColor}`}>
دسته بندی کالاها&nbsp;&nbsp; دسته بندی کالاها
&nbsp;&nbsp;
</span> </span>
</div> </div>
<div <div
@ -306,7 +308,7 @@ function Navbar({
{pages.map((item, index) => ( {pages.map((item, index) => (
<Link <Link
to={item.link} to={item.link}
className={`text-sm text-blue52 ${menuItemsColor}`} className={`text-sm text-blue52 ${menuItemsColor} hover:text-blueC0`}
key={"nav" + index} key={"nav" + index}
> >
{item.name} {item.name}

@ -49,14 +49,15 @@ const ProductDesign = ({
}) => { }) => {
const [isHovering, setIsHovering] = useState(false); const [isHovering, setIsHovering] = useState(false);
return ( return (
<div className={`flex flex-wrap sm:flex-nowrap justify-around ${big ? 'm-1' : 'w-48 m-2'} `} <div className={`flex flex-wrap sm:flex-nowrap justify-around ${big ? 'm' : 'w-48 m-2'} `}
style={big ? {width: '300px'} : {}} style={big ? {width: '300px'} : {}}
> >
<div className="w-full flex flex-wrap items-center justify-around my-5 px-4" onMouseEnter={() => setIsHovering(true)} <div className="w-full flex flex-wrap items-center justify-around my-5 px-4" >
onMouseLeave={() => setIsHovering(false)}>
<div <div
className={`w-full sm:w-60 md:w-72 ${big ? '' : 'mx-5'} rounded-lg transition-all p-2 my-3 ${productHolderBorder} ${hoverMode == 'blue' ? 'hover:bg-grayF4' : null} ${productHolderBorderColor} hover:${productHolderHoverBorder}`} className={`w-full sm:w-60 md:w-72 ${big ? '' : 'mx-5'} rounded-lg transition-all p-2 my-3 ${productHolderBorder} ${hoverMode == 'blue' ? 'hover:bg-grayF4' : null} ${productHolderBorderColor} hover:${productHolderHoverBorder}`}
onMouseEnter={() => setIsHovering(true)}
onMouseLeave={() => setIsHovering(false)}
> >
{/* product image */} {/* product image */}
<div className="w-full relative"> <div className="w-full relative">
@ -154,10 +155,7 @@ const ProductDesign = ({
{/* star */} {/* star */}
{star && ( {star && (
<div className="flex items-center mt-3"> <div className="flex items-center mt-3">
<StarRatingComponent <StarRating value={starRate} />
name="Product"
value={starRate}
/>
<span className="text-xs text-productContent font-bold text-gray-500 mr-2"> <span className="text-xs text-productContent font-bold text-gray-500 mr-2">
بر اساس {numberOfRegards} بررسی بر اساس {numberOfRegards} بررسی
</span> </span>

@ -20,17 +20,18 @@ const SalesContainer = ({
}, []); }, []);
return( return(
<div className="w-full my-10"> <div className="w-full my-10">
<div className="w-full"> <div className="w-full border-b-2 border-solid border-blue-300 mb-24" style={{height: '100px'}}>
<div className="w-1/3 p-10 bg-white flex justify-between items-center" style={{ <div className="w-1/3 p-10 bg-white flex justify-between items-center" style={{
marginBottom:'-5px' marginBottom:'-5px',
height:'200px'
}} onClick={() => console.log(list)}> }} onClick={() => console.log(list)}>
<div className="flex items-center "> <div className="flex items-center ">
<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> */}
<h1 className="text-3xl leading-normal"> <h1 className="text-3xl leading-normal">
<h3 className=" bg-blue-700 text-white"> دوشنبه </h3> <h3 className=" bg-blueC0 text-white text-center"> دوشنبه </h3>
<h3 className="mr-4 bg-yellow-300 pl-6"> کتاااابی </h3> <h3 className="mr-4 w-24 text-center" style={{background: '#EFFF00'}}> کتاااابی </h3>
</h1> </h1>
@ -46,7 +47,7 @@ const SalesContainer = ({
</div> </div>
</div> </div>
<ScrollContainer className="flex overflow-x-scroll border-t-0 py-4 px-10" > <ScrollContainer className="flex overflow-x-scroll border-t-0 py-4 pl-10" style={{height:'550px'}} >
{ {
list?.map((product, index) => ( list?.map((product, index) => (
<Link to={"/products/" + product?.id}> <Link to={"/products/" + product?.id}>
@ -67,6 +68,7 @@ const SalesContainer = ({
big big
starRate={Math.floor(Math.random() * 5) + 1} starRate={Math.floor(Math.random() * 5) + 1}
discountPricePercent discountPricePercent
hoverMode='blue'
/> />
</Link> </Link>
))} ))}

@ -3,8 +3,8 @@ import StarRatingComponent from "react-star-rating-component";
import starGrayIcon from '../../assets/icons/starGray.svg'; import starGrayIcon from '../../assets/icons/starGray.svg';
import starYellowIcon from '../../assets/icons/starYellow.svg'; import starYellowIcon from '../../assets/icons/starYellow.svg';
function StarRating() { function StarRating({value}) {
const [rate, setRating] = useState(2); const [rate, setRating] = useState(value);
return ( return (
<StarRatingComponent <StarRatingComponent
name="rate1" name="rate1"

@ -25,7 +25,7 @@ const Part2 = (
<div className="w-full my-6" style={{ <div className="w-full my-6" style={{
height: '550px' height: '550px'
}}> }}>
<div className="w-full flex justify-between items-center"> <div className="w-full flex justify-between items-center pr-10">
<div className="flex items-center text-4xl font-black text-blue52"> <div className="flex items-center text-4xl font-black text-blue52">
<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>
<h1> <h1>
@ -47,12 +47,12 @@ const Part2 = (
color= "text-blueC0" color= "text-blueC0"
onClick={() => null} onClick={() => null}
radius={false} radius={false}
twPaddings="py-4 px-12" twPaddings="py-4 px-12 rounded"
/> />
</Link> </Link>
</div> </div>
</div> </div>
<ScrollContainer className="flex overflow-x-scroll py-4 px-10"> <ScrollContainer className="flex overflow-x-scroll py-4 pl-10">
{ {
books?.slice(15,24).map((product, index) => ( books?.slice(15,24).map((product, index) => (
<Link to={"/products/" + product?.id}> <Link to={"/products/" + product?.id}>

Loading…
Cancel
Save