From bc922deb23a72d6ca1bf4c39efd1d7366baa9a84 Mon Sep 17 00:00:00 2001 From: Tayane Fernandes Date: Tue, 7 Feb 2017 17:39:09 -0200 Subject: [#922] Refactoring react folder structure with @anikarni --- web-ui/src/account_recovery/account_recovery.html | 12 ++ web-ui/src/account_recovery/account_recovery.js | 18 +++ web-ui/src/account_recovery/page.js | 28 ++++ web-ui/src/account_recovery/page.scss | 176 ++++++++++++++++++++++ 4 files changed, 234 insertions(+) create mode 100644 web-ui/src/account_recovery/account_recovery.html create mode 100644 web-ui/src/account_recovery/account_recovery.js create mode 100644 web-ui/src/account_recovery/page.js create mode 100644 web-ui/src/account_recovery/page.scss (limited to 'web-ui/src/account_recovery') diff --git a/web-ui/src/account_recovery/account_recovery.html b/web-ui/src/account_recovery/account_recovery.html new file mode 100644 index 00000000..bd451ebc --- /dev/null +++ b/web-ui/src/account_recovery/account_recovery.html @@ -0,0 +1,12 @@ + + + + + + Pixelated Account Recovery + + +
+ + + diff --git a/web-ui/src/account_recovery/account_recovery.js b/web-ui/src/account_recovery/account_recovery.js new file mode 100644 index 00000000..f2421bfc --- /dev/null +++ b/web-ui/src/account_recovery/account_recovery.js @@ -0,0 +1,18 @@ +import React from 'react' +import { render } from 'react-dom' +import a11y from 'react-a11y' +import { I18nextProvider } from 'react-i18next' + +import Page from './page' +import i18n from '../i18n' + +import 'font-awesome/scss/font-awesome.scss' + +if(process.env.NODE_ENV === 'development') a11y(React); + +render( + + + , + document.getElementById('root') +); diff --git a/web-ui/src/account_recovery/page.js b/web-ui/src/account_recovery/page.js new file mode 100644 index 00000000..a02d307c --- /dev/null +++ b/web-ui/src/account_recovery/page.js @@ -0,0 +1,28 @@ +import React from 'react' +import { translate } from 'react-i18next' + +import './page.scss' + +export const Page = ({ t }) => ( +
+ {t('backup-account.image-description')}/ +
+

{t('backup-account.title')}

+

{t('backup-account.paragraph1')}

+

{t('backup-account.paragraph2')}

+
+ + +
+ +
+ + + {t('back-to-inbox')} + +
+
+
+) + +export default translate('', { wait: true })(Page) diff --git a/web-ui/src/account_recovery/page.scss b/web-ui/src/account_recovery/page.scss new file mode 100644 index 00000000..e7b1504e --- /dev/null +++ b/web-ui/src/account_recovery/page.scss @@ -0,0 +1,176 @@ +@import "~scss/vendor/reset"; +@import "~scss/base/colors"; +@import "~scss/base/fonts"; + +html { + min-height: 100%; +} + +body { + font-family: "Open Sans", "Microsoft YaHei", "Hiragino Sans GB", "Hiragino Sans GB W3", "微软雅黑", "Helvetica Neue", Arial, sans-serif; + background: $dark_blue; /* For browsers that do not support gradients */ + background: -webkit-linear-gradient(left top, $dark_blue, $middle_blue); /* For Safari 5.1 to 6.0 */ + background: -o-linear-gradient(bottom right, $dark_blue, $middle_blue); /* For Opera 11.1 to 12.0 */ + background: -moz-linear-gradient(bottom right, $dark_blue, $middle_blue); /* For Firefox 3.6 to 15 */ + background: linear-gradient(to bottom right, $dark_blue, $middle_blue); /* Standard syntax */ + color: $dark_grey_text; + min-height: 100%; +} + +h1 { + font-size: 1.3em; + font-weight: 600; +} + +p { + -webkit-margin-before: 0.5em; + -webkit-margin-after: 0.5em; + margin-before: 0.5em; + margin-after: 0.5em; +} + +a { + text-decoration: none; + color: $dark_blue; + font-style: italic; + + .fa { + font-size: 1.6em; + position: relative; + top: 3px; + margin-right: 0.3em; + } + +} + +.field-group { + position:relative; + margin: 1.5em 0; + width: 100%; + + label { + font-size: 0.9em; + margin-bottom: 10px; + display: inline-block; + } + + input { + display: block; + border: none; + border-bottom: solid 1px #4da3b6; + width: 100%; + height: auto; + padding: 0.3em 0px; + } + + input:focus { + outline:none; + border-width: 2px; + } + + input:focus ~ .animated-label, input:valid ~ .animated-label { + top:-12px; + left: 0; + font-size:0.7em; + color:#4da3b6; + } + + .animated-label { + color:#999; + position:absolute; + pointer-events:none; + left: 6px; + top:10px; + transition:0.2s ease all; + -moz-transition:0.2s ease all; + -webkit-transition:0.2s ease all; + } +} + + +button { + background: $dark_blue; + padding: 0.8em; + color: $white; + text-align: center; + border: none; + border-radius: 2px; + font-weight: 300; + width: 100%; + margin-bottom: 1em; +} + +.container { + background: $white; + width: 84%; + // margin: 3% auto; + padding: 6% 5%; + + -webkit-display: flex; + display: flex; + -webkit-align-items: flex-start; + align-items: flex-start; + -webkit-flex-direction: column; + flex-direction: column; +} + +img { + width: 50%; + -webkit-align-self: center; + align-self: center; +} + +@media only screen and (min-width : 500px) { + body { + font-size: 1.3em; + } + + form { + display: flex; + -webkit-display: flex; + -webkit-flex-direction: column; + flex-direction: column; + + .field-group, button, div { + flex-basis: 70%; + -webkit-align-self: center; + align-self: center; + } + } +} + +@media only screen and (min-width : 960px) { + .container{ + width: 60%; + padding: 3%; + -webkit-align-items: flex-start; + align-items: flex-start; + -webkit-flex-direction: row; + flex-direction: row; + max-width: 700px; + } + + form { + margin-left: 2.5em; + + .field-group, button, div { + width: 300px; + -webkit-align-self: flex-start; + align-self: flex-start; + } + + .field-group { + margin-top: 3em; + font-size: 1em; + } + } + + img { + width: 300px; + } + + button { + font-size: 0.8em; + margin-bottom: 1em; + } +} -- cgit v1.2.3