-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
cacabo
committed
Jan 18, 2020
1 parent
31803f6
commit fa4861e
Showing
27 changed files
with
186 additions
and
115 deletions.
There are no files selected for viewing
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,41 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
|
||
import { Section, Row, Col, H1, H3, P } from '../../shared' | ||
import { M2 } from '../../constants/measurements' | ||
|
||
const deskPath = require('../../images/hero-resources.svg') as string // tslint:disable-line | ||
|
||
const Desk = styled.img` | ||
width: 90%; | ||
margin-left: 5%; | ||
height: auto; | ||
` | ||
|
||
const TextWrapper = styled.div<{}>` | ||
align-self: center; | ||
` | ||
|
||
export const Hero = () => ( | ||
<Section> | ||
<Row margin={M2}> | ||
<Col sm={12} md={6} margin={M2} flex> | ||
<TextWrapper> | ||
<H1 mb1>Resources</H1> | ||
<H3 style={{ fontWeight: 400 }}> | ||
Tutorials and data for building your own products | ||
</H3> | ||
<P> | ||
We're dedicated to giving back to the community—here are some guides | ||
and tutorials we've written to help everybody build products like | ||
ours. We also maintain free APIs and SDKs with support for | ||
Javascript, Python, Ruby and OAuth. | ||
</P> | ||
</TextWrapper> | ||
</Col> | ||
<Col sm={12} md={6} margin={M2}> | ||
<Desk src={deskPath} /> | ||
</Col> | ||
</Row> | ||
</Section> | ||
) |
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,59 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
import { IResource } from './types' | ||
import { | ||
Col, | ||
Card, | ||
H3, | ||
Tags, | ||
BtnAnchor, | ||
EBtnSize, | ||
LinkExternalLink, | ||
Row, | ||
Flex, | ||
} from '../../shared' | ||
import { M1, M3, M2 } from '../../constants/measurements' | ||
|
||
const Logo = styled.img<{}>` | ||
height: 1.5rem; | ||
width: auto; | ||
margin-bottom: ${M2}; | ||
margin-right: ${M1}; | ||
` | ||
|
||
export const Resource = ({ | ||
name, | ||
demoLink, | ||
docsLink, | ||
tags, | ||
imagePath, | ||
}: IResource) => ( | ||
<Col key={name} margin={M1} flex> | ||
<Card shaded hoverable bordered style={{ width: '100%' }}> | ||
<Flex> | ||
<Logo src={imagePath} alt={name} /> | ||
<H3 mb1>{name}</H3> | ||
</Flex> | ||
<div style={{ marginBottom: M3 }}> | ||
<Tags tags={tags} /> | ||
</div> | ||
<div> | ||
<BtnAnchor | ||
style={{ marginRight: M2, marginBottom: 0 }} | ||
size={EBtnSize.SM} | ||
href={docsLink} | ||
target="_BLANK" | ||
> | ||
Docs <LinkExternalLink /> | ||
</BtnAnchor> | ||
<a | ||
href={demoLink} | ||
target="_BLANK" | ||
style={{ marginBottom: 0, fontSize: '80%' }} | ||
> | ||
Demo <LinkExternalLink /> | ||
</a> | ||
</div> | ||
</Card> | ||
</Col> | ||
) |
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,47 @@ | ||
import React from 'react' | ||
import { Hero } from './Hero' | ||
import { IResource } from './types' | ||
import { Resource } from './Resource' | ||
import { Section, Row } from '../../shared' | ||
import { M1 } from '../../constants/measurements' | ||
|
||
const pcpLogoPath = require('../../images/resources/pcp-logo.svg') as string // tslint:disable-line | ||
const pcrLogoPath = require('../../images/resources/pcr-logo.svg') as string // tslint:disable-line | ||
const pennMobileLogoPath = require('../../images/resources/penn-mobile-logo.svg') as string // tslint:disable-line | ||
|
||
const resources: IResource[] = [ | ||
{ | ||
name: 'Penn SDK', | ||
demoLink: 'https://data.pennlabs.org', | ||
docsLink: 'https://penn-sdk.readthedocs.io/en/latest/', | ||
tags: ['Python', 'SDK'], | ||
imagePath: pcpLogoPath, | ||
}, | ||
{ | ||
name: 'Penn Mobile', | ||
demoLink: 'https://data.pennlabs.org', | ||
docsLink: 'https://github.com/pennlabs/labs-api-server', | ||
tags: ['JSON', 'REST API'], | ||
imagePath: pennMobileLogoPath, | ||
}, | ||
{ | ||
name: 'Penn Course Review', | ||
demoLink: 'https://data.pennlabs.org', | ||
docsLink: 'https://github.com/pennlabs/pcr/blob/master/docs/api.md', | ||
tags: ['JSON', 'REST API'], | ||
imagePath: pcrLogoPath, | ||
}, | ||
] | ||
|
||
export const Resources = () => ( | ||
<> | ||
<Hero /> | ||
<Section style={{ paddingTop: 0 }}> | ||
<Row margin={M1}> | ||
{resources.map(props => ( | ||
<Resource key={props.name} {...props} /> | ||
))} | ||
</Row> | ||
</Section> | ||
</> | ||
) |
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,7 @@ | ||
export interface IResource { | ||
name: string | ||
demoLink: string | ||
docsLink: string | ||
tags: string[] | ||
imagePath: string | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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
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