reza fixed some bug

master
Reza 3 years ago
parent 07ca5cf436
commit 3934ae8fd1
  1. BIN
      src/assets/icons/Group 59.png
  2. BIN
      src/assets/icons/tick.png
  3. 7
      src/components/Navbar/index.scss
  4. 47
      src/components/StyledRating/index.tsx
  5. 6
      src/custom.scss
  6. 2
      src/views/Course/Lesson/index.scss
  7. 26
      src/views/Course/index.scss
  8. 2
      src/views/Home/Courses/index.scss
  9. 287
      src/views/Home/Header/index.scss
  10. 105
      src/views/Home/Header/index.tsx

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

@ -15,9 +15,6 @@
}
}
.MuiButton-root{
color: $gray5 !important;
}
}
&__container{
width: 100%;
@ -152,8 +149,8 @@
max-width: 500px;
&--buttons{
li{
padding: 6px;
border-radius: 7px;
padding: 8px 6px;
border-radius: 6px;
min-width : 60px;
text-align: center;
font-size: calc(100vw / 32);

@ -3,22 +3,41 @@ import StarIcon from "@mui/icons-material/Star";
import Rating from "@mui/material/Rating";
export default function StyledRating({ rate, theme }: any) {
const mobile = window.innerWidth < 1008;
return (
<>
<Rating
name="customized-color"
defaultValue={rate}
precision={0.5}
icon={<StarIcon style={{ fontSize: 25, color: "#FFED00" }} />}
emptyIcon={
<StarIcon
style={{
fontSize: 25,
color: theme === "dark" ? "#494949" : "#777",
}}
/>
}
/>
{mobile && (
<Rating
name="customized-color"
defaultValue={rate}
precision={0.5}
icon={<StarIcon style={{ fontSize: 20, color: "#FFED00" }} />}
emptyIcon={
<StarIcon
style={{
fontSize: 20,
color: theme === "dark" ? "#494949" : "#aaa",
}}
/>
}
/>
)}
{!mobile && (
<Rating
name="customized-color"
defaultValue={rate}
precision={0.5}
icon={<StarIcon style={{ fontSize: 20, color: "#FFED00" }} />}
emptyIcon={
<StarIcon
style={{
fontSize: 20,
color: theme === "dark" ? "#494949" : "#aaa",
}}
/>
}
/>
)}
</>
);
}

@ -311,9 +311,13 @@ p {
}
//Menu
.bg-black{
.MuiButton-root {
color: white !important;
}
}
.MuiButton-root {
font-family: numeralLight !important;
color: white !important;
span {
margin-left: 0px !important;
margin-right: 5px;

@ -242,7 +242,7 @@
header {
border-top-right-radius: 10px;
border-top-left-radius: 10px;
padding: 10px 5px !important;
padding: 5px 5px !important;
h4 {
font-size: calc(100vw / 30);
}

@ -34,6 +34,9 @@
background-color: $gray12;
box-shadow: none;
color: $gray5;
&__number i{
color : $gray5 !important;
}
}
&--button {
background-color: $gray12;
@ -90,6 +93,9 @@
border: 2px solid $gray7;
box-shadow: 0px 0px 20px #f7ff0179;
color: white;
&__number i{
color: white !important;
}
}
&--button {
background-color: #313131;
@ -386,7 +392,7 @@
// height: 160px;
// margin-bottom: 30px;
border: none;
box-shadow: 0px 0px 0px #f7ff01b3;
// box-shadow: 0px 0px 0px #f7ff01b3;
&__number {
i {
font-size: calc(100vw / 40);
@ -460,6 +466,7 @@
}
}
&--description {
width: 100%;
a {
font-size: calc(100vw / 30);
}
@ -480,18 +487,15 @@
// display : none !important;
flex: 2;
&--rate {
// width: 70%;
width: 100%;
// height: 160px;
// margin-bottom: 30px;
border: none;
box-shadow: 0px 0px 0px #f7ff01b3;
border: none !important;
background-color: transparent !important;
box-shadow: 0px 0px 0px #f7ff01b3 !important;
&__number {
i {
font-size: calc(100vw / 40);
color: white;
}
b {
font-size: calc(100vw / 30);
font-size: calc(100vw / 20);
}
span {
font-size: calc(100vw / 28);
@ -500,7 +504,9 @@
}
h2 {
margin-top: 5px;
font-size: calc(100vw / 40);
font-size: calc(100vw / 38);
margin-bottom: 5px !important;
font-weight: 600;
}
}
&--button {

@ -15,7 +15,7 @@
border-bottom: 1px solid $gray12;
header{
h1{
color : $green4 !important;
color : $green !important;
}
a{
color: $green !important;

@ -1,197 +1,132 @@
.home-header {
position: relative;
.home-slider {
width: 100%;
margin: 0px auto;
margin-top: 10px;
&-dark{
.carousel-indicators{
li{
background-color: inherit !important;
}
}
padding: 2px 0px 0px;
margin: 20px auto 10px;
position: relative;
.rec-arrow-left {
top: calc(50% - 22px) !important;
right: 5px !important;
}
.rec-arrow-right {
top: calc(50% - 22px) !important;
left: 5px !important;
}
&-light{
.carousel-indicators{
li{
padding: 5px;
border-radius: 5px !important;
background-color: rgba(255, 255, 255, 0.281) !important;
}
}
.rec-dot_active {
background-color: green !important;
color: white !important;
// box-shadow: 0 0 1px rgba(255, 255, 255, 1) !important;
}
.Carousel-button-10 {
background-color: grey !important;
}
.rec-pagination {
z-index: 200;
// left: calc(50% - 20px) !important;
& button {
background-color: grey;
margin: 2px !important;
box-shadow: 0px 0px 0px rgba(100, 100, 100, 1);
&:focus {
box-shadow: 0px 0px 0px rgba(100, 100, 100, 1);
}
}
span {
height: 80%;
width: 8px;
background-color: white;
border-radius: 10px;
}
.rec-slider-container {
margin: 0px !important;
}
.rec-arrow {
position: absolute !important;
z-index: 100;
background-color: inherit !important;
box-shadow: none !important;
border: 0px !important;
color: grey !important;
&:focus {
color: grey !important;
}
.item {
height: 460px;
background-size: 100% 100% !important;
background-repeat: no-repeat !important;
background-position: 0px 0px !important;
font-family: numeralLight;
color: white;
padding-right: 70%;
padding-top: 120px;
border-radius: 10px;
margin: 0px 10px;
h1 {
font-family: numeralBold;
}
&:disabled {
color: black !important;
display: none !important;
}
strong {
font-weight: 300;
&:enabled {
color: grey;
}
&__cover {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
background: linear-gradient(
0deg,
hsla(0, 0%, 0%, 1) 0%,
hsla(250, 14%, 61%, 0) 44%
);
border-radius: 10px;
&:hover {
color: white;
}
}
@media screen and (min-width: 1441px) {
.home-header {
max-width: 1350px;
font-family: numeralLight;
&__info{
&--author{
position: absolute;
left: 30px;
bottom: 100px;
h3{
margin-right: 5px;
font-size: 15px;
}
i{
margin-right: 5px;
font-size: 15px;
}
}
}
.item {
h1 {
font-family: numeralMedium;
font-size: 24px;
}
h2{
font-size: 17px;
font-family: numeralMedium;
}
}
.carousel-indicators li {
margin-left: 20px !important;
max-width: 150px !important;
div {
margin-right: 10px;
}
strong {
font-size: 12px;
}
b {
font-size: 16px;
}
}
}
.rec-slider-container {
border-radius: 10px;
}
@media screen and (min-width: 1008px) and (max-width: 1440px) {
.home-header {
max-width: 1250px;
.item {
.slider-header {
width: 100%;
justify-content: flex-end;
img{
width: 100%;
padding-top: 360px;
h1 {
font-size: calc(100vw / 65);
}
h2 {
font-size: calc(100vw / 80);
}
}
&__info{
&--author{
position: absolute;
left: 30px;
bottom: 100px;
h3{
margin-right: 5px;
font-size: calc(100vw / 100);
}
i{
margin-right: 5px;
font-size: calc(100vw / 100);
}
}
}
.carousel-indicators li {
margin-left: 10px !important;
max-width: 200px !important;
div {
margin-right: 10px;
}
strong {
font-size: calc(100vw / 100);
}
b {
font-size: calc(100vw / 90);
}
}
}
}
// &__right {
// width: 60%;
// height: 100%;
// // & img {
.carousel-indicators {
position: absolute !important;
left: 0px !important;
right: auto !important;
bottom: 40px !important;
z-index: auto !important;
display: auto !important;
justify-content: auto !important;
padding: auto !important;
margin: 0px !important;
list-style: auto !important;
color: white;
width: 30% !important;
justify-content: flex-start !important;
// // border-radius: 10px;
// // }
// }
// &__left {
// width: 40%;
// height: 100%;
// justify-content: center;
// align-items: flex-end;
// padding-left: 70px;
span.active {
height: 80% !important;
width: 8px !important;
background-color: yellow !important;
}
// h1 {
// font-size: calc(100vw / 55);
// color: white;
// font-family: numeralMedium;
// letter-spacing: -1px;
// }
// h2 {
// margin-top: 5px;
// font-size: calc(100vw / 78);
// color: white;
// font-family: numeralMedium;
// }
// a {
// text-decoration: none;
// color: white;
// margin-top: 10px;
// font-size: calc(100vw / 90);
// padding: 6px 10px;
// border: 1px solid white;
// border-radius: 5px;
// font-family: numeralMedium;
// &:hover {
// color: white;
// }
// }
// }
}
.active span {
background-color: yellow !important;
height: 80% !important;
width: 8px !important;
@media screen and (min-width: 1441px) {
.home-slider {
max-width: 1440px;
width: 100%;
justify-content: flex-end;
}
}
.carousel-indicators li {
display: auto !important;
width: auto !important;
height: auto !important;
margin: 0px !important;
text-indent: 0px !important;
cursor: pointer !important;
background-color: inherit !important;
border: 0px !important;
border-radius: 0px !important;
text-align: right !important;
justify-content: flex-start !important;
font-family: numeralLight !important;
span {
height: 80%;
width: 8px;
background-color: white;
border-radius: 10px;
@media screen and (min-width : 1008px) and (max-width: 1440px){
.home-slider{
max-width: 1250px;
}
}
}

@ -1,65 +1,48 @@
import React from "react";
import Avatar from "@mui/material/Avatar";
import _ from "lodash";
import React, { Component } from "react";
import { Link } from "react-router-dom";
import Carousel from "react-elastic-carousel";
export default function Header(props: any) {
const { headerData, theme } = props;
import dropdown from "../../../assets/icons/dropdown.png";
import "./index.scss";
const HomeSlider = ({ headerData}: any) => {
return (
<header
className={_.join(
[
"home-header",
theme === "light" ? "home-header-light" : "home-header-dark",
],
" "
)}
>
<div id="myCarousel" className="carousel slide" data-ride="carousel">
<div className="carousel-inner">
{headerData.map((item: any, i: any) => (
<div
className={i === 0 ? "item active" : "item"}
style={{
background: `url(${
"https://dnvn.ir/api/v1/file/" + item.fileId
})`,
}}
// dataBackgroundImage={`https://dnvn.ir/api/v1/file/${item.fileId}`}
key={i}
<div className="home-slider d-flex">
<Carousel
itemsToShow={1}
isRTL={true}
enableTilt={false}
showArrows={true}
pagination={true}
enableAutoPlay={true}
>
{headerData.map((item: any, i: any) => (
<div className="slider-header d-flex">
{/* <
className="slider-header__right d-flex"
style={{ backgroundColor: item.backgroundColor }}
> */}
<img
src={`https://dnvn.ir/api/v1/file/${item.fileId}`}
alt={item.title}
/>
{/* <div
style={{ backgroundColor: item.backgroundColor }}
className="slider-header__left d-flex flex-column"
>
<div className="home-header__cover"></div>
<div className="home-header__info d-flex flex-column">
<div className="home-header__info--author d-flex">
{item.authorImage && <Avatar src={item.authorImage} />}
<div className="d-flex flex-column">
<h3>{item.extraText}</h3>
{/* <i>نویسنده</i> */}
</div>
</div>
{/* <h1>{(Number(i) + 1)}</h1> */}
<h1>{item.title}</h1>
<h2>{item.subTitle}</h2>
</div>
</div>
))}
</div>
<div className="carousel-indicators">
{headerData.map((item1: any, i: any) => (
<li
className="d-flex align-items-center"
data-target="#myCarousel"
data-slide-to={i}
key={i}
>
<span className={i === 0 ? "active" : ""}></span>
<div className="d-flex flex-column">
<b>{"."}</b>
<strong>{item1.title}</strong>
</div>
</li>
))}
</div>
</div>
</header>
<h1>{item.title}</h1>
<h2>{item.subTitle}</h2>
{item.buttonText && (
<Link to={item.link || "/"}>{item.buttonText}</Link>
)}
</div> */}
</div>
))}
</Carousel>
</div>
);
}
};
export default HomeSlider;
Loading…
Cancel
Save