reza added ssum change and bug fix

master
Reza_ashrafi 3 years ago
parent 43a4ee2d60
commit 914bd79d94
  1. 30
      src/components/BookToggle/index.scss
  2. 17
      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. 34
      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,17 +2,11 @@
width: calc(100% - 60px); width: calc(100% - 60px);
background-color: transparent; background-color: transparent;
height: calc(100vh / 1.8); height: calc(100vh / 1.8);
transition: all 0.3s;
&__info { &__info {
width: calc(100% / 2.5); width: calc(100% / 2.5);
} &--link {
img {
height: 90%;
border-radius: 8px;
}
p {
margin-top: 20px;
}
a {
transition: all 0.3s; transition: all 0.3s;
width: fit-content; width: fit-content;
border-radius: 4px; border-radius: 4px;
@ -24,12 +18,26 @@
color: $green; color: $green;
} }
} }
}
&__img {
height: 90%;
border-radius: 8px;
img{
width : 100%;
height : 100%;
}
}
p {
margin-top: 20px;
}
&-light { &-light {
strong, strong,
p { p {
color: $gray5; color: $gray5;
} }
a { .book-toggle__info--link{
box-shadow: 0px 8px 10px rgba(0, 0, 0, 0.1); box-shadow: 0px 8px 10px rgba(0, 0, 0, 0.1);
color: $gray7; color: $gray7;
} }
@ -39,7 +47,7 @@
p { p {
color: $gray12; color: $gray12;
} }
a{ .book-toggle__info--link{
border: 1px solid white; border: 1px solid white;
color: white; color: white;
} }

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

@ -85,7 +85,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px){ @media screen and (min-width: 1008px) and (max-width: 1440px){
.grade-filter{ .grade-filter{
max-width: 1250px; max-width: $maxWidth;
ul{ ul{
position: relative; 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"> <h1 className="d-flex align-items-center">
پایه تحصیلی پایه تحصیلی
@ -84,7 +90,9 @@ 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>

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

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

@ -73,10 +73,14 @@ function Navbar(props: any) {
className={_.join( className={_.join(
[ [
"nav align-items-center justify-content-center", "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"> <div className="nav__container d-flex align-items-center justify-content-between">
<ul className="nav__container--links desktop align-items-center"> <ul className="nav__container--links desktop align-items-center">

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

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

@ -1,5 +1,5 @@
import { PublicAction } from "../actions-type"; import { PublicAction } from "../actions-type";
import proxy from "../proxy"; import _ from 'lodash';
import location from '../../util/location'; import location from '../../util/location';
const initialState = { 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; let { type, data } = action;
switch (type) { switch (type) {
case "public/setTheme": case "public/setTheme":
@ -91,6 +91,8 @@ export default function publicApi(state = initialState, action: PublicAction) {
data.vods.map((item: any) => item.categoryId && item.categoryId) data.vods.map((item: any) => item.categoryId && item.categoryId)
) )
); );
// allCats = _.sortedUniq(allCats);
allCats.sort((a : any , b : any) => a - b);
return { return {
...state, ...state,
loading: false, loading: false,

@ -9,12 +9,12 @@ class scroll {
const bookToggle1 = localStorage.getItem('bookToggle1'); const bookToggle1 = localStorage.getItem('bookToggle1');
if (option === 1) { if (option === 1) {
localStorage.setItem('bookToggle1', 1); localStorage.setItem('bookToggle1', 1);
window.scrollTo(0, 1.1 * height); window.scrollTo(0, 0.9 * height);
} else if (option === 2) { } else if (option === 2) {
if(bookToggle1) { if(bookToggle1) {
window.scrollTo(0, 2.3 * height); window.scrollTo(0, 2.1 * height);
}else{ }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) { @media screen and (min-width: 1008px) and (max-width: 1440px) {
.contact{ .contact{
main{ main{
max-width: 1250px; max-width: $maxWidth;
padding: 40px 10px; padding: 40px 10px;
header{ header{
padding-bottom: 20px; padding-bottom: 20px;

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

@ -101,7 +101,7 @@
@media screen and (min-width: 1008px) and (max-width: 1440px) { @media screen and (min-width: 1008px) and (max-width: 1440px) {
.app-download { .app-download {
max-width: 1250px; max-width: $maxWidth;
h1 { h1 {
font-size: calc(100vw / 40); font-size: calc(100vw / 40);
line-height: 2em; 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> <h1>دریافت اپلیکیشن دانوین</h1>
<figure className="app-download__figure d-flex flex-column align-items-center"> <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) { @media screen and (min-width: 1008px) and (max-width: 1440px) {
.home-blogs { .home-blogs {
max-width: 1250px; max-width: $maxWidth;
header{ header{
h1{ h1{
font-size: calc(100vw / 60); 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"> <header className="d-flex flex-column">
<h1>پیشنهادهای داغ برای شما</h1> <h1>پیشنهادهای داغ برای شما</h1>

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

@ -20,7 +20,15 @@ function Books({ list, number }: any) {
}; };
return ( 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="desktop flex-column" onClick={() => scroll.bookScroll(2)}>
<div className="position-relative"> <div className="position-relative">
<Carousel <Carousel

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

@ -7,6 +7,7 @@ import { connect } from "react-redux";
import _ from "lodash"; import _ from "lodash";
import BookToggle from "../../../components/BookToggle"; import BookToggle from "../../../components/BookToggle";
import scroll from "../../../util/scroll"; import scroll from "../../../util/scroll";
import { transform } from "@babel/core";
function Courses({ number, courses, selectedSort, theme }: any) { function Courses({ number, courses, selectedSort, theme }: any) {
const [activeBook, setActiveBook] = useState(null); 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"> <header className="d-flex justify-content-between align-items-center">
<div className="d-flex flex-column"> <div className="d-flex flex-column">

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

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

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

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

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

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

Loading…
Cancel
Save