This commit is contained in:
Chris Trevino 2020-09-04 14:35:53 -07:00
Родитель 32b265b16d
Коммит 7284f6c644
10 изменённых файлов: 157 добавлений и 2 удалений

Просмотреть файл

@ -0,0 +1,21 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import styled from 'styled-components'
const textColor = '#FEFEFE'
const highlight = '#89C4F8'
const fontFamily = 'sans-serif'
export const Text = styled.div`
color: ${textColor};
font-family: ${fontFamily};
font-size: 12px;
`
export const Link = styled.a`
color: ${highlight};
font-family: ${fontFamily};
font-size: 12px;
`

Просмотреть файл

@ -0,0 +1,10 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import React, { memo } from 'react'
import { Text } from './Common'
export const Copyright: React.FC = memo(function Copyright() {
return <Text>© 2020 Microsoft</Text>
})

Просмотреть файл

@ -0,0 +1,52 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import React from 'react'
import styled from 'styled-components'
import { Copyright } from './Copyright'
import { NoCookies } from './NoCookies'
import { PrivacyStatement } from './Privacy'
import { TermsOfUse } from './TermsOfUse'
import { TrademarksStatement } from './Trademarks'
export interface FooterProps {
style?: React.CSSProperties
}
export const FOOTER_HEIGHT = 50
export const Footer: React.FC<FooterProps> = style => (
<Container style={style as any}>
<FooterColumn></FooterColumn>
<FooterColumn>
<Copyright />
<NoCookies />
<CorpLinks>
<TermsOfUse />
<PrivacyStatement style={{ marginLeft: 30, marginRight: 30 }} />
<TrademarksStatement />
</CorpLinks>
</FooterColumn>
</Container>
)
const Container = styled.div`
display: flex;
margin-top: 10px;
background-color: #333333;
`
const CorpLinks = styled.div`
display: flex;
flex-direction: row;
justify-content: space-around;
`
const FooterColumn = styled.div`
margin-top: 10px;
display: flex;
flex: 1;
flex-direction: column;
justify-content: center;
align-items: center;
height: ${FOOTER_HEIGHT}px;
`

Просмотреть файл

@ -0,0 +1,13 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import React from 'react'
import { Text } from './Common'
export const NoCookies: React.FC = () => (
<Text>
This site does not collect any personal information or use cookies.&nbsp;
</Text>
)

Просмотреть файл

@ -0,0 +1,20 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import React from 'react'
import { Text, Link } from './Common'
export const PrivacyStatement: React.FC<{
style?: React.CSSProperties
}> = ({ style }) => (
<Text style={style}>
<Link
target="_blank"
href="https://privacy.microsoft.com/en-us/privacystatement/"
>
Privacy and Cookies
</Link>
</Text>
)

Просмотреть файл

@ -0,0 +1,14 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import React from 'react'
import { Text, Link } from './Common'
export const TermsOfUse: React.FC = () => (
<Text>
<Link target="_blank" href="https://go.microsoft.com/fwlink/?LinkID=206977">
Terms of Use
</Link>
</Text>
)

Просмотреть файл

@ -0,0 +1,18 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import React from 'react'
import { Text, Link } from './Common'
export const TrademarksStatement: React.FC = () => (
<Text>
<Link
target="_blank"
href="https://privacy.microsoft.com/en-us/TrademarksStatement/"
>
Trademarks
</Link>
</Text>
)

Просмотреть файл

@ -0,0 +1,5 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
export * from './Footer'

Просмотреть файл

@ -79,7 +79,7 @@ export const FileUploadPane: React.FC<FileUploadPaneProps> = memo(
}, [onDrop])
return (
<div>
<div style={{ margin: 40, flex: 1 }}>
<LoadContainer>
<UsageInstructionsStyled />
<DropAreaContainer>

Просмотреть файл

@ -5,6 +5,7 @@
import React, { memo } from 'react'
import styled from 'styled-components'
import { Graph } from '../../interfaces'
import { Footer } from '../Footer'
import { FileUploadPane } from './FileUploadPane'
export interface UploadViewProps {
@ -17,13 +18,14 @@ export const UploadView: React.FC<UploadViewProps> = memo(function UploadView({
return (
<Container>
<FileUploadPane onGraphLoaded={onGraphLoaded} />
<Footer />
</Container>
)
})
const Container = styled.div`
display: flex;
flex-direction: column;
flex: 1;
margin: 40px;
justify-content: center;
`