Skip to content

Commit

Permalink
Merge pull request #19 from eatdrinkhealthy/here
Browse files Browse the repository at this point in the history
Here
  • Loading branch information
stevenjmarsh authored Jan 17, 2018
2 parents 555e9cf + f496ac3 commit b3f34c4
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 171 deletions.
8 changes: 0 additions & 8 deletions imports/ui/components/ComingSoon.js

This file was deleted.

13 changes: 7 additions & 6 deletions imports/ui/components/Preview.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from "react";
import {
appLinksHeaderStyle,
appLinksButtonsStyle,
} from "../styles";
import { appLinksButtonsStyle } from "../styles";
import LinkButton from "./LinkButton";

const Preview = () => (
<div>
<div className={appLinksHeaderStyle.className}>Early Version Preview...</div>
<div
style={{
position: "absolute",
bottom: 0,
}}
>
<div className={appLinksButtonsStyle.className}>
<LinkButton text="Web App" url="https://app.eatdrinkhealthy.co/" />
<LinkButton text="App Store" url="https://itunes.apple.com/app/id1116167404" />
Expand Down
24 changes: 0 additions & 24 deletions imports/ui/components/tests/ComingSoon.jest.js

This file was deleted.

30 changes: 0 additions & 30 deletions imports/ui/components/tests/__snapshots__/ComingSoon.jest.js.snap

This file was deleted.

23 changes: 8 additions & 15 deletions imports/ui/components/tests/__snapshots__/Preview.jest.js.snap
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<Preview /> matches render snapshot 1`] = `
<div>
<div
className="css-m58pgh"
>
Early Version Preview...
</div>
<div
style={
Object {
"bottom": 0,
"position": "absolute",
}
}
>
<div
className="css-lfdzya"
>
Expand All @@ -28,15 +30,6 @@ exports[`<Preview /> matches render snapshot 1`] = `

exports[`<Preview /> matches style / css snapshot 1`] = `
"[
{
\\"rules\\": {
\\"marginTop\\": \\"90px\\",
\\"marginLeft\\": \\"40px\\",
\\"fontSize\\": \\"16px\\",
\\"color\\": \\"white\\"
},
\\"className\\": \\"css-m58pgh\\"
},
{
\\"rules\\": {
\\"marginTop\\": \\"14px\\",
Expand Down
2 changes: 0 additions & 2 deletions imports/ui/pages/SplashPage.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import React from "react";
import CompanyName from "../components/CompanyName";
import Pitch from "../components/Pitch";
import ComingSoon from "../components/ComingSoon";
import Logo from "../components/Logo";
import Preview from "../components/Preview";

const SplashPage = () => (
<div>
<CompanyName />
<Pitch />
<ComingSoon />
<Logo />
<Preview />
</div>
Expand Down
13 changes: 3 additions & 10 deletions imports/ui/pages/tests/SplashPage.jest.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
/* eslint-env jest */
/* eslint-disable func-names, prefer-arrow-callback, no-unused-expressions */
/* eslint-disable import/no-extraneous-dependencies */

import React from "react";
import {
shallow,
} from "enzyme";
import { shallow } from "enzyme";
import renderer from "react-test-renderer";
import SplashPage from "../SplashPage";
import {
formattedJSON,
getAllComponentStyle,
} from "../../../utils/tests/testUtils";
import { formattedJSON, getAllComponentStyle } from "../../../utils/tests/testUtils";
import * as styles from "../../../ui/styles";

describe("<SplashPage />", function () {
Expand All @@ -25,11 +19,10 @@ describe("<SplashPage />", function () {
expect(formattedJSON(allStyle)).toMatchSnapshot();
});

it("contains sections company name, pitch, coming soon, logo, preview ", function () {
it("contains sections company name, pitch, logo, preview ", function () {
const wrapper = shallow(<SplashPage />);
expect(wrapper.find("CompanyName").length).toEqual(1);
expect(wrapper.find("Pitch").length).toEqual(1);
expect(wrapper.find("ComingSoon").length).toEqual(1);
expect(wrapper.find("Logo").length).toEqual(1);
});
});
44 changes: 8 additions & 36 deletions imports/ui/pages/tests/__snapshots__/SplashPage.jest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,17 @@ exports[`<SplashPage /> matches render snapshot 1`] = `
>
A platform to find, share, and discuss healthy places to shop and eat.
</div>
<div
className="css-cdesk3"
>
Coming Soon
</div>
<div
className="css-o94tcm"
/>
<div>
<div
className="css-m58pgh"
>
Early Version Preview...
</div>
<div
style={
Object {
"bottom": 0,
"position": "absolute",
}
}
>
<div
className="css-lfdzya"
>
Expand Down Expand Up @@ -71,22 +68,6 @@ exports[`<SplashPage /> matches style / css snapshot 1`] = `
},
\\"className\\": \\"css-1dl4n80\\"
},
{
\\"rules\\": {
\\"fontFamily\\": \\"Montserrat\\",
\\"paddingTop\\": \\"30px\\",
\\"fontSize\\": \\"20px\\",
\\"fontWeight\\": \\"bold\\",
\\"textAlign\\": \\"center\\",
\\"color\\": \\"white\\",
\\"paddingBottom\\": \\"30px\\",
\\"borderBottom\\": \\"1px solid rgba(255,255,255,0.6)\\",
\\"display\\": \\"block\\",
\\"width\\": \\"226px\\",
\\"margin\\": \\"0 auto\\"
},
\\"className\\": \\"css-cdesk3\\"
},
{
\\"rules\\": {
\\"backgroundImage\\": \\"url('/images/ios-icon.png')\\",
Expand All @@ -97,15 +78,6 @@ exports[`<SplashPage /> matches style / css snapshot 1`] = `
},
\\"className\\": \\"css-o94tcm\\"
},
{
\\"rules\\": {
\\"marginTop\\": \\"90px\\",
\\"marginLeft\\": \\"40px\\",
\\"fontSize\\": \\"16px\\",
\\"color\\": \\"white\\"
},
\\"className\\": \\"css-m58pgh\\"
},
{
\\"rules\\": {
\\"marginTop\\": \\"14px\\",
Expand Down
15 changes: 5 additions & 10 deletions imports/ui/pages/tests/__stories__/PageSections.stories.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
/* eslint-disable import/no-extraneous-dependencies */

import React from "react";
import {
storiesOf,
} from "@storybook/react";
import { storiesOf } from "@storybook/react";
import CompanyName from "../../../components/CompanyName";
import Pitch from "../../../components/Pitch";
import ComingSoon from "../../../components/ComingSoon";
import Logo from "../../../components/Logo";
import Preview from "../../../components/Preview";

storiesOf("Page Sections", module)
.add("CompanyName", () => (<CompanyName />))
.add("Pitch", () => (<Pitch />))
.add("ComingSoon", () => (<ComingSoon />))
.add("Logo", () => (<Logo />))
.add("Preview", () => (<Preview />));
.add("CompanyName", () => <CompanyName />)
.add("Pitch", () => <Pitch />)
.add("Logo", () => <Logo />)
.add("Preview", () => <Preview />);
32 changes: 2 additions & 30 deletions imports/ui/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const gradientBackgroundRules = {
"linear-gradient(135deg, #048ec5 0%,#2ecc71 100%) fixed",
],
/* IE6-9 fallback on horizontal gradient */
filter: "progid:DXImageTransform.Microsoft.gradient( startColorstr='#048ec5', endColorstr='#2ecc71',GradientType=1 )",
filter:
"progid:DXImageTransform.Microsoft.gradient( startColorstr='#048ec5', endColorstr='#2ecc71',GradientType=1 )",
};

const defaultPageRules = {
Expand Down Expand Up @@ -64,24 +65,6 @@ export const pitchStyle = {
className: `${css(pitchRules)}`,
};

const comingSoonRules = {
fontFamily: "Montserrat",
paddingTop: "30px",
fontSize: "20px",
fontWeight: "bold",
textAlign: "center",
color: "white",
paddingBottom: "30px",
borderBottom: "1px solid rgba(255,255,255,0.6)",
display: "block",
width: "226px",
margin: "0 auto",
};
export const comingSoonStyle = {
rules: comingSoonRules,
className: `${css(comingSoonRules)}`,
};

const logoRules = {
backgroundImage: "url('/images/ios-icon.png')",
backgroundSize: "100%",
Expand All @@ -94,17 +77,6 @@ export const logoStyle = {
className: `${css(logoRules)}`,
};

const appLinksHeaderRules = {
marginTop: "90px",
marginLeft: "40px",
fontSize: "16px",
color: "white",
};
export const appLinksHeaderStyle = {
rules: appLinksHeaderRules,
className: `${css(appLinksHeaderRules)}`,
};

const appLinksButtonsRules = {
marginTop: "14px",
marginBottom: "20px",
Expand Down

0 comments on commit b3f34c4

Please sign in to comment.