-
Notifications
You must be signed in to change notification settings - Fork 24
Балашов Ярослав, М3335 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,23 +9,41 @@ | |
| "not op_mini all" | ||
| ], | ||
| "dependencies": { | ||
| "@bem-react/classname": "1.5.0", | ||
| "@types/classnames": "2.2.7", | ||
| "@types/jest": "24.0.12", | ||
| "@types/node": "11.13.8", | ||
| "@types/react": "16.8.15", | ||
| "@types/react-dom": "16.8.4", | ||
| "@types/react-window": "1.8.0", | ||
| "@types/recompose": "0.30.6", | ||
| "classnames": "2.2.6", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| "react": "16.8.6", | ||
| "react-dom": "16.8.6" | ||
| "react-cookie": "3.1.2", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "react-cookies": "0.1.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Удали лишние зависимости |
||
| "react-dom": "16.8.6", | ||
| "react-window": "1.8.1", | ||
| "recompose": "0.30.0", | ||
| "universal-cookie": "3.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@hellroot/eslint-config": "1.8.0", | ||
| "@hellroot/stylelint-config": "1.1.0", | ||
| "bemify": "0.1.2", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Удали лишнее |
||
| "eslint": "5.12.0", | ||
| "npm-run-all": "4.1.5", | ||
| "prettier": "1.17.0", | ||
| "react-scripts": "2.1.8", | ||
| "static-site-generator-webpack-plugin": "3.4.2", | ||
| "stylelint": "10.0.1", | ||
| "typescript": "3.3.4000" | ||
| "typescript": "3.3.4000", | ||
| "webpack": "4.28.3" | ||
| }, | ||
| "scripts": { | ||
| "dev": "react-scripts start", | ||
| "test": "react-scripts test", | ||
| "build": "react-scripts build", | ||
| "eject": "react-scripts eject", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. YAGNI |
||
| "lint": "npm-run-all lint:*", | ||
| "lint:js": "eslint '**/*.{js,jsx}'", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. eslint "**/*.{js,jsx}" |
||
| "lint:css": "stylelint '**/*.css'", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,16 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="ru"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" /> | ||
| <meta | ||
| name="viewport" | ||
| content="width=device-width, initial-scale=1, shrink-to-fit=no" | ||
| /> | ||
| <meta name="theme-color" content="#000000" /> | ||
| <title>React App</title> | ||
| </head> | ||
| <body> | ||
| <noscript>You need to enable JavaScript to run this app.</noscript> | ||
| <div id="root"></div> | ||
| </body> | ||
| <head> | ||
| <meta charset="utf-8"/> | ||
| <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.png"/> | ||
| <meta | ||
| name="viewport" | ||
| content="width=device-width, initial-scale=1, shrink-to-fit=no" | ||
| /> | ||
| <meta name="theme-color" content="#000000"/> | ||
| <title>Яндекс Почта</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| </body> | ||
| </html> |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| .check { | ||
| width: 16px; | ||
| height: 16px; | ||
| } | ||
|
|
||
| .input { | ||
| position: absolute; | ||
| top: 1px; | ||
| left: 10px; | ||
|
|
||
| width: 30px; | ||
| height: 30px; | ||
| -webkit-appearance: none; | ||
| -moz-appearance: none; | ||
| appearance: none; | ||
| cursor: pointer; | ||
| outline: none; | ||
| } | ||
|
|
||
| .box { | ||
| position: absolute; | ||
|
|
||
| width: 16px; | ||
| height: 16px; | ||
|
|
||
| border: 1px solid rgba(0, 0, 0, 0.15); | ||
| background-color: #fff; | ||
| border-radius: 3px; | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| .box:after { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Псевдоклассы пишутся с :: |
||
| position: absolute; | ||
| top: 0; | ||
| left: 0; | ||
|
|
||
| width: 7px; | ||
| height: 21px; | ||
| margin: -9px 0 0 6px; | ||
|
|
||
| border-right: 2px solid; | ||
| border-bottom: 2px solid; | ||
| color: #000; | ||
| content: ''; | ||
| -webkit-transform: scale(0.85) rotate(47deg) skewX(12deg); | ||
| transform: scale(0.85) rotate(47deg) skewX(12deg); | ||
| visibility: hidden; | ||
| } | ||
|
|
||
| .box_checked { | ||
| border-color: rgba(153, 122, 0, 0.5); | ||
| box-shadow: inset 0 90px #ffeba0; | ||
| } | ||
|
|
||
| .box_checked:after { | ||
| visibility: inherit; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import React from 'react'; | ||
| import pure from 'recompose/pure'; | ||
| import cx from 'classnames'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Обычно сокращают до cn |
||
|
|
||
| import styles from './check.module.css'; | ||
|
|
||
| interface IProps { | ||
| isChecked: boolean; | ||
| onChange?: () => void; | ||
| } | ||
|
|
||
| const Check = (props: IProps) => { | ||
| // console.log('Check'); | ||
| const { isChecked, onChange } = props; | ||
| const boxClassName = cx(styles.box, { | ||
| [styles.box_checked]: isChecked | ||
| }); | ||
|
|
||
| return ( | ||
| <div className={styles.check}> | ||
| <label> | ||
| <input className={styles.input} type="checkbox" checked={isChecked} onChange={onChange} /> | ||
| <span className={boxClassName} /> | ||
| </label> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default pure(Check); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,139 @@ | ||
| .box { | ||
| position: relative; | ||
| top: -42px; | ||
|
|
||
| height: 0; | ||
| transition: height 0.5s, top 0.5s; | ||
| } | ||
|
|
||
| .box_hasAddAnimation { | ||
| top: 0; | ||
|
|
||
| height: 42px; | ||
| } | ||
|
|
||
| .box_hasRemoveAnimation { | ||
| z-index: 0 !important; | ||
| top: -42px; | ||
|
|
||
| height: 0; | ||
| } | ||
|
|
||
| .line { | ||
| position: relative; | ||
|
|
||
| height: 20px; | ||
| padding: 10px 20px; | ||
| margin: 0; | ||
| font-size: 13px; | ||
| } | ||
|
|
||
| .line_theme_light { | ||
| background-color: #fff; | ||
| } | ||
|
|
||
| .line_theme_dark { | ||
| background-color: #1d1d1d; | ||
| color: #9b9b9b; | ||
| } | ||
|
|
||
| .line_unread.line_theme_light { | ||
| color: #000; | ||
| font-weight: 700; | ||
| } | ||
|
|
||
| .line_unread.line_theme_dark { | ||
| color: #fff; | ||
| } | ||
|
|
||
| .item { | ||
| display: inline-block; | ||
| overflow: hidden; | ||
| list-style-type: none; | ||
| text-overflow: ellipsis; | ||
| vertical-align: middle; | ||
| } | ||
|
|
||
| .item:first-child { | ||
| vertical-align: initial; | ||
| } | ||
|
|
||
| .item:last-child { | ||
| font-weight: initial; | ||
| } | ||
|
|
||
| .author { | ||
| width: 30px; | ||
| height: 30px; | ||
| margin: -5px 0 0 10px; | ||
| } | ||
|
|
||
| .author_hasLogo { | ||
| width: 100%; | ||
| height: 100%; | ||
| border-radius: 100px; | ||
| } | ||
|
|
||
| .author_noLogo { | ||
| width: 100%; | ||
| height: 100%; | ||
| background-color: #f33; | ||
| border-radius: 100px; | ||
| color: #fff; | ||
| font: 500 18px Helvetica Neue Light, sans-serif; | ||
| line-height: 30px; | ||
| text-align: center; | ||
| } | ||
|
|
||
| .authorName { | ||
| width: 160px; | ||
| margin: 0 0 5px 10px; | ||
| } | ||
|
|
||
| .readMark { | ||
| width: 10px; | ||
| height: 10px; | ||
| margin: 0 0 5px 5px; | ||
| } | ||
|
|
||
| .readMark_unread { | ||
| background-color: #6287bd; | ||
| border-radius: 100px; | ||
| } | ||
|
|
||
| .topic { | ||
| position: absolute; | ||
| top: 13px; | ||
| right: 70px; | ||
| left: 281px; | ||
|
|
||
| overflow: hidden; | ||
| min-width: 220px; | ||
| } | ||
|
|
||
| .topic_isOpen { | ||
| font: 700 30px Helvetica Neue, sans-serif; | ||
| text-align: center; | ||
| word-wrap: break-word; | ||
| } | ||
|
|
||
| .body { | ||
| margin-top: 30px; | ||
| } | ||
|
|
||
| .date { | ||
| position: absolute; | ||
| top: 13px; | ||
| right: 20px; | ||
| color: #9b9b9b; | ||
| text-align: right; | ||
| } | ||
|
|
||
| .linkOpen { | ||
| position: absolute; | ||
| top: -2px; | ||
| right: 0; | ||
| bottom: 2px; | ||
| left: 45px; | ||
| cursor: pointer; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@typesдолжны быть в `devDependencies