some bugs fixing

master
RezaAshrafi77 3 years ago
parent 6401a3d9bf
commit e810e8b89d
  1. 16
      src/custom.scss
  2. 2
      src/views/Auth/SignUp/index.scss
  3. 33
      src/views/Course/Lesson/index.scss
  4. 60
      src/views/Course/Lesson/index.tsx
  5. 2
      src/views/Course/index.scss
  6. 2
      src/views/VideoTube/index.scss

@ -84,21 +84,7 @@
} }
.main { .main {
background: linear-gradient( background: black;
90deg,
hsla(0, 0%, 31%, 1) 0%,
hsla(0, 0%, 0%, 1) 100%
);
background: -moz-linear-gradient(
90deg,
hsla(0, 0%, 31%, 1) 0%,
hsla(0, 0%, 0%, 1) 100%
);
background: -webkit-linear-gradient(
90deg,
hsla(0, 0%, 31%, 1) 0%,
hsla(0, 0%, 0%, 1) 100%
);
width: 100%; width: 100%;
overflow-x: hidden; overflow-x: hidden;
padding-top: 60px; padding-top: 60px;

@ -315,7 +315,7 @@
&__error{ &__error{
margin-top: 10px; margin-top: 10px;
color: rgb(255, 115, 115); color: rgb(255, 115, 115);
font-size: calc(100vw / 110); font-size: calc(100vw / 30);
} }
} }
} }

@ -1,8 +1,13 @@
.lesson { .lesson {
transition: all 0.5 ease-in;
&__active{
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
header { header {
background-color: #414141; background-color: #414141;
border: 1px solid #b3b3b3 !important; border: 1px solid #b3b3b3 !important;
padding: 10px 15px !important; padding: 5px 15px !important;
cursor: pointer; cursor: pointer;
h4 { h4 {
color: #9cdf52; color: #9cdf52;
@ -17,10 +22,12 @@
} }
} }
&__files{ &__files{
padding: 30px 15px 20px !important; padding : 0px !important;
border-left: 1px solid #b3b3b3; border-left: 1px solid #b3b3b3;
border-right: 1px solid #b3b3b3; border-right: 1px solid #b3b3b3;
border-bottom: 1px solid #b3b3b3; border-bottom: 1px solid #b3b3b3;
// max-height: 0px
transition: all 0.4s ease-in;
& img{ & img{
width: 40px; width: 40px;
} }
@ -32,8 +39,12 @@
} }
h5{ h5{
margin-right: 30px; margin-right: 30px;
margin-bottom: 0px;
} }
} }
&--active{
padding : 30px 15px 20px !important;
}
} }
} }
@ -90,6 +101,11 @@
h5{ h5{
font-size: calc(100vw/ 75); font-size: calc(100vw/ 75);
} }
}
&--active{
padding: 15px 5px !important;
} }
} }
} }
@ -118,8 +134,9 @@
&__files{ &__files{
border-bottom-left-radius: 10px; border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px; border-bottom-right-radius: 10px;
padding: 15px 5px !important; padding : 0px !important;
&--sample{ &--sample{
margin-bottom: 20px;
img{ img{
width: 30px; width: 30px;
} }
@ -132,6 +149,10 @@
margin-right: 10px; margin-right: 10px;
} }
} }
&--active{
padding: 25px 5px !important;
}
} }
} }
} }
@ -159,7 +180,7 @@
&__files{ &__files{
border-bottom-left-radius: 10px; border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px; border-bottom-right-radius: 10px;
padding: 15px 5px !important; padding: 0px !important;
&--sample{ &--sample{
img{ img{
width: 30px; width: 30px;
@ -173,6 +194,10 @@
margin-right: 5px; margin-right: 5px;
} }
} }
&--active{
padding: 15px 5px !important;
}
} }
} }
} }

@ -6,6 +6,7 @@ import lock from "../../../assets/icons/lock.png";
import "./index.scss"; import "./index.scss";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { book } from "../../../redux/actions"; import { book } from "../../../redux/actions";
import LessonPlayList from "../../VideoTube/LessonPlayList";
function Lesson(props: any) { function Lesson(props: any) {
const { lesson } = props; const { lesson } = props;
@ -24,7 +25,11 @@ function Lesson(props: any) {
</div> </div>
</header> </header>
<header <header
className="mobile justify-content-between align-items-center" className={
"mobile justify-content-between align-items-center" +
" " +
(!lesson.active && "lesson__active")
}
onClick={() => props.toggle(lesson.id)} onClick={() => props.toggle(lesson.id)}
> >
<div className="d-flex flex-column"> <div className="d-flex flex-column">
@ -35,24 +40,41 @@ function Lesson(props: any) {
<img src={whiteDropdown} alt="" /> <img src={whiteDropdown} alt="" />
</div> </div>
</header> </header>
{lesson.active && ( <ul
<ul className="lesson__files d-flex flex-column"> className={
{lesson.files.map((data: any, i: any) => ( "lesson__files d-flex flex-column" +
<li className="lesson__files--sample d-flex justify-content-between align-items-center"> " " +
<div className="d-flex align-items-center"> (lesson.active && "lesson__files--active")
{data.type === "video" && <img src={whitePlay} alt="" />} }
{data.type === "document" && <img src={document} alt="" />} style={{
<h5>{data.name}</h5> height: lesson.active
</div> ? lesson.files.length *
<ul className="d-flex"> (window.innerWidth > 1007
<li>{data.type !== "document" && data.duration}</li> ? window.innerWidth / 75 + 45
<li>{data.view && "مشاهده"}</li> : window.innerWidth / 33 + 45)
<li>{data.download ? "دانلود" : <img src={lock} alt="" />}</li> : "0px",
</ul> }}
</li> >
))} {lesson.files.map((data: any, i: any) => (
</ul> <li
)} className="lesson__files--sample justify-content-between align-items-center"
style={{
display: lesson.active ? "flex" : "none",
}}
>
<div className="d-flex align-items-center">
{data.type === "video" && <img src={whitePlay} alt="" />}
{data.type === "document" && <img src={document} alt="" />}
<h5>{data.name}</h5>
</div>
<ul className="d-flex">
<li>{data.type !== "document" && data.duration}</li>
<li>{data.view && "مشاهده"}</li>
<li>{data.download ? "دانلود" : <img src={lock} alt="" />}</li>
</ul>
</li>
))}
</ul>
</div> </div>
); );
} }

@ -66,7 +66,7 @@
border-radius: 10px; border-radius: 10px;
header{ header{
padding: 40px 0px 20px; padding: 20px 0px 20px !important;
border: 0px; border: 0px;
h2{ h2{
color: #4DD35B; color: #4DD35B;

@ -285,7 +285,7 @@
&--addComment{ &--addComment{
width: 60%; width: 60%;
button{ button{
font-size: calc(100vw / 100); font-size: calc(100vw / 110);
} }
textarea{ textarea{
font-size: calc(100vw / 90); font-size: calc(100vw / 90);

Loading…
Cancel
Save