reza fixed some bugs

master
Reza 3 years ago
parent 308f945261
commit 5d477da7e0
  1. 13
      src/components/GradeFilter/index.scss
  2. 4
      src/components/GradeFilter/index.tsx
  3. 10
      src/components/HomeSearchBox/index.scss
  4. 8
      src/components/Navbar/index.scss
  5. 6
      src/components/NavbarDrawer/NavbarDrawer.scss
  6. 2
      src/components/NavbarDrawer/NavbarDrawer.tsx
  7. 1
      src/constants/width.scss
  8. 25
      src/custom.scss
  9. 2
      src/views/Contact/index.scss
  10. 4
      src/views/Course/Lesson/index.tsx
  11. 2
      src/views/Course/index.scss
  12. 6
      src/views/Courses/Course/index.scss
  13. 11
      src/views/Courses/index.scss
  14. 25
      src/views/Courses/index.tsx
  15. 2
      src/views/Home/AppDownload/index.scss
  16. 2
      src/views/Home/Blogs/index.scss
  17. 11
      src/views/Home/Books/Book/index.scss
  18. 2
      src/views/Home/Books/index.scss
  19. 4
      src/views/Home/Books/index.tsx
  20. 3
      src/views/Home/Courses/index.scss
  21. 2
      src/views/Home/Courses/index.tsx
  22. 2
      src/views/Home/Footer/index.scss
  23. 2
      src/views/Home/Footer/index.tsx
  24. 2
      src/views/Home/Header/index.scss
  25. 2
      src/views/Home/Header/index.tsx
  26. 4
      src/views/Home/index.tsx
  27. 1
      src/views/Subscription/index.scss
  28. 2
      src/views/VideoTube/index.scss

