Cleaned code

This commit is contained in:
2018-06-27 12:39:30 +10:00
parent 345b1557dd
commit a7e546ea64

View File

@ -41,10 +41,12 @@ import Window95, {
const ExistingWorkFrame = (props) => {
let fakeURL = props.href;
if(!fakeURL.startsWith("http")) {
fakeURL = "https:" + fakeURL;
fakeURL = window.location.protocol + fakeURL;
}
return (
<ElementScrollFader from={props.from}>
<SplitSection align="center">
<Split padded>
<ElementScrollFader from={props.fromLeft}>
<Window95>
<TitleBar buttons={[
<Minimize key="Minimize" disabled />,
@ -70,9 +72,22 @@ const ExistingWorkFrame = (props) => {
</Frame>
</Window95>
</ElementScrollFader>
</Split>
<Split padded>
<ElementScrollFader from={ props.fromRight }>
<ContentBox box>
<Heading1>{ props.title }</Heading1>
{ props.description }
</ContentBox>
</ElementScrollFader>
</Split>
</SplitSection>
);
};
export default (props) => {
return (
<Section className="p-about-page__promo p-about-page__promo-work">
@ -94,27 +109,14 @@ export default (props) => {
<PageBoundary>
{/* KOPA */}
<SplitSection align="center">
<Split padded>
<ExistingWorkFrame
title="KOPA Life"
href="//www.kopalife.com/product/kube-customise"
from="top"
fromLeft="top"
fromRight="bottom"
src={ require('./../../../images/work-showcase/kopalife.png') }
title={ Language.get("pages.about.work.kopa.heading") }
description={ Language.get("pages.about.work.kopa.description") }
/>
</Split>
<Split padded>
<ElementScrollFader from="bottom">
<ContentBox box>
<Heading1>{ Language.get("pages.about.work.kopa.heading") }</Heading1>
{ Language.get("pages.about.work.kopa.description") }
</ContentBox>
</ElementScrollFader>
</Split>
</SplitSection>
</PageBoundary>
</Section>
);