This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #685 from 0xProject/feature/website/jobs-page
Jobs page
- Loading branch information
Showing
29 changed files
with
814 additions
and
38 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions
4
...ages/website/ts/components/redirecter.tsx → ...ages/website/ts/components/redirector.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { constants } from 'ts/utils/constants'; | ||
|
||
interface RedirecterProps { | ||
interface RedirectorProps { | ||
location: string; | ||
} | ||
|
||
export function Redirecter(_props: RedirecterProps): void { | ||
export function Redirector(_props: RedirectorProps): void { | ||
window.location.href = constants.URL_ANGELLIST; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as React from 'react'; | ||
|
||
export interface FilledImageProps { | ||
src: string; | ||
} | ||
export const FilledImage = (props: FilledImageProps) => ( | ||
<div | ||
style={{ | ||
width: '100%', | ||
height: '100%', | ||
objectFit: 'cover', | ||
backgroundImage: `url(${props.src})`, | ||
backgroundRepeat: 'no-repeat', | ||
backgroundPosition: 'center', | ||
backgroundSize: 'cover', | ||
}} | ||
/> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import * as React from 'react'; | ||
|
||
import { Button } from 'ts/components/ui/button'; | ||
import { colors } from 'ts/style/colors'; | ||
|
||
const BUTTON_TEXT = 'reload'; | ||
|
||
export interface RetryProps { | ||
onRetry: () => void; | ||
} | ||
export const Retry = (props: RetryProps) => ( | ||
<div className="clearfix center" style={{ color: colors.black }}> | ||
<div className="mx-auto inline-block align-middle" style={{ lineHeight: '44px', textAlign: 'center' }}> | ||
<div className="h2" style={{ fontFamily: 'Roboto Mono' }}> | ||
Something went wrong. | ||
</div> | ||
<div className="py3"> | ||
<Button | ||
type="button" | ||
backgroundColor={colors.black} | ||
width="290px" | ||
fontColor={colors.white} | ||
fontSize="18px" | ||
fontFamily="Roboto Mono" | ||
onClick={props.onRetry} | ||
> | ||
{BUTTON_TEXT} | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as React from 'react'; | ||
import { connect } from 'react-redux'; | ||
import { Dispatch } from 'redux'; | ||
import { Jobs as JobsComponent, JobsProps } from 'ts/pages/jobs/jobs'; | ||
import { Dispatcher } from 'ts/redux/dispatcher'; | ||
import { State } from 'ts/redux/reducer'; | ||
import { ScreenWidths } from 'ts/types'; | ||
import { Translate } from 'ts/utils/translate'; | ||
|
||
interface ConnectedState { | ||
translate: Translate; | ||
screenWidth: ScreenWidths; | ||
} | ||
|
||
interface ConnectedDispatch { | ||
dispatcher: Dispatcher; | ||
} | ||
|
||
const mapStateToProps = (state: State, _ownProps: JobsProps): ConnectedState => ({ | ||
translate: state.translate, | ||
screenWidth: state.screenWidth, | ||
}); | ||
|
||
const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ | ||
dispatcher: new Dispatcher(dispatch), | ||
}); | ||
|
||
export const Jobs: React.ComponentClass<JobsProps> = connect(mapStateToProps, mapDispatchToProps)(JobsComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
import * as _ from 'lodash'; | ||
import * as React from 'react'; | ||
|
||
import { FilledImage } from 'ts/components/ui/filled_image'; | ||
import { HeaderItem } from 'ts/pages/jobs/list/header_item'; | ||
import { ListItem } from 'ts/pages/jobs/list/list_item'; | ||
import { colors } from 'ts/style/colors'; | ||
import { ScreenWidths } from 'ts/types'; | ||
|
||
const IMAGE_PATHS = ['/images/jobs/location1.png', '/images/jobs/location2.png', '/images/jobs/location3.png']; | ||
const BENEFIT_ITEM_PROPS_LIST: BenefitItemProps[] = [ | ||
{ | ||
bulletColor: '#6FCF97', | ||
description: | ||
'Donec eget auctor mauris, a imperdiet ante. Ut a tellus ullamcorper, pharetra nibh sed, dignissim mauris. Quisque vel magna vitae nisi scelerisque commodo sed eget dolor. Maecenas vehicula orci', | ||
}, | ||
{ | ||
bulletColor: '#56CCF2', | ||
description: | ||
'Donec eget auctor mauris, a imperdiet ante. Ut a tellus ullamcorper, pharetra nibh sed, dignissim mauris. Quisque vel magna vitae nisi scelerisque commodo sed eget dolor. Maecenas vehicula orci', | ||
}, | ||
{ | ||
bulletColor: '#EB5757', | ||
description: | ||
'Donec eget auctor mauris, a imperdiet ante. Ut a tellus ullamcorper, pharetra nibh sed, dignissim mauris. Quisque vel magna vitae nisi scelerisque commodo sed eget dolor. Maecenas vehicula orci', | ||
}, | ||
{ | ||
bulletColor: '#6FCF97', | ||
description: | ||
'Donec eget auctor mauris, a imperdiet ante. Ut a tellus ullamcorper, pharetra nibh sed, dignissim mauris. Quisque vel magna vitae nisi scelerisque commodo sed eget dolor. Maecenas vehicula orci', | ||
}, | ||
{ | ||
bulletColor: '#56CCF2', | ||
description: | ||
'Donec eget auctor mauris, a imperdiet ante. Ut a tellus ullamcorper, pharetra nibh sed, dignissim mauris. Quisque vel magna vitae nisi scelerisque commodo sed eget dolor. Maecenas vehicula orci', | ||
}, | ||
]; | ||
const LARGE_LAYOUT_HEIGHT = 937; | ||
const LARGE_LAYOUT_BENEFITS_LIST_PADDING_LEFT = 205; | ||
const HEADER_TEXT = 'Benefits'; | ||
const BENEFIT_ITEM_MIN_HEIGHT = 150; | ||
|
||
export interface BenefitsProps { | ||
screenWidth: ScreenWidths; | ||
} | ||
|
||
export const Benefits = (props: BenefitsProps) => ( | ||
<div style={{ backgroundColor: colors.jobsPageBackground }}> | ||
{props.screenWidth === ScreenWidths.Sm ? <SmallLayout /> : <LargeLayout />} | ||
</div> | ||
); | ||
|
||
const LargeLayout = () => ( | ||
<div className="flex" style={{ height: LARGE_LAYOUT_HEIGHT }}> | ||
<div style={{ width: '43%', height: '100%' }}> | ||
<ImageGrid /> | ||
</div> | ||
<div | ||
className="pr4" | ||
style={{ paddingLeft: LARGE_LAYOUT_BENEFITS_LIST_PADDING_LEFT, width: '57%', height: '100%' }} | ||
> | ||
<BenefitsList /> | ||
</div> | ||
</div> | ||
); | ||
|
||
const SmallLayout = () => ( | ||
<div> | ||
<FilledImage src={_.head(IMAGE_PATHS)} /> | ||
<BenefitsList /> | ||
</div> | ||
); | ||
|
||
export const BenefitsList = () => { | ||
return ( | ||
<div> | ||
<HeaderItem headerText={HEADER_TEXT} /> | ||
{_.map(BENEFIT_ITEM_PROPS_LIST, valueItemProps => <BenefitItem {...valueItemProps} />)} | ||
</div> | ||
); | ||
}; | ||
interface BenefitItemProps { | ||
bulletColor: string; | ||
description: string; | ||
} | ||
|
||
const BenefitItem: React.StatelessComponent<BenefitItemProps> = ({ bulletColor, description }) => ( | ||
<div style={{ minHeight: BENEFIT_ITEM_MIN_HEIGHT }}> | ||
<ListItem bulletColor={bulletColor}> | ||
<div style={{ fontSize: 16, lineHeight: 1.5 }}>{description}</div> | ||
</ListItem> | ||
</div> | ||
); | ||
|
||
const ImageGrid = () => ( | ||
<div style={{ width: '100%', height: '100%' }}> | ||
<div className="flex" style={{ height: '67%' }}> | ||
<FilledImage src={IMAGE_PATHS[0]} /> | ||
</div> | ||
<div className="clearfix" style={{ height: '33%' }}> | ||
<div className="col lg-col-6 md-col-6 col-12" style={{ height: '100%' }}> | ||
<FilledImage src={IMAGE_PATHS[1]} /> | ||
</div> | ||
<div className="col lg-col-6 md-col-6 col-12" style={{ height: '100%' }}> | ||
<FilledImage src={IMAGE_PATHS[2]} /> | ||
</div> | ||
</div> | ||
</div> | ||
); |
Oops, something went wrong.