diff --git a/src/App.js b/src/App.js index cc91822d..3574cc54 100644 --- a/src/App.js +++ b/src/App.js @@ -3,7 +3,7 @@ import { HashRouter as Router, Route, Switch } from 'react-router-dom'; import 'bootstrap/dist/css/bootstrap.min.css'; import './fonts/stylesheet.css'; -// const AuthPageForDevelopers = lazy(() => import('./pages/AuthPageForDevelopers')); +const AuthPageForDevelopers = lazy(() => import('./pages/AuthPageForDevelopers')); // const AuthPageForPartners = lazy(() => import('./pages/AuthPageForPartners')); const HomePage = lazy(() => import('./pages/HomePage')); const CandidatePage = lazy(() => import('./pages/CandidatePage')); @@ -23,14 +23,16 @@ const App = () => { + + +
Not found page
) : ( - - {/* */} + {/* */} )} diff --git a/src/components/Auth/AuthForDevelopers.js b/src/components/Auth/AuthForDevelopers.js index 4b497e1e..f47eabf8 100644 --- a/src/components/Auth/AuthForDevelopers.js +++ b/src/components/Auth/AuthForDevelopers.js @@ -4,7 +4,6 @@ import ellipse from '../../images/ellipse.png'; import arrow from '../../images/arrow__login_page.png'; import authImg from '../../images/auth_img.png'; import cross from '../../images/cross.png'; -// import specialists from '../../images/specialists.png'; import text from '../../images/Body_Text.png'; import align from '../../images/align-left.png'; import phone from '../../images/phone.png'; diff --git a/src/components/Calendar/CalendarComponent.js b/src/components/Calendar/CalendarComponent.js index ea65d785..34ba4d57 100644 --- a/src/components/Calendar/CalendarComponent.js +++ b/src/components/Calendar/CalendarComponent.js @@ -2,9 +2,10 @@ import React, { useState, useEffect } from 'react'; import style from './CalendarComponent.module.css'; import ellipse from '../../images/ellipse.png'; import rectangle from '../../images/rectangle__calendar.png'; +import calendarIcon from '../../images/calendar_icon.png'; import moment from 'moment'; -import calendarHelper from './calendarHelper'; import 'moment/locale/ru'; +import calendarHelper from './calendarHelper'; const CalendarComponent = () => { const [value, setValue] = useState(moment()); @@ -14,38 +15,23 @@ const CalendarComponent = () => { setCalendar(calendarHelper(value)); }, [value]); - function isSelected(day) { - return value.isSame(day, 'day'); + function beforeToday(day) { + return day.isBefore(new Date(), 'day'); } - // function beforeToday(day) { - // return day.isBefore(new Date(), 'day'); - // } + function isToday(day) { + return day.isSame(new Date(), 'day'); + } - // function isToday(day) { - // return day.isSame(new Date(), 'day'); - // } - // const month = [ - // 'January', - // 'February', - // 'March', - // 'April', - // 'May', - // 'June', - // 'July', - // 'August', - // 'September', - // 'October', - // 'November', - // 'December', - // ]; + function dayStyles(day) { + if (beforeToday(day)) return `${style.before}`; + if (isToday(day)) return `${style.today}`; + if (day.day() === 6 || day.day() === 0) return `${style.selected}`; + return ''; + } function currentMonth(day) { - return day.format('MMMM'); - } - - function currentDay(day) { - return day.format('D'); + return day.format('D MMMM'); } function prevMonth() { @@ -56,12 +42,6 @@ const CalendarComponent = () => { return value.clone().add(1, 'month'); } - function thisMonth() { - return value.isSame(new Date(), 'month'); - } - - console.log(thisMonth()); - ////////////////////////////////////////////////////////////////////////// return ( @@ -96,8 +76,15 @@ const CalendarComponent = () => {
{calendar.map((week) => week.map((day) => ( - )) )} diff --git a/src/components/Calendar/CalendarComponent.module.css b/src/components/Calendar/CalendarComponent.module.css index fab52808..aacdd623 100644 --- a/src/components/Calendar/CalendarComponent.module.css +++ b/src/components/Calendar/CalendarComponent.module.css @@ -84,9 +84,29 @@ border: 1px solid #c4c4c4; background-color: #ffffff; margin-top: 20px; + font-family: 'GT Eesti Pro Display'; + font-size: 1.2em; + font-weight: 100; + font-style: normal; + letter-spacing: normal; + line-height: normal; + text-align: center; +} + +.calendarIcon { + margin-right: 10px; + margin-top: -4px; +} + +.before { + opacity: 0.2; +} + +.today { + font-weight: bold !important; + border: 1px solid #398208 !important; } .selected { - font-weight: bold; - border: 1px solid #398208 !important; + background-color: yellow !important; } diff --git a/src/components/Calendar/calendarHelper.js b/src/components/Calendar/calendarHelper.js index 1499edb5..77b6c734 100644 --- a/src/components/Calendar/calendarHelper.js +++ b/src/components/Calendar/calendarHelper.js @@ -6,11 +6,9 @@ export default function calendarHelper(value) { const calendar = []; - console.log('calendar', calendar); - while (day.isBefore(endDay, 'day')) { calendar.push( - Array(7) + Array(1) .fill(0) .map(() => day.add(1, 'day').clone()) ); diff --git a/src/components/Sidebar/Sidebar.js b/src/components/Sidebar/Sidebar.js index ec525e91..74f03456 100644 --- a/src/components/Sidebar/Sidebar.js +++ b/src/components/Sidebar/Sidebar.js @@ -1,4 +1,5 @@ import React from 'react'; +import { Link } from 'react-router-dom'; import dogBig from '../../images/dog.jpg'; import arrowLeft from '../../images/arrow_left.png'; import arrowRight from '../../images/arrow_right.png'; @@ -11,7 +12,9 @@ const Sidebar = () => {

Опыт работы

4+ лет

- + + +

Посмотреть ещё

diff --git a/src/images/calendar_icon.png b/src/images/calendar_icon.png new file mode 100644 index 00000000..9d696927 Binary files /dev/null and b/src/images/calendar_icon.png differ