Skip to content

Commit

Permalink
Update logo
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbarbara committed Jul 12, 2019
1 parent deae69a commit 9f1c03e
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 46 deletions.
Binary file added assets/media/brand/react-redux-saga.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions assets/media/brand/react-redux-saga.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/Background.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components';

const Background = styled.div`
background: #000 linear-gradient(to bottom, #00b4d5 0%, #002529 100%) fixed;
background: #000 linear-gradient(to bottom, #00657e 0%, #002529 100%) fixed;
color: #fff;
min-height: 100vh;
overflow: hidden;
Expand All @@ -16,7 +16,7 @@ const Background = styled.div`
position: absolute;
right: 0;
top: 0;
transform: rotate(-20deg) scale(1.5) translate(0, 43%);
transform: rotate(-20deg) scale(2) translate(0, 45%);
}
`;

Expand Down
9 changes: 4 additions & 5 deletions src/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import rgba from 'polished/lib/color/rgba';
import { appColor, headerHeight } from 'modules/theme';

import { logOut } from 'actions';
Expand All @@ -13,7 +12,7 @@ import Logo from 'components/Logo';
const { responsive, spacer } = utils;

const HeaderWrapper = styled.header`
background-color: ${rgba(appColor, 0.9)};
background-color: #113740;
height: ${headerHeight}px;
left: 0;
position: fixed;
Expand Down Expand Up @@ -44,15 +43,15 @@ const HeaderContainer = styled(Container)`

const Logout = styled.button`
align-items: center;
color: #333;
color: #fff;
display: flex;
font-size: 1.3rem;
padding: ${spacer(2)};
${responsive({ lg: 'font-size: 1.6rem;' })}; /* stylelint-disable-line */
&.active {
color: #000;
color: #fff;
}
span {
Expand All @@ -77,7 +76,7 @@ export default class Header extends React.PureComponent {
return (
<HeaderWrapper>
<HeaderContainer>
<Logo />
<Logo type="logo" />
<Logout onClick={this.handleClickLogout}>
<span>logout</span>
<Icon name="sign-out" width={16} />
Expand Down
20 changes: 12 additions & 8 deletions src/components/Logo.jsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';

import { ReactComponent as Icon } from 'assets/media/brand/icon.svg';
import { ReactComponent as RRS } from 'assets/media/brand/react-redux-saga.svg';

export const Logo = styled.div`
export const Wrapper = styled.div`
align-items: flex-start;
display: inline-flex;
font-size: 0;
svg {
height: auto;
height: 4.2rem;
max-height: 100%;
width: 4.8rem;
width: auto;
}
`;

export default () => (
<Logo>
<Icon />
</Logo>
);
const Logo = ({ type = 'icon' }) => <Wrapper>{type === 'icon' ? <Icon /> : <RRS />}</Wrapper>;

Logo.propTypes = {
type: PropTypes.string,
};

export default Logo;
12 changes: 9 additions & 3 deletions src/routes/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ const Header = styled.div`
text-align: center;
svg {
width: 20rem;
height: 10rem;
width: auto;
${/* sc-custom '@media-query' */ utils.responsive({
lg: `
height: 15rem;
`,
})};
}
`;

Expand All @@ -43,7 +50,6 @@ const Heading = styled.h1`
font-size: 4rem;
`,
})};
/* stylelint-enable */
`;

export class Home extends React.PureComponent {
Expand All @@ -65,7 +71,7 @@ export class Home extends React.PureComponent {
<Background key="Home" data-testid="HomeWrapper">
<HomeContainer verticalPadding>
<Header>
<Logo />
<Logo type="logo" />
</Header>
<Heading>{config.name}</Heading>
<Button
Expand Down
8 changes: 4 additions & 4 deletions test/components/__snapshots__/Background.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`Background should render properly 1`] = `
.c0 {
background: #000 linear-gradient(to bottom,#00b4d5 0%,#002529 100%) fixed;
background: #000 linear-gradient(to bottom,#00657e 0%,#002529 100%) fixed;
color: #fff;
min-height: 100vh;
overflow: hidden;
Expand All @@ -18,9 +18,9 @@ exports[`Background should render properly 1`] = `
position: absolute;
right: 0;
top: 0;
-webkit-transform: rotate(-20deg) scale(1.5) translate(0,43%);
-ms-transform: rotate(-20deg) scale(1.5) translate(0,43%);
transform: rotate(-20deg) scale(1.5) translate(0,43%);
-webkit-transform: rotate(-20deg) scale(2) translate(0,45%);
-ms-transform: rotate(-20deg) scale(2) translate(0,45%);
transform: rotate(-20deg) scale(2) translate(0,45%);
}
<Background>
Expand Down
14 changes: 7 additions & 7 deletions test/components/__snapshots__/Header.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ exports[`Header should render properly 1`] = `
}
.c2 svg {
height: auto;
height: 4.2rem;
max-height: 100%;
width: 4.8rem;
width: auto;
}
.c0 {
background-color: rgba(0,180,213,0.9);
background-color: #113740;
height: 70px;
left: 0;
position: fixed;
Expand Down Expand Up @@ -84,7 +84,7 @@ exports[`Header should render properly 1`] = `
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
color: #333;
color: #fff;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
Expand All @@ -94,7 +94,7 @@ exports[`Header should render properly 1`] = `
}
.c3.active {
color: #000;
color: #fff;
}
.c3 span {
Expand Down Expand Up @@ -126,13 +126,13 @@ exports[`Header should render properly 1`] = `
<div
className="c1"
>
<Logo>
<Wrapper>
<div
className="c2"
>
SVG
</div>
</Logo>
</Wrapper>
<Logout
onClick={[Function]}
>
Expand Down
8 changes: 4 additions & 4 deletions test/components/__snapshots__/Logo.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ exports[`Logo should render properly 1`] = `
}
.c0 svg {
height: auto;
height: 4.2rem;
max-height: 100%;
width: 4.8rem;
width: auto;
}
<Logo>
<Wrapper>
<div
className="c0"
>
SVG
</div>
</Logo>
</Wrapper>
`;
Loading

0 comments on commit 9f1c03e

Please sign in to comment.