feat(ott-36): login page

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
mirlan.maksitaliev 6 years ago
parent 556669f303
commit 8fbcefcf10
  1. BIN
      public/images/Checker.png
  2. 10
      public/images/logo.svg
  3. 5
      src/features/App/index.tsx
  4. 15
      src/features/Background/index.tsx
  5. 25
      src/features/Background/styled.tsx
  6. 50
      src/features/Login/index.tsx
  7. 37
      src/features/Login/styled.tsx
  8. 15
      src/features/Logo/index.tsx

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="174" height="40" viewBox="0 0 174 40" fill="none">
<path d="M173.496 4.56953C173.496 5.88584 173.04 6.98276 172.014 7.8603C171.102 8.73784 169.848 9.1766 168.481 9.1766C167.797 9.1766 167.113 9.06691 166.543 8.84753C165.973 8.62814 165.403 8.29907 164.947 7.8603C164.491 7.42153 164.149 6.98276 163.921 6.4343C163.693 5.88584 163.465 5.22768 163.465 4.56953C163.465 3.91137 163.579 3.36291 163.921 2.81445C164.149 2.26599 164.605 1.71753 164.947 1.38845C165.403 0.949682 165.973 0.620605 166.543 0.401221C167.113 0.181836 167.797 0.0721436 168.481 0.0721436C169.848 0.0721436 171.102 0.510913 172.014 1.38845C173.04 2.1563 173.496 3.25322 173.496 4.56953Z" fill="#999999" />
<path d="M10.6013 39.1227C10.4873 39.342 10.0313 39.342 9.46138 39.342H1.36791C0.45597 39.342 0 38.9033 0 38.1354V1.82727C0 1.05942 0.45597 0.730347 1.36791 0.730347H9.57537C10.2593 0.730347 10.6013 0.840039 10.7153 0.949731C10.8293 1.05942 10.8293 1.3885 10.8293 1.82727V38.1354C10.8293 38.5742 10.8293 38.9033 10.6013 39.1227Z" fill="#999999" />
<path d="M30.2077 17.5131C29.8657 17.5131 29.4097 17.5131 28.7258 17.5131C28.1558 17.5131 27.5859 17.6228 27.0159 17.7325V38.2449C27.0159 38.6837 26.9019 39.0128 26.7879 39.1225C26.6739 39.2322 26.218 39.3419 25.648 39.3419H18.0105C17.0985 39.3419 16.6426 39.0128 16.6426 38.2449V14.5514C16.6426 13.3448 16.8706 12.4672 17.2125 11.6994C17.5545 10.9315 18.4665 10.4928 19.8344 10.1637C20.1763 10.054 20.7463 10.054 21.5443 9.94431C22.3422 9.83462 23.1402 9.72493 24.0521 9.72493C24.964 9.72493 25.876 9.61523 26.7879 9.61523C27.6999 9.61523 28.4978 9.61523 29.1818 9.61523C31.9176 9.61523 34.4254 9.83462 36.5913 10.3831C38.7571 10.9315 40.467 11.6994 41.8349 12.906C43.2028 14.1126 44.2288 15.5386 45.0267 17.4034C45.7107 19.2682 46.0527 21.5717 46.0527 24.2043V38.3546C46.0527 38.7934 45.9387 39.1225 45.8247 39.2322C45.7107 39.3419 45.2547 39.4515 44.6847 39.4515H36.9333C36.0213 39.4515 35.5653 39.1225 35.5653 38.3546V23.1074C35.5653 21.2426 35.2234 19.8166 34.4254 18.8294C33.7415 17.9519 32.3735 17.5131 30.2077 17.5131Z" fill="#999999" />
<path d="M50.8406 13.5642C50.6126 12.0285 50.7266 10.4928 51.1825 8.95713C51.6385 7.42144 52.3225 6.10513 53.3484 4.89851C54.3743 3.6919 55.7422 2.70467 57.5661 1.82713C59.39 0.94959 61.4419 0.401129 63.9497 0.181744C66.2295 -0.0376405 68.6234 -0.0376405 71.1312 0.0720519C73.5251 0.291437 75.5769 0.730206 77.4008 1.38836C78.0848 1.60774 78.4268 1.82713 78.5407 2.15621C78.6547 2.37559 78.5407 2.92405 78.3128 3.6919L77.2868 8.40867C77.0588 9.17651 76.8309 9.61528 76.6029 9.72498C76.3749 9.83467 75.9189 9.83467 75.235 9.61528C73.5251 9.3959 71.8152 9.17652 70.1053 9.06682C68.3954 9.06682 66.6855 9.06682 65.2036 9.17651C63.8357 9.28621 63.0378 9.61528 62.5818 9.94436C62.1258 10.3831 62.0118 10.8219 62.1258 11.3704C62.1258 11.5897 62.2398 11.8091 62.3538 12.0285C62.4678 12.2479 62.6958 12.4673 63.0378 12.6867C63.3797 12.9061 63.8357 13.1254 64.4057 13.4545C64.9756 13.6739 65.7736 13.8933 66.7995 14.1127C69.1934 14.7708 71.3592 15.3193 73.2971 15.9774C75.235 16.6356 76.8309 17.4034 78.1988 18.281C79.5667 19.1585 80.7066 20.2554 81.5045 21.5717C82.3025 22.7784 82.8725 24.4237 83.1004 26.1788C83.5564 30.1277 82.5305 33.1991 80.0226 35.5027C77.5148 37.6965 73.8671 39.1225 68.8514 39.671C66.2296 39.8904 63.4937 40.0001 60.6439 39.7807C57.7941 39.5613 55.0583 38.9031 52.6644 37.8062C52.2085 37.5868 51.9805 37.3674 51.9805 37.1481C51.8665 36.9287 51.9805 36.4899 52.0945 35.9414L53.8044 30.4568C54.0323 29.7987 54.2603 29.4696 54.4883 29.3599C54.7163 29.2502 55.1723 29.2502 55.7422 29.4696C56.3122 29.689 57.1101 29.7987 58.0221 29.9084C58.934 30.1277 59.96 30.2374 60.9859 30.3471C62.0118 30.4568 63.1518 30.5665 64.2917 30.5665C65.4316 30.5665 66.5715 30.5665 67.5975 30.4568C68.5094 30.3471 69.1934 30.2374 69.7633 30.0181C70.2193 29.7987 70.6753 29.5793 70.9032 29.2502C71.1312 29.0308 71.3592 28.7017 71.3592 28.3727C71.3592 28.0436 71.4732 27.8242 71.3592 27.6048C71.3592 27.2757 71.2452 27.0564 71.1312 26.7273C71.0172 26.3982 70.7892 26.1788 70.4473 25.9594C70.1053 25.7401 69.6493 25.5207 68.9654 25.1916C68.2814 24.9722 67.4835 24.6431 66.4575 24.4237C64.4057 23.985 62.4678 23.4365 60.6439 22.7784C58.82 22.2299 57.2241 21.4621 55.8562 20.6942C54.4883 19.9264 53.3484 18.8294 52.5504 17.7325C51.6385 16.6356 51.0685 15.2096 50.8406 13.5642Z" fill="#999999" />
<path d="M106.127 38.3546C106.127 38.574 105.899 38.6836 105.443 38.7933C103.847 39.2321 102.251 39.5612 100.769 39.6709C99.2873 39.7806 97.8054 39.8903 96.5515 39.8903C93.0177 39.8903 90.5098 39.1224 89.0279 37.6964C87.4321 36.2704 86.7481 34.296 86.7481 31.773V17.513H82.7584C82.3024 17.513 81.9604 17.4033 81.9604 17.184C81.8464 16.9646 81.7324 16.6355 81.7324 16.4161V12.4672C81.7324 12.1381 81.7324 11.809 81.8464 11.6993C81.9604 11.5896 82.1884 11.48 82.6444 11.3703L86.6341 10.2733V5.22749C86.6341 4.67903 86.7481 4.34996 86.9761 4.13057C87.2041 3.91119 87.546 3.80149 88.002 3.6918L95.6395 1.49796C96.0955 1.38826 96.4375 1.38826 96.6655 1.60765C96.7794 1.60765 96.8934 1.93672 96.8934 2.48519V10.383H103.277C103.733 10.383 104.075 10.4927 104.075 10.6024C104.075 10.7121 104.189 11.0412 104.189 11.3703V16.3064C104.189 16.7452 104.189 16.9646 104.189 17.184C104.189 17.4033 103.847 17.4033 103.391 17.4033H96.8934V29.0307C96.8934 29.9083 97.1214 30.5664 97.6914 30.8955C98.2613 31.2246 98.9453 31.444 100.085 31.444C100.655 31.444 101.453 31.444 102.365 31.3343C103.277 31.2246 103.961 31.1149 104.417 31.1149C104.759 31.1149 104.987 31.1149 105.101 31.1149C105.215 31.2246 105.329 31.3343 105.329 31.6633L106.127 37.6964C106.127 38.0255 106.127 38.2449 106.127 38.3546Z" fill="#999999" />
<path d="M135.766 35.2833C135.766 35.8318 135.766 36.2705 135.538 36.5996C135.31 36.9287 134.968 37.3675 134.284 37.6965C133.372 38.1353 132.46 38.4644 131.434 38.6838C130.408 39.0128 129.268 39.2322 128.242 39.4516C127.102 39.671 125.962 39.7807 124.823 39.8904C123.683 40.0001 122.657 40.0001 121.631 40.0001C119.009 40.0001 116.729 39.7807 115.019 39.3419C113.195 38.9032 111.827 38.245 110.687 37.3675C109.662 36.5996 108.864 35.5027 108.408 34.4058C107.952 33.3088 107.724 31.9925 107.724 30.6762C107.724 27.3855 108.75 24.9722 110.915 23.3268C113.081 21.6815 115.817 20.8039 119.351 20.8039H125.62V20.0361C125.62 19.8167 125.62 19.4876 125.506 19.1585C125.392 18.8295 125.278 18.5004 124.937 18.1713C124.709 17.8422 124.253 17.6228 123.683 17.4035C123.113 17.1841 122.429 17.1841 121.631 17.1841C121.061 17.1841 120.491 17.1841 119.807 17.2938C119.123 17.2938 118.439 17.4035 117.641 17.5132C116.843 17.6228 116.159 17.7325 115.361 17.7325C114.563 17.8422 113.879 17.9519 113.309 18.1713C112.739 18.281 112.397 18.281 112.283 18.1713C112.055 18.0616 111.941 17.7325 111.827 17.4035L110.801 12.6867C110.687 12.1382 110.687 11.8092 110.801 11.6995C110.915 11.5898 111.143 11.3704 111.485 11.2607C113.309 10.7122 115.133 10.2735 117.071 9.94439C119.009 9.725 120.947 9.50562 123.113 9.50562C127.444 9.50562 130.75 10.3832 132.802 12.0285C134.854 13.6739 135.994 16.3065 135.994 19.9264L135.766 35.2833ZM125.506 26.7273H122.087C121.631 26.7273 121.289 26.7273 120.833 26.837C120.377 26.9467 120.035 27.0564 119.693 27.2758C119.351 27.4952 119.009 27.8242 118.895 28.1533C118.667 28.5921 118.553 29.0308 118.553 29.689C118.553 30.5665 118.895 31.2247 119.579 31.6635C120.263 32.1022 121.175 32.3216 122.201 32.3216C122.429 32.3216 122.999 32.3216 123.683 32.2119C124.367 32.1022 125.05 31.9925 125.506 31.7732V26.7273Z" fill="#999999" />
<path d="M161.299 38.3546C161.299 38.574 161.071 38.6836 160.615 38.7933C159.019 39.2321 157.423 39.5612 155.941 39.6709C154.459 39.7806 152.977 39.8903 151.723 39.8903C148.19 39.8903 145.682 39.1224 144.2 37.6964C142.604 36.2704 141.92 34.296 141.92 31.773V17.513H137.93C137.474 17.513 137.132 17.4033 137.132 17.184C137.018 16.9646 136.904 16.6355 136.904 16.4161V12.4672C136.904 12.1381 136.904 11.809 137.018 11.6993C137.132 11.5896 137.36 11.48 137.816 11.3703L141.92 10.383V5.22749C141.92 4.67903 142.034 4.34996 142.262 4.13057C142.49 3.91119 142.832 3.80149 143.288 3.6918L150.925 1.49796C151.381 1.38826 151.723 1.38826 151.951 1.60765C152.179 1.82703 152.293 2.04642 152.293 2.59488V10.4927H158.677C159.133 10.4927 159.475 10.6024 159.475 10.7121C159.475 10.8218 159.589 11.1509 159.589 11.48V16.4161C159.589 16.8549 159.589 17.0743 159.589 17.2936C159.589 17.513 159.247 17.513 158.791 17.513H152.407V29.1404C152.407 30.018 152.635 30.6761 153.205 31.0052C153.661 31.3343 154.459 31.5536 155.599 31.5536C156.169 31.5536 156.967 31.5536 157.879 31.444C158.791 31.3343 159.475 31.2246 159.931 31.2246C160.273 31.2246 160.501 31.2246 160.615 31.2246C160.729 31.3343 160.843 31.444 160.843 31.773L161.641 37.8061C161.299 38.0255 161.299 38.2449 161.299 38.3546Z" fill="#999999" />
</svg>

