diff options
Diffstat (limited to 'web-ui/src/login/about')
-rw-r--r-- | web-ui/src/login/about/welcome.js | 36 | ||||
-rw-r--r-- | web-ui/src/login/about/welcome.scss | 49 | ||||
-rw-r--r-- | web-ui/src/login/about/welcome.spec.js | 17 |
3 files changed, 102 insertions, 0 deletions
diff --git a/web-ui/src/login/about/welcome.js b/web-ui/src/login/about/welcome.js new file mode 100644 index 00000000..93aae8e1 --- /dev/null +++ b/web-ui/src/login/about/welcome.js @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2017 ThoughtWorks, Inc. + * + * Pixelated is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pixelated is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. + */ + +import React from 'react'; +import { translate } from 'react-i18next'; + +import './welcome.scss'; + +export const Welcome = ({ t }) => ( + <div className='welcome'> + <img className='welcome-logo' src='/public/images/welcome.svg' alt={t('login.welcome-image-alt')} /> + <div> + <h3>{t('login.welcome-message')}</h3> + </div> + </div> +); + +Welcome.propTypes = { + t: React.PropTypes.func.isRequired +}; + +export default translate('', { wait: true })(Welcome); diff --git a/web-ui/src/login/about/welcome.scss b/web-ui/src/login/about/welcome.scss new file mode 100644 index 00000000..1492b154 --- /dev/null +++ b/web-ui/src/login/about/welcome.scss @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2017 ThoughtWorks, Inc. + * + * Pixelated is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Pixelated is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. + */ + +@import "~scss/base/colors"; + +.welcome { + display: none; +} + +@media only screen and (min-width : 960px) { + .welcome { + font-size: 0.9em; + color: $medium_grey; + display: flex; + font-weight: 300; + flex-direction: column; + align-self: flex-end; + order: 2; + width: 34%; + margin-right: 8%; + margin-top: -20.5em; + + h3 { + font-weight: normal; + font-size: 1.2em; + margin-top: 0; + } + } + + .welcome-logo { + order: 1; + width: 90%; + height: 15em; + } +} diff --git a/web-ui/src/login/about/welcome.spec.js b/web-ui/src/login/about/welcome.spec.js new file mode 100644 index 00000000..3e190c0c --- /dev/null +++ b/web-ui/src/login/about/welcome.spec.js @@ -0,0 +1,17 @@ +import { shallow } from 'enzyme'; +import expect from 'expect'; +import React from 'react'; +import { Welcome } from 'src/login/about/welcome'; + +describe('Welcome', () => { + let welcome; + const mockTranslations = key => key; + + beforeEach(() => { + welcome = shallow(<Welcome t={mockTranslations} />); + }); + + it('renders welcome component', () => { + expect(welcome.find('.welcome').length).toEqual(1); + }); +}); |