Further improved minimization of Language and fixed an overflow-x bug

This commit is contained in:
2018-10-29 05:39:28 +11:00
parent 29f82b9709
commit c884efb837
11 changed files with 84 additions and 61 deletions

View File

@ -22,7 +22,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import React from 'react';
import Language from '@public/language/Language';
import { withLanguage } from '@public/language/Language';
import { PageBoundary } from '@components/page/Page';
import { ImageSection } from '@components/section/Section';
import FloatingContentBox from '@objects/content/box/FloatingContentBox';
@ -30,7 +30,9 @@ import { Title, Subtitle } from '@objects/typography/Typography';
import ElementScrollFader from '@objects/animation/fade/ElementScrollFader';
export default (props) => {
export default withLanguage(props => {
let { lang } = props;
return (
<ImageSection
className="p-home-page__banner"
@ -43,11 +45,11 @@ export default (props) => {
<PageBoundary full>
<FloatingContentBox position="middle center" size="large" className="u-text-center">
<ElementScrollFader from="bottom" >
<Title>{ Language.get("pages.home.banner.title") }</Title>
<Subtitle className="u-responsive--small-up">{ Language.get("pages.home.banner.subtitle") }</Subtitle>
<Title>{ lang.pages.home.banner.title }</Title>
<Subtitle className="u-responsive--small-up">{ lang.pages.home.banner.subtitle }</Subtitle>
</ElementScrollFader>
</FloatingContentBox>
</PageBoundary>
</ImageSection>
);
}
});