reza added ssum change and bug fix

master
Reza_ashrafi 3 years ago
parent 43a4ee2d60
commit 914bd79d94
  1. 38
      src/components/BookToggle/index.scss
  2. 19
      src/components/BookToggle/index.tsx
  3. 2
      src/components/GradeFilter/index.scss
  4. 10
      src/components/GradeFilter/index.tsx
  5. 2
      src/components/HomeSearchBox/index.scss
  6. 5
      src/components/Navbar/index.scss
  7. 6
      src/components/Navbar/index.tsx
  8. 2
      src/constants/width.scss
  9. 4
      src/custom.scss
  10. 6
      src/redux/reducers/public.tsx
  11. 6
      src/util/scroll.js
  12. 2
      src/views/Contact/index.scss
  13. 2
      src/views/Course/index.scss
  14. 2
      src/views/Home/AppDownload/index.scss
  15. 6
      src/views/Home/AppDownload/index.tsx
  16. 2
      src/views/Home/Blogs/index.scss
  17. 6
      src/views/Home/Blogs/index.tsx
  18. 2
      src/views/Home/Books/index.scss
  19. 10
      src/views/Home/Books/index.tsx
  20. 32
      src/views/Home/Courses/index.scss
  21. 8
      src/views/Home/Courses/index.tsx
  22. 2
      src/views/Home/Footer/index.scss
  23. 10
      src/views/Home/Header/index.scss
  24. 3
      src/views/Home/Header/index.tsx
  25. 4
      src/views/Home/index.scss
  26. 2
      src/views/Subscription/index.tsx
  27. 2
      src/views/VideoTube/index.scss

