diff --git a/src/client/Layout/Auth.jsx b/src/client/Layout/Auth.jsx new file mode 100644 index 0000000..25a31c6 --- /dev/null +++ b/src/client/Layout/Auth.jsx @@ -0,0 +1,49 @@ +import React from 'react'; +import Cookies from 'js-cookie'; +import styled from 'styled-components'; +import mq from 'client/UIKit/mq'; +import { Flex } from 'client/UIKit/grid'; + +const UserText = styled.span` + margin: 0; + padding: 0; + text-transform: uppercase; + color: white; + font-size: 0.5rem; + font-family: 'Montserrat'; + font-weight: 500; + ${mq.desktop` + font-size: 0.75rem; + `} +`; + +const User = () => { + const displayname = Cookies.get('displayname'); + return {displayname}; +}; + +const Logout = styled.a` + margin: 0; + padding: 0; + text-transform: uppercase; + color: white; + font-size: 0.45rem; + font-family: 'Montserrat'; + font-weight: 500; + ${mq.desktop` + font-size: 0.55rem; + `} +`; + +export default () => { + return ( + + + Выход + + ); +}; diff --git a/src/client/Layout/Header.jsx b/src/client/Layout/Header.jsx index 8193aee..c90b4f9 100644 --- a/src/client/Layout/Header.jsx +++ b/src/client/Layout/Header.jsx @@ -4,30 +4,23 @@ import mq from 'client/UIKit/mq'; import React from 'react'; import styled from 'styled-components'; import Logo from './Logo'; +import Auth from './Auth'; const HeaderContent = styled(Flex)` + flex-direction: column; + justify-content: space-between; + align-items: flex-start; background: ${`linear-gradient(90deg, ${colors.primaryColor} 0%, ${colors.secondaryColor} 50%, ${colors.tertiaryColor} 100%)`}; - padding: 10px 12px; - ${mq.desktop` - padding-left: 20px; + padding: 10px 12px; + ${mq.desktop` + padding-left: 20px; + flex-direction: row; `} `; -const LogoText = styled.h3` - margin: 0; - text-transform: uppercase; - color: white; - font-size: 0.95rem; - font-family: 'Montserrat'; - font-weight: 500; - ${mq.desktop` - font-size: 1.2rem; -`} -`; - const Header = styled.header` position: sticky; top: 0; @@ -37,10 +30,8 @@ const Header = styled.header` export default () => (
- - - Лизинговый Калькулятор - + +
); diff --git a/src/client/Layout/Logo.jsx b/src/client/Layout/Logo.jsx index 9a554ed..29ce3e4 100644 --- a/src/client/Layout/Logo.jsx +++ b/src/client/Layout/Logo.jsx @@ -1,6 +1,7 @@ import mq from 'client/UIKit/mq'; import React from 'react'; import styled from 'styled-components'; +import { Flex } from 'client/UIKit/grid'; const LOGO_NAME = 'logo-1line-AL-white-h100-short.png'; @@ -12,6 +13,23 @@ const Image = styled.img` `} `; +const LogoText = styled.h3` + margin: 0; + margin-top: -3px; + text-transform: uppercase; + color: white; + font-size: 0.95rem; + font-family: 'Montserrat'; + font-weight: 500; + ${mq.desktop` + font-size: 1.2rem; + margin-top: -2px; +`} +`; + export default () => ( - logo + + logo + Лизинговый Калькулятор + );