diff --git a/src/redux/actions-type/public.tsx b/src/redux/actions-type/public.tsx index 328e647..371135b 100644 --- a/src/redux/actions-type/public.tsx +++ b/src/redux/actions-type/public.tsx @@ -43,6 +43,11 @@ interface selectMenu { data: any; } +interface getHeader{ + type: "public/homePageVOD"; + data: any; +} + interface error { type: "error"; data: undefined; @@ -67,6 +72,7 @@ type PublicAction = | getCity | getContactData | selectMenu + | getHeader | loading | error; diff --git a/src/redux/actions/public.tsx b/src/redux/actions/public.tsx index c740924..192d8d5 100644 --- a/src/redux/actions/public.tsx +++ b/src/redux/actions/public.tsx @@ -29,6 +29,10 @@ const publicApi = { await proxy.get("public/city", data, { dispatch }), selectMenu: (data: Object) => async (dispatch: Dispatch) => await dispatch({ type: "public/selectMenu", data: data }), + getHeader: + (data = {}) => + async (dispatch: Dispatch) => + await proxy.get("public/homePageVOD", data, { dispatch }), }; export default publicApi; diff --git a/src/redux/reducers/public.tsx b/src/redux/reducers/public.tsx index 9c27170..0231b0f 100644 --- a/src/redux/reducers/public.tsx +++ b/src/redux/reducers/public.tsx @@ -26,6 +26,7 @@ const initialState = { name: "برنامه نویسی", }, ], + header : [], selectedMenu : null, contactData: null }; @@ -175,6 +176,8 @@ export default function publicApi(state = initialState, action: PublicAction) { return { ...state, loading: false, error: null, city: data }; case "public/selectMenu": return { ...state, loading: false, error: null, selectedMenu : data }; + case "public/homePageVOD": + return { ...state, loading: false, error: null, header : data }; case "loading": return { ...state, loading: true }; case "error": diff --git a/src/views/Home/Books/Book/index.scss b/src/views/Home/Books/Book/index.scss index cc37e47..446bc33 100644 --- a/src/views/Home/Books/Book/index.scss +++ b/src/views/Home/Books/Book/index.scss @@ -37,7 +37,7 @@ .home-books-book{ &:hover{ transform : scale(0.95); - border: 1px solid #84de56; + background-color: #86868628; } img{ height: 300px; diff --git a/src/views/Home/Courses/Course/index.scss b/src/views/Home/Courses/Course/index.scss index 7af0ab4..d5ab24d 100644 --- a/src/views/Home/Courses/Course/index.scss +++ b/src/views/Home/Courses/Course/index.scss @@ -36,7 +36,7 @@ @media screen and (min-width : 1441px){ .home-courses-course{ &:hover{ - border: 1px solid #84de56; + background-color: #86868628; transform: scale(0.95); } img{ diff --git a/src/views/Home/Header/Item/index.scss b/src/views/Home/Header/Item/index.scss deleted file mode 100644 index 98ff880..0000000 --- a/src/views/Home/Header/Item/index.scss +++ /dev/null @@ -1,71 +0,0 @@ -.home-header-item{ - width: 100%; - color: white; - font-family: numeralLight; - border-radius: 10px; -} - -@media screen and (min-width: 1441px){ - .home-header-item{ - max-width: 1250px; - height: 400px; - div{ - width: 29%; - h1{ - font-family: numeralMedium; - font-size: 24px; - } - h2{ - font-size: 20px; - } - p{ - margin-top: 20px; - font-size: 16px; - } - } - - } -} - -@media screen and (min-width: 1008px) and (max-width: 1440px) { - .home-header-item{ - max-width: 1250px; - height: 400px; - div{ - width: 31%; - h1{ - font-family: numeralBold; - font-size: calc(100vw / 60); - } - h2{ - font-size: calc(100vw / 70); - font-family: numeralMedium; - } - p{ - margin-top: 20px; - font-size:calc(100vw / 90); - } - } - } -} - -@media screen and (min-width: 640px) and (max-width: 1007px) { - .home-header-item{ - max-width: 900px; - height: 235px; - div{ - width: 31%; - h1{ - font-family: numeralBold; - font-size: calc(100vw / 50); - } - h2{ - font-size: calc(100vw / 60); - } - p{ - margin-top: 20px; - font-size: calc(100vw / 70); - } - } - } -} \ No newline at end of file diff --git a/src/views/Home/Header/Item/index.tsx b/src/views/Home/Header/Item/index.tsx deleted file mode 100644 index 24005af..0000000 --- a/src/views/Home/Header/Item/index.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react"; -import './index.scss'; - -export default function Item(props: any) { - const { data } = props; - const style = { - background: `url(${data.imageUrl})`, - backgroundSize : '100% 100%', - backgroundRepeat : 'no-repeat', - backgroundAttachment : 'fixed', - backgroundPosition: '0px 0px', - }; - return ( -
{data.text}
-