@ -2,34 +2,42 @@
width: calc(100% - 60px);
background-color: transparent;
height: calc(100vh / 1.8);
transition: all 0.3s;
&__info {
width: calc(100% / 2.5);
&--link {
transition: all 0.3s;
width: fit-content;
border-radius: 4px;
padding: 10px 35px;
align-self: end;
margin-top: 60px;
&:hover{
border-color: $green;
color: $green;
}
}
}
img {
&__img {
height: 90%;
border-radius: 8px;
img{
width : 100%;
height : 100%;
}
}
p {
margin-top: 20px;
}
a {
transition: all 0.3s;
width: fit-content;
border-radius: 4px;
padding: 10px 35px;
align-self: end;
margin-top: 60px;
&:hover{
border-color: $green;
color: $green;
}
}
&-light {
strong,
p {
color: $gray5;
}
a {
.book-toggle__info--link{
box-shadow: 0px 8px 10px rgba(0, 0, 0, 0.1);
color: $gray7;
}
@ -39,7 +47,7 @@
p {
color: $gray12;
}
a{
.book-toggle__info--link{
border: 1px solid white;
color: white;
}

@ -1,15 +1,24 @@
import React from "react";
import {Link} from 'react-router-dom';
import React, { useState, useEffect } from "react";
import { Link } from "react-router-dom";
import _ from "lodash";
import { connect } from "react-redux";
function BookToggle({ book, theme }: any) {
const [fade, setFade] = useState(false);
useEffect(() => {}, []);
useEffect(() => {
setFade(false);
setTimeout(() => {
setFade(true);
}, 500);
}, [book]);
return (
<div
className={_.join(
[
"book-toggle desktop justify-content-between align-items-center mx-auto px-2",
theme === "light" ? "book-toggle-light" : "book-toggle-dark",
fade ? "opacity-100" : "opacity-0",
],
" "
)}
@ -21,9 +30,11 @@ function BookToggle({ book, theme }: any) {
توجه است، ناگهان با اتهامهایی جدی مواجه میشود که خود و خانواده اش را
در موقعیت پیچیدهای قرار میدهد و...
</p>
<Link to={'/courses/' + book.id}>ادامه</Link>
<Link className="book-toggle__info--link" to={"/courses/" + book.id}>ادامه</Link>
</div>
<img src={`https://dnvn.ir/api/v1/file/${book.fileIds}`} alt="" />
<Link to={"/courses/" + book.id} className="book-toggle__img">
<img src={`https://dnvn.ir/api/v1/file/${book.fileIds}`} alt="" />
</Link>
</div>
);
}

@ -85,7 +85,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px){
.grade-filter{
max-width: 1250px;
max-width: $maxWidth;
ul{
position: relative;
}

@ -34,6 +34,12 @@ function GradeFilter({
],
" "
)}
style={{
transform:
window.innerWidth > 1027
? `translateY(-${window.innerHeight / 2}px)`
: "",
}}
>
<h1 className="d-flex align-items-center">
پایه تحصیلی
@ -84,7 +90,9 @@ function GradeFilter({
<li
key={i}
onClick={(e) => gradeFilter(item.value)}
className={selectedGrade === item.value ? "grade-filter__active" : ""}
className={
selectedGrade === item.value ? "grade-filter__active" : ""
}
>
{item.name}
</li>

@ -124,7 +124,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px) {
.home-search-box {
max-width: 1250px;
max-width: $maxWidth;
padding: 40px 0px 10px;
&__voice {
display: none;

@ -6,10 +6,11 @@
top: 0px !important;
left: 0px;
z-index: 150;
backdrop-filter: blur(8px);
&-light{
.nav___share{
box-shadow: 0px 8px 10px rgba(0, 0, 0, 0.1);
background-color: inherit !important;
background-color: inherit;
border: none;
// border: 1px solid $green1 !important;
a{
@ -100,7 +101,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px){
.nav{
&__container{
max-width: 1250px;
max-width: $maxWidth;
&--links{
li{
padding: 0px 20px;

@ -73,10 +73,14 @@ function Navbar(props: any) {
className={_.join(
[
"nav align-items-center justify-content-center",
theme === "light" ? "nav-light bg-white" : "nav-dark bg-black",
theme === "light" ? "bg-white nav-light" : "nav-dark bg-dark",
],
" "
)}
style={{
backgroundColor:
theme === "light" ? "rgba(255,255,255, 0.5)" : "rgba(0,0,0, 0.85)",
}}
>
<div className="nav__container d-flex align-items-center justify-content-between">
<ul className="nav__container--links desktop align-items-center">

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

@ -192,8 +192,8 @@ p {
.main {
width: 100%;
overflow-x: hidden;
padding-top: 60px;
min-height: 100vh;
padding-top: 60px;
position: relative;
padding-bottom: 20px;
font-family: numeralLight;
@ -432,7 +432,7 @@ p {
}
.main {
main {
max-width: 1250px;
max-width: $maxWidth;
}
}
.mobile {

@ -1,5 +1,5 @@
import { PublicAction } from "../actions-type";
import proxy from "../proxy";
import _ from 'lodash';
import location from '../../util/location';
const initialState = {
@ -54,7 +54,7 @@ const grades = [
"یازدهم",
"دوازدهم",
];
export default function publicApi(state = initialState, action: PublicAction) {
export default function publicApi( state = initialState, action: PublicAction) {
let { type, data } = action;
switch (type) {
case "public/setTheme":
@ -91,6 +91,8 @@ export default function publicApi(state = initialState, action: PublicAction) {
data.vods.map((item: any) => item.categoryId && item.categoryId)
)
);
// allCats = _.sortedUniq(allCats);
allCats.sort((a : any , b : any) => a - b);
return {
...state,
loading: false,

@ -9,12 +9,12 @@ class scroll {
const bookToggle1 = localStorage.getItem('bookToggle1');
if (option === 1) {
localStorage.setItem('bookToggle1', 1);
window.scrollTo(0, 1.1 * height);
window.scrollTo(0, 0.9 * height);
} else if (option === 2) {
if(bookToggle1) {
window.scrollTo(0, 2.3 * height);
window.scrollTo(0, 2.1 * height);
}else{
window.scrollTo(0, 1.8 * height);
window.scrollTo(0, 1.6 * height);
}
}
};

@ -132,7 +132,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px) {
.contact{
main{
max-width: 1250px;
max-width: $maxWidth;
padding: 40px 10px;
header{
padding-bottom: 20px;

@ -261,7 +261,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px) {
.course {
main {
max-width: 1250px;
max-width: $maxWidth;
padding: 0px 10px;
}
&__info {

@ -101,7 +101,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px) {
.app-download {
max-width: 1250px;
max-width: $maxWidth;
h1 {
font-size: calc(100vw / 40);
line-height: 2em;

@ -14,6 +14,12 @@ export default function AppDownload(props: any) {
],
" "
)}
style={{
transform:
window.innerWidth > 1027
? `translateY(-${window.innerHeight / 2}px)`
: "",
}}
>
<h1>دریافت اپلیکیشن دانوین</h1>
<figure className="app-download__figure d-flex flex-column align-items-center">

@ -65,7 +65,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px) {
.home-blogs {
max-width: 1250px;
max-width: $maxWidth;
header{
h1{
font-size: calc(100vw / 60);

@ -33,6 +33,12 @@ function Blogs(props: any) {
],
" "
)}
style={{
transform:
window.innerWidth > 1027
? `translateY(-${window.innerHeight / 2}px)`
: "",
}}
>
<header className="d-flex flex-column">
<h1>پیشنهادهای داغ برای شما</h1>

@ -55,7 +55,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px) {
.home-books {
max-width: 1250px;
max-width: $maxWidth;
header{
h1{
font-size: calc(100vw / 60);

@ -20,7 +20,15 @@ function Books({ list, number }: any) {
};
return (
<section className="home-books d-flex flex-column">
<section
className="home-books d-flex flex-column"
style={{
transform:
window.innerWidth > 1027
? `translateY(-${window.innerHeight / 2}px)`
: "",
}}
>
<div className="desktop flex-column" onClick={() => scroll.bookScroll(2)}>
<div className="position-relative">
<Carousel

@ -4,28 +4,38 @@
width: 100%;
margin: 0px auto;
position: relative;
padding: 20px 10px 30px;
font-family: numeralLight;
&-dark {
border-top: 1px solid $gray8;
border-bottom: 1px solid $gray8;
background: rgb(0, 0, 0);
background: linear-gradient(
0deg,
rgba(0, 0, 0, 1) 50%,
rgba(255, 255, 255, 0) 100%
);
}
&-light{
&-light {
background: rgb(255, 255, 255);
background: linear-gradient(
0deg,
rgba(255, 255, 255, 1) 70%,
rgba(255, 255, 255, 0) 100%
);
border-top: none !important;
header{
h1{
color : $green !important;
header {
h1 {
color: $green !important;
}
a{
a {
color: $green !important;
}
}
.home-courses__more{
.home-courses__more {
background-color: white !important;
}
}
header {
margin-bottom: 20px;
margin-bottom: 10px;
padding: 0px 50px 0px;
h1 {
font-family: numeralMedium;
color: white;
@ -78,7 +88,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px) {
.home-courses {
max-width: 1250px;
max-width: $maxWidth;
header {
h1 {
font-size: calc(100vw / 75);

@ -7,6 +7,7 @@ import { connect } from "react-redux";
import _ from "lodash";
import BookToggle from "../../../components/BookToggle";
import scroll from "../../../util/scroll";
import { transform } from "@babel/core";
function Courses({ number, courses, selectedSort, theme }: any) {
const [activeBook, setActiveBook] = useState(null);
@ -31,6 +32,13 @@ function Courses({ number, courses, selectedSort, theme }: any) {
],
" "
)}
style={{
transform:
window.innerWidth > 1027
? `translateY(-${window.innerHeight / 1.9}px)`
: "",
padding: `calc(${window.innerHeight / 3}px) 10px 30px`,
}}
>
<header className="d-flex justify-content-between align-items-center">
<div className="d-flex flex-column">

@ -47,7 +47,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px){
.footer{
&__container{
max-width: 1250px;
max-width: $maxWidth;
}
li{
font-size: calc(100vw / 100);

@ -1,8 +1,8 @@
.home-slider {
width: 100%;
padding: 2px 0px 0px;
margin: 20px auto 10px;
padding: 0px 0px 0px;
margin: 0px auto 10px;
position: relative;
.rec-arrow-left {
top: calc(50% - 22px) !important;
@ -64,13 +64,13 @@
}
.rec-slider-container {
border-radius: 10px;
border-radius: 0px !important;
}
.slider-header {
width: 100%;
justify-content: flex-end;
min-height : calc(100vh - 150px);
height : calc(100vh - 50px);
img{
width: 100%;
@ -128,6 +128,6 @@
@media screen and (min-width : 1008px) and (max-width: 1440px){
.home-slider{
max-width: 1250px;
max-width: $maxWidth;
}
}

@ -12,7 +12,7 @@ const HomeSlider = ({ headerData }: any) => {
isRTL={true}
enableTilt={true}
showArrows={true}
pagination={true}
pagination={false}
enableAutoPlay={true}
>
{headerData.map((item: any, i: any) => (
@ -23,6 +23,7 @@ const HomeSlider = ({ headerData }: any) => {
backgroundRepeat : 'no-repeat',
backgroundClip : 'content-box',
backgroundSize : '100% 100%',
borderRadius : 0
}}
>
{/* <

@ -8,14 +8,14 @@
@media screen and (min-width: 641px) and (max-width: 1007px){
.home{
padding: 60px 10px 0px;
padding: 0px 10px 0px;
position: relative;
}
}
@media screen and (max-width: 640px) {
.home{
padding: 60px 10px 0px;
padding: 0px 10px 0px;
position: relative;
background: rgb(0, 0, 0);

@ -35,7 +35,7 @@ function Subscription({
>
<Navbar />
<main className={"d-flex flex-column" + " " + (loading && "blur")}>
<h1>خرید اشتراک دانوین</h1>
<h1>خرید اشتراک ویديو</h1>
<p>
اینجا هم برای هر کتاب امکان خرید اشتراک جداگانه هست و هم اشتراک های
مدت دار. با خرید اشتراک های مدت دار دانوین می تونید در هزینه هاتون

@ -370,7 +370,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px) {
.video-tube {
main {
max-width: 1250px;
max-width: $maxWidth;
margin-top: 10px;
padding: 0px 10px;
}

Loading…
Cancel
Save