Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,155 changes: 1,047 additions & 108 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 20 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,41 @@
"not op_mini all"
],
"dependencies": {
"@bem-react/classname": "1.5.0",
"@types/classnames": "2.2.7",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@types должны быть в `devDependencies

"@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",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bem-react/classnames

"react": "16.8.6",
"react-dom": "16.8.6"
"react-cookie": "3.1.2",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"react-cookies": "0.1.0",

Choose a reason for hiding this comment

The 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",

Choose a reason for hiding this comment

The 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",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YAGNI

"lint": "npm-run-all lint:*",
"lint:js": "eslint '**/*.{js,jsx}'",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eslint "**/*.{js,jsx}"

"lint:css": "stylelint '**/*.css'",
Expand Down
Binary file removed public/favicon.ico
Binary file not shown.
Binary file added public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 13 additions & 14 deletions public/index.html
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>
27 changes: 0 additions & 27 deletions src/app/app.css

This file was deleted.

25 changes: 0 additions & 25 deletions src/app/app.jsx

This file was deleted.

11 changes: 0 additions & 11 deletions src/app/app.test.jsx

This file was deleted.

1 change: 0 additions & 1 deletion src/app/index.js

This file was deleted.

57 changes: 57 additions & 0 deletions src/components/check/check.module.css
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 {

Choose a reason for hiding this comment

The 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;
}
29 changes: 29 additions & 0 deletions src/components/check/check.tsx
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';

Choose a reason for hiding this comment

The 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);
139 changes: 139 additions & 0 deletions src/components/letter/letter.module.css
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;
}
Loading