After

Width:  |  Height:  |  Size: 8.7 KiB

@ -1,9 +1,12 @@
import React from 'react'
import { Theme } from 'features/Theme'
import { Login } from 'features/Login'
import { GlobalStyles } from 'features/GlobalStyles'
export const App = () => (
<Theme>
Instat TV
<GlobalStyles />
<Login />
</Theme>
)

@ -0,0 +1,15 @@
import React, { ReactNode } from 'react'
import { GradientBackground, ImageBackground } from './styled'
type TBackground = {
children: ReactNode,
}
export const Background = ({ children }: TBackground) => (
<ImageBackground>
<GradientBackground>
{children}
</GradientBackground>
</ImageBackground>
)

@ -0,0 +1,25 @@
import styled from 'styled-components/macro'
const Container = styled.div`
width: 100vw;
height: 100vh;
`
export const ImageBackground = styled(Container)`
background-image: url(/images/Checker.png);
background-size: 12px;
`
export const GradientBackground = styled(Container)`
position: relative;
display: flex;
justify-content: center;
background: ${({ theme: { colors } }) => colors.background};
`
export const CenterBlock = styled.div`
display: flex;
flex-direction: column;
align-items: center;
margin-top: 140px;
`

@ -1,7 +1,51 @@
import React from 'react'
import { Background } from 'features/Background'
import { Logo } from 'features/Logo'
import {
Input,
ButtonSolid,
ButtonOutline,
} from 'features/Common'
import {
BlockTitle,
CenterBlock,
ButtonsBlock,
Form,
} from './styled'
const labelWidth = 60
export const Login = () => (
<div>
Login page
</div>
<Background>
<CenterBlock>
<Logo />
<Form>
<BlockTitle>Авторизация</BlockTitle>
<Input
required
id='email'
type='email'
label='Логин'
labelWidth={labelWidth}
/>
<Input
required
id='password'
type='password'
label='Пароль'
labelWidth={labelWidth}
/>
<ButtonsBlock>
<ButtonSolid>Войти</ButtonSolid>
<ButtonOutline type='button'>
Зарегистрироваться
</ButtonOutline>
</ButtonsBlock>
</Form>
</CenterBlock>
</Background>
)

@ -0,0 +1,37 @@
import styled from 'styled-components/macro'
export const CenterBlock = styled.div`
display: flex;
flex-direction: column;
align-items: center;
margin-top: 140px;
`
export const Form = styled.form`
width: 544px;
margin-top: 80px;
display: flex;
flex-direction: column;
align-items: center;
`
export const BlockTitle = styled.span`
display: block;
font-style: normal;
font-weight: bold;
font-size: 36px;
line-height: 24px;
color: ${({ theme: { colors } }) => colors.text};
margin-bottom: 20px;
transition: color 0.3s ease-in-out;
`
export const ButtonsBlock = styled.div`
display: flex;
flex-direction: column;
margin-top: 60px;
& > * {
margin-bottom: 40px;
}
`

@ -0,0 +1,15 @@
import styled from 'styled-components/macro'
type TLogo = {
height?: number,
width?: number,
}
export const Logo = styled.div<TLogo>`
display: block;
width: ${({ width = 174 }) => width}px;
height: ${({ height = 40 }) => height}px;
background-size: contain;
background-repeat: no-repeat;
background-image: url(/images/logo.svg);
`
Loading…
Cancel
Save