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
2,274 changes: 1,775 additions & 499 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"husky": "3.0.3",
"lint-staged": "9.2.1",
"react": "16.8.5",
"react-dom": "16.8.5"
},
Expand Down
290 changes: 268 additions & 22 deletions src/app/app.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,273 @@
.app {
text-align: center;
width: auto;
height: 100%;
background-color: #e5eaf0;
}

.app-header {
display: flex;
min-height: 100vh;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #282c34;
color: #fff;
font-size: calc(10px + 2vmin);
}

.app-link {
color: #61dafb;
}

@keyframes app-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
position: relative;
top: 2%;
left: 2%;

width: 100%;
height: 5.2%;
}

.img {
position: absolute;
top: 20%;

height: auto;
float: left;
}

.search {
position: relative;
top: 5%;

width: 70%;
height: 100%;
float: left;
}

.search__search-form {
position: relative;

width: 65%;
height: 100%;
margin-left: 18%;
font-family: 'YSText-Regular', serif;
font-size: 100%;
font-weight: 400;
line-height: 100%;
opacity: 0.5033;
}

.logo {
position: relative;
top: 0;

display: inline-block;

width: auto;
height: auto;
float: left;
}

.logo__img {
position: relative;
float: left;
}

.content {
position: relative;
top: 8%;
left: 2%;

width: 100%;
height: 100%;
float: left;
}

.menu {
position: relative;
top: 0;

width: 15%;
height: 100%;
float: left;
}

.menu__button_write {
position: relative;
top: 0;

height: 5.1%;
padding-top: 6%;
background: #6287bd;
border-radius: 5px;
color: white;
font-family: HelveticaNeue-Medium, sans-serif;
font-size: 100%;
text-align: center;
vertical-align: center;
}

.options {
height: 25%;
margin-top: 6%;
}

.option {
display: table;
height: 18%;
padding-top: 3%;
padding-left: 5%;
border-radius: 5px;
color: #707070;
font-family: HelveticaNeue-Medium, sans-serif;
font-size: 100%;
vertical-align: center;
}

.option:hover {
background: #cccccc;
}

.option:active {
background: #cdd6e4;
}

.main {
width: 70%;
height: 80%;
background: white;
border-radius: 0.5%;
box-shadow: 0 2px 6px black;
float: left;
}

.actions {
width: 100%;
height: 3.125%;
padding-left: 1%;

border-bottom: 1px solid #e2e2e2;
}

.checkbox {
height: calc(70% - 0px);
float: left;
vertical-align: middle;
}

.action {
display: table;
height: 100%;
padding: 0 2%;
color: #cccccc;
float: left;
font-family: HelveticaNeue-Medium, sans-serif;
font-size: 100%;
line-height: 100%;
text-align: center;
}

.action:hover {
background: #e5eaf0;
}

.letters {
height: 93.75%;
}

.letter {
width: 100%;
height: 3.3%;
padding: 0 1%;

border-bottom: 1px solid #e2e2e2;
font-size: 100%;
overflow-y: hidden;
transition: height 0.6s, background-color 0.6s;
}

.letter__contact {
float: left;
}

.letter[data-state='deleted'] {
animation: deletion 0.6s 1 ease forwards;
}

.letter[data-state='hidden'] {
height: 0%;

border-width: 0px;
}

.letter[data-state='showed'] {
animation: addition 0.6s 1 ease forwards;
}

.letter__text {
display: none;
width: 0;
}

.letter_hidden {
display: none;
}

.icon {
width: 2%;
height: 100%;
padding: 0.15% 0 0 0.5%;
float: left;
vertical-align: middle;
}

.from {
display: table;
overflow: hidden;
width: calc(20% - 0px);
height: calc(100% - 0px);
padding: 0 0 0 1.5%;
float: left;
font-family: HelveticaNeue-Bold, sans-serif;
text-overflow: ellipsis;
white-space: nowrap;
}

.text_overflow {
display: table-cell;
overflow: hidden;
max-width: 0;
text-overflow: ellipsis;
vertical-align: middle;
white-space: nowrap;
}

.theme {
display: table;
overflow: hidden;
width: calc(35% - 0px);
height: calc(100% - 0px);
padding: 0 2%;
float: left;
font-family: HelveticaNeue-Bold, sans-serif;
text-overflow: ellipsis;
white-space: nowrap;
}

.data {
display: table;
overflow: hidden;
width: 15%;
height: calc(100% - 0px);
padding: 0 2%;
float: right;
font-family: HelveticaNeue-Bold, sans-serif;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
}

.footer {
position: relative;
bottom: 0;
left: 0;

height: 3.125%;
padding-right: 2%;

border-top: 1px solid #e2e2e2;
}

.link {
padding: 0 2%;
color: #9b9b9b;
cursor: pointer;
float: right;
font-family: HelveticaNeue, sans-serif;
}
18 changes: 5 additions & 13 deletions src/app/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,15 @@ import React, { Component } from 'react';

import './app.css';

import Header from './header';
import Content from './content';

export class App extends Component {
render() {
return (
<div className="app">
<header className="app-header">
<p>
Edit <code>src/app/app.jsx</code> and save to reload.
</p>
<a
className="app-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
<Header />
<Content />
</div>
);
}
Expand Down
47 changes: 47 additions & 0 deletions src/app/content.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React, { Component } from 'react';

import './app.css';

import Main from './main';

class Content extends Component {
constructor(props) {
super(props);
this.state = { inputActive: false };
}

showLetters = () => {
this.setState({ inputActive: true });
};

clickHandlerLetter = () => {
this.setState({ inputActive: false });
}

render() {
return (
<div className="content">
<div className="menu">
<div className="menu__button_write">Написать</div>
<div className="options">
<div className="option" onClick={this.showLetters}>
<div className="text option__input">Входящие</div>
</div>
<div className="option">
<div className="text option__sended">Отправленные</div>
</div>
<div className="option">
<div className="text option__removed">Удалённые</div>
</div>
<div className="option options__spam">Спам</div>
<div className="option options__">Черновики</div>
<div className="option options__createdir">Создать папку</div>
</div>
</div>
<Main inputActive={this.state.inputActive} onClickLetter={() => this.clickHandlerLetter()} />

Choose a reason for hiding this comment

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

Будет всегда перерендериваться

</div>
);
}
}

export default Content;
13 changes: 13 additions & 0 deletions src/app/fullLetter.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React, { Component } from 'react';

import './app.css';

class FullLetter extends Component {
render() {
return(
<div>{this.props.text}</div>

Choose a reason for hiding this comment

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

Приделать кнопочку)

)
}
}

export default FullLetter;
Loading