@ -43,14 +43,14 @@
top: 0px; top: 0px;
right: 0px; right: 0px;
height: 100%; height: 100%;
width : calc(100% / 12); width : calc(100% / 11);
transition: right 0.5s; transition: right 0.5s;
background-color: $green5; background-color: $green5;
box-shadow: 0px 0px 20px $green; box-shadow: 0px 0px 20px $green;
z-index: 50; z-index: 50;
} }
li{ li{
width: calc(100% / 12); width: calc(100% / 11);
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
padding: 6px 0px; padding: 6px 0px;
@ -60,12 +60,14 @@
} }
&__active{ &__active{
border-radius: 5px; border-radius: 5px;
color: white;
transition: all 0.3s;
} }
} }
@media screen and (min-width: 1441px){ @media screen and (min-width: 1441px){
.grade-filter{ .grade-filter{
max-width: 1350px; max-width: $maxWidth;
ul{ ul{
position: relative; position: relative;
} }
@ -172,12 +174,13 @@
position: relative; position: relative;
h1{ h1{
font-size: calc(100vw / 30); font-size: calc(100vw / 30);
background-color: $green5; background-color: $green;
box-shadow: 0px 0px 2px $green; box-shadow: 0px 0px 2px $green;
border-top-right-radius: 8px; border-top-right-radius: 8px;
border-bottom-right-radius: 8px; border-bottom-right-radius: 8px;
padding: 13px 15px; // padding: 13px 15px;
color: white; color: white;
height: 100%;
} }
&__box{ &__box{
flex: 1; flex: 1;

@ -75,7 +75,7 @@ function GradeFilter({
<figure <figure
style={{ style={{
right: right:
((mobileList as any).current?.offsetWidth / 12) * ((mobileList as any).current?.offsetWidth / 11) *
(selectedGrade - 1), (selectedGrade - 1),
}} }}
></figure> ></figure>
@ -84,7 +84,7 @@ function GradeFilter({
<li <li
key={i} key={i}
onClick={(e) => gradeFilter(item.value)} onClick={(e) => gradeFilter(item.value)}
// className={selectedGrade === item.value ? "grade-filter__active" : ""} className={selectedGrade === item.value ? "grade-filter__active" : ""}
> >
{item.name} {item.name}
</li> </li>

@ -5,6 +5,9 @@
* { * {
transition: all 0.5s; transition: all 0.5s;
} }
button{
border: none;
}
&-dark{ &-dark{
form { form {
button { button {
@ -80,7 +83,7 @@
@media screen and (min-width: 1441px) { @media screen and (min-width: 1441px) {
.home-search-box { .home-search-box {
width: 100%; width: 100%;
max-width: 1350px; max-width: $maxWidth;
padding: 40px 0px 10px; padding: 40px 0px 10px;
&__voice { &__voice {
display: none; display: none;
@ -125,6 +128,7 @@
padding: 40px 0px 10px; padding: 40px 0px 10px;
&__voice { &__voice {
display: none; display: none;
} }
form { form {
width: 850px; width: 850px;
@ -204,10 +208,10 @@
display: flex !important; display: flex !important;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 55px; width: 45px;
background : inherit !important; background : inherit !important;
& img{ & img{
width: 28px; width: 25px;
} }
} }
&__searchIcon { &__searchIcon {

@ -61,7 +61,7 @@
@media screen and (min-width: 1441px){ @media screen and (min-width: 1441px){
.nav{ .nav{
&__container{ &__container{
max-width: 1350px; max-width: $maxWidth;
&--links{ &--links{
li{ li{
padding: 0px; padding: 0px;
@ -171,5 +171,11 @@
} }
&___login{ &___login{
} }
&__search{
min-width : 50px !important;
& img{
width : 22px;
}
}
} }
} }

@ -1,6 +1,6 @@
.navbar-drawer-light{ .navbar-drawer-light{
.MuiDrawer-paperAnchorRight { .MuiDrawer-paperAnchorRight {
background: white !important; // background: white !important;
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none !important; display: none !important;
width: 0px !important; width: 0px !important;
@ -13,7 +13,7 @@
.navbar-drawer-dark{ .navbar-drawer-dark{
.MuiDrawer-paperAnchorRight { .MuiDrawer-paperAnchorRight {
background: rgb(28, 28, 28) !important; // background: rgb(28, 28, 28) !important;
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none !important; display: none !important;
width: 0px !important; width: 0px !important;
@ -26,6 +26,8 @@
text-align: right !important; text-align: right !important;
direction: rtl; direction: rtl;
padding: 30px 0px 10px 0px; padding: 30px 0px 10px 0px;
height: 100vh;
border-left: 1px solid $gray5;
a { a {
text-decoration: none; text-decoration: none;
} }

@ -185,7 +185,7 @@ const NavbarDrawer = ({ status, logout, theme }: any) => {
className={_.join( className={_.join(
[ [
"navbar-drawer d-flex flex-column", "navbar-drawer d-flex flex-column",
light ? "navbar-drawer-light" : "navbar-drawer-dark", light ? "navbar-drawer-light bg-light" : "navbar-drawer-dark bg-black",
], ],
" " " "
)} )}

@ -0,0 +1 @@
$maxWidth : calc(100% - 120px);

@ -1,4 +1,5 @@
@import "./constants/colors.scss"; @import "./constants/colors.scss";
@import "./constants/width.scss";
@import "./components/BreadCrumbs/index.scss"; @import "./components/BreadCrumbs/index.scss";
@import "./components/GradeFilter/index.scss"; @import "./components/GradeFilter/index.scss";
@import "./components/HomeSearchBox/index.scss"; @import "./components/HomeSearchBox/index.scss";
@ -32,7 +33,6 @@
} }
.bg-black { .bg-black {
background-color: black !important;
.MuiButton-root { .MuiButton-root {
color: white !important; color: white !important;
} }
@ -289,13 +289,26 @@ p {
} }
//SELECT //SELECT
.MuiList-root {
background-color: inherit !important;
}
.MuiPaper-root {
backdrop-filter: blur(7px) !important;
background-color: rgba($gray5, 0.4) !important;
}
.MuiMenuItem-root { .MuiMenuItem-root {
background: #272727 !important; background-color: inherit !important;
border-bottom: 1px solid #707070 !important; border-bottom: 1px solid $gray !important;
color: white !important;
font-size: 14px !important; font-size: 14px !important;
font-family: numeralLight !important; font-family: numeralLight !important;
padding: 20px !important; padding: 20px !important;
a {
background-color: inherit !important;
color: $gray13 !important;
}
} }
.MuiSelect-root { .MuiSelect-root {
@ -345,7 +358,7 @@ p {
padding: 5px 0px; padding: 5px 0px;
} }
&:nth-child(even) { &:nth-child(even) {
border-right: 1px solid #555 !important; border-right: 1px solid $gray7 !important;
} }
} }
} }
@ -383,7 +396,7 @@ p {
} }
.main { .main {
main { main {
max-width: 1350px; max-width: $maxWidth;
} }
} }
.mobile { .mobile {

@ -100,7 +100,7 @@
@media screen and (min-width: 1441px) { @media screen and (min-width: 1441px) {
.contact{ .contact{
main{ main{
max-width: 1350px; max-width: $maxWidth;
padding-top: 60px; padding-top: 60px;
header{ header{
padding-bottom: 30px; padding-bottom: 30px;

@ -109,6 +109,7 @@ function Lesson({
} }
> >
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<Link to={"/video/" + data.id}>
{data.type === "video" && {data.type === "video" &&
(light ? ( (light ? (
<img src={greenPlay} alt="" /> <img src={greenPlay} alt="" />
@ -121,6 +122,8 @@ function Lesson({
) : ( ) : (
<img src={document} alt="" /> <img src={document} alt="" />
))} ))}
</Link>
<Link to={"/video/" + data.id} >
<img <img
className={ className={
selectedLesson === data.id selectedLesson === data.id
@ -130,6 +133,7 @@ function Lesson({
src={`https://dnvn.ir/api/v1/file/${data.posterId}`} src={`https://dnvn.ir/api/v1/file/${data.posterId}`}
alt="" alt=""
/> />
</Link>
<h5>{data.name}</h5> <h5>{data.name}</h5>
</div> </div>
<ul className="d-flex"> <ul className="d-flex">

@ -169,7 +169,7 @@
@media screen and (min-width: 1441px) { @media screen and (min-width: 1441px) {
.course { .course {
main { main {
max-width: 1350px; max-width: $maxWidth;
} }
&__info { &__info {
flex: 4; flex: 4;

@ -15,8 +15,8 @@
&-dark{ &-dark{
border-bottom: 1px solid $gray8; border-bottom: 1px solid $gray8;
&:hover { &:hover {
background-color: $gray6; background-color: $gray1;
box-shadow: 0px 0px 10px rgba(146, 146, 146, 0.6); box-shadow: 0px 0px 10px rgb(214, 214, 214);
img { img {
transform: translateX(10px) scale(1.14); transform: translateX(10px) scale(1.14);
} }
@ -111,7 +111,6 @@
@media screen and (min-width: 641px) and (max-width: 1007px) { @media screen and (min-width: 641px) and (max-width: 1007px) {
.courses-course { .courses-course {
margin-top: 20px; margin-top: 20px;
background-color: $gray;
border-radius: 10px; border-radius: 10px;
box-shadow: 0px 0px 10px rgba(146, 146, 146, 0.6); box-shadow: 0px 0px 10px rgba(146, 146, 146, 0.6);
img { img {
@ -137,7 +136,6 @@
@media screen and (max-width: 640px) { @media screen and (max-width: 640px) {
.courses-course { .courses-course {
margin-top: 20px; margin-top: 20px;
background-color: $gray;
border-radius: 10px; border-radius: 10px;
box-shadow: 0px 0px 10px rgba(146, 146, 146, 0.6); box-shadow: 0px 0px 10px rgba(146, 146, 146, 0.6);
img { img {

@ -2,12 +2,21 @@
.courses { .courses {
position: relative; position: relative;
&-light{
h3{
color: $gray5;
}
}
&-dark{
h3{
color: $gray;
}
}
main { main {
margin-top: 30px; margin-top: 30px;
h3{ h3{
margin-top : 100px; margin-top : 100px;
text-align: center; text-align: center;
color: $gray5;
transition: all 0.5s; transition: all 0.5s;
opacity: 0; opacity: 0;
transform : translateY(-50px); transform : translateY(-50px);

@ -10,6 +10,7 @@ import BreadCrumbs from "../../components/BreadCrumbs";
import Loader from "../../components/Loader"; import Loader from "../../components/Loader";
import Vocal from "../../components/Vocal/Vocal"; import Vocal from "../../components/Vocal/Vocal";
import { info } from "console"; import { info } from "console";
import _ from "lodash";
function Courses({ function Courses({
getList, getList,
@ -39,10 +40,16 @@ function Courses({
setVocal(false); setVocal(false);
} }
}, [inputValue]); }, [inputValue]);
const light = theme === "light";
return ( return (
<div <div
className="courses main d-flex flex-column" className={_.join(
[
"courses main d-flex flex-column",
light ? "courses-light bg-white" : "courses-dark bg-black",
],
" "
)}
style={{ filter: loading ? "blur(8px)" : "" }} style={{ filter: loading ? "blur(8px)" : "" }}
> >
<Navbar /> <Navbar />
@ -72,9 +79,19 @@ function Courses({
item.gradeId === item.gradeId ===
(selectedMenu || Number(localStorage.getItem("selectedGrade"))) (selectedMenu || Number(localStorage.getItem("selectedGrade")))
) )
.map((item: any, i: any) => <Course data={item} key={i} theme={theme} />)} .map((item: any, i: any) => (
<Course data={item} key={i} theme={theme} />
))}
<h3 className={(inputValue && sortFilterCourse.length === 0 ) ? "courses-notFound" : ""}>محصولی یافت نشد.</h3> <h3
className={
inputValue && sortFilterCourse.length === 0
? "courses-notFound"
: ""
}
>
محصولی یافت نشد.
</h3>
{page === "search" && vocal ? ( {page === "search" && vocal ? (
<Vocal setVocal={setVocal} setInputValue={setInputValue} /> <Vocal setVocal={setVocal} setInputValue={setInputValue} />
) : null} ) : null}

@ -51,7 +51,7 @@
@media screen and (min-width: 1441px) { @media screen and (min-width: 1441px) {
.app-download { .app-download {
max-width: 1350px; max-width: $maxWidth;
h1 { h1 {
font-size: 40px; font-size: 40px;
line-height: 2em; line-height: 2em;

@ -48,7 +48,7 @@
@media screen and (min-width: 1441px) { @media screen and (min-width: 1441px) {
.home-blogs { .home-blogs {
max-width: 1350px; max-width: $maxWidth;
header{ header{
h1{ h1{
font-size: 20px; font-size: 20px;

@ -2,8 +2,8 @@
cursor: pointer; cursor: pointer;
transition: all 0.5s; transition: all 0.5s;
border: 1px solid black; border: 1px solid black;
margin: 10px;
border-radius: 10px; border-radius: 10px;
margin: 0px 10px;
&-light{ &-light{
border : none !important; border : none !important;
border-bottom: 1px solid $gray12 !important; border-bottom: 1px solid $gray12 !important;
@ -42,12 +42,13 @@
@media screen and (min-width : 1441px){ @media screen and (min-width : 1441px){
.home-books-book{ .home-books-book{
max-width: 246px;
&:hover{ &:hover{
transform : scale(0.95); transform : scale(0.95);
background-color: #86868628; background-color: #86868628;
} }
img{ img{
height: 300px; height: 340px;
} }
h2{ h2{
font-size: 20px; font-size: 20px;
@ -63,13 +64,13 @@
@media screen and (min-width : 1008px) and (max-width : 1440px){ @media screen and (min-width : 1008px) and (max-width : 1440px){
.home-books-book{ .home-books-book{
max-width: 240px;
&:hover{ &:hover{
transform : scale(0.95); transform : scale(0.95);
background-color: #86868628; background-color: #86868628;
} }
img{ img{
height: 250px; height: 340px;
// width: 100%;
} }
h2{ h2{
font-size: calc(100vw / 80); font-size: calc(100vw / 80);
@ -86,7 +87,7 @@
@media screen and (min-width : 641px) and (max-width : 1007px){ @media screen and (min-width : 641px) and (max-width : 1007px){
.home-books-book{ .home-books-book{
img{ img{
height: 200px; height: 250px;
border-bottom-left-radius: 25px !important; border-bottom-left-radius: 25px !important;
} }
h2{ h2{

@ -38,7 +38,7 @@
@media screen and (min-width: 1441px) { @media screen and (min-width: 1441px) {
.home-books { .home-books {
max-width: 1350px; max-width: $maxWidth;
header{ header{
h1{ h1{
font-size: 20px; font-size: 20px;

@ -9,9 +9,9 @@ function Books({list, number}: any) {
if (window.innerWidth >= 1440) { if (window.innerWidth >= 1440) {
return 5; return 5;
} else if (window.innerWidth >= 1008 && window.innerWidth < 1440) { } else if (window.innerWidth >= 1008 && window.innerWidth < 1440) {
return 5;
} else if (window.innerWidth > 640 && window.innerWidth < 1008) {
return 4; return 4;
} else if (window.innerWidth > 640 && window.innerWidth < 1008) {
return 3;
} else { } else {
return 2; return 2;
} }

@ -12,7 +12,6 @@
} }
&-light{ &-light{
border-top: none !important; border-top: none !important;
border-bottom: 1px solid $gray12;
header{ header{
h1{ h1{
color : $green !important; color : $green !important;
@ -62,7 +61,7 @@
@media screen and (min-width: 1441px) { @media screen and (min-width: 1441px) {
.home-courses { .home-courses {
max-width: 1350px; max-width: $maxWidth;
header { header {
h1 { h1 {
font-size: 20px; font-size: 20px;

@ -54,7 +54,7 @@ function Courses({ number, courses, selectedSort, theme }: any) {
)} )}
<Link <Link
className="home-courses__more align-items-center desktop" className="home-courses__more align-items-center hidden"
to="/courses" to="/courses"
> >
مشاهده بیشتر{" "} مشاهده بیشتر{" "}

@ -27,7 +27,7 @@
@media screen and (min-width: 1441px){ @media screen and (min-width: 1441px){
.footer{ .footer{
&__container{ &__container{
max-width: 1350px; max-width: $maxWidth;
} }
li{ li{
font-size: 14px; font-size: 14px;

@ -37,7 +37,7 @@ export default connect((state : any) => ({
Footer.defaultProps = { Footer.defaultProps = {
links: [ links: [
{ name: "تعرفهها", link: "/subscribe" }, // { name: "تعرفهها", link: "/subscribe" },
{ name: "سوالات متداول", link: "/faq" }, { name: "سوالات متداول", link: "/faq" },
{ name: "درباره ما", link: "/about" }, { name: "درباره ما", link: "/about" },
{ name: "فروشگاه", link: "https://dnvn.ir/products" }, { name: "فروشگاه", link: "https://dnvn.ir/products" },

@ -119,7 +119,7 @@
@media screen and (min-width: 1441px) { @media screen and (min-width: 1441px) {
.home-slider { .home-slider {
max-width: 1340px; max-width: $maxWidth;
width: 100%; width: 100%;
justify-content: flex-end; justify-content: flex-end;
} }

@ -4,8 +4,6 @@ import Carousel from "react-elastic-carousel";
import dropdown from "../../../assets/icons/dropdown.png"; import dropdown from "../../../assets/icons/dropdown.png";
import "./index.scss";
const HomeSlider = ({ headerData}: any) => { const HomeSlider = ({ headerData}: any) => {
return ( return (
<div className="home-slider d-flex"> <div className="home-slider d-flex">

@ -143,9 +143,5 @@ Home.defaultProps = {
name: "یازدهم", name: "یازدهم",
value: 11, value: 11,
}, },
{
name: "دوازدهم",
value: 12,
},
], ],
}; };

@ -2,6 +2,7 @@
@import './SubscribeRadio/index.scss'; @import './SubscribeRadio/index.scss';
.subscription { .subscription {
margin-top: 20px;
&-dark{ &-dark{
main { main {
h1,h2{ h1,h2{

@ -279,7 +279,7 @@
@media screen and (min-width: 1441px) { @media screen and (min-width: 1441px) {
.video-tube { .video-tube {
main { main {
max-width: 1350px; max-width: $maxWidth;
margin-top: 10px; margin-top: 10px;
} }
&__content { &__content {

Loading…
Cancel
Save