Adding content pages [wip]
This commit is contained in:
@@ -38,7 +38,7 @@ export default function About() {
|
||||
<Helmet>
|
||||
<title>About Us</title>
|
||||
</Helmet>
|
||||
<Header>
|
||||
<Header background="#F22C5F">
|
||||
<h1>About Us</h1>
|
||||
<p>The team behind Outline</p>
|
||||
</Header>
|
||||
|
||||
@@ -60,7 +60,7 @@ export default function Pricing() {
|
||||
<Helmet>
|
||||
<title>API Documentation - Outline</title>
|
||||
</Helmet>
|
||||
<Header>
|
||||
<Header background="#AA34F0">
|
||||
<h1>Documentation</h1>
|
||||
<p>The API is the heart and soul of Outline.</p>
|
||||
</Header>
|
||||
|
||||
@@ -21,7 +21,7 @@ function Changelog({ releases }: { releases: Release[] }) {
|
||||
<Helmet>
|
||||
<title>Changelog</title>
|
||||
</Helmet>
|
||||
<Header>
|
||||
<Header background="#00ADFF">
|
||||
<h1>Changelog</h1>
|
||||
<p>
|
||||
We’re building in public. Here’s what we’ve been changing recently.
|
||||
|
||||
@@ -166,7 +166,7 @@ const Mask = styled.div`
|
||||
`;
|
||||
|
||||
const Features = styled.div`
|
||||
background: hsl(180, 58%, 85%);
|
||||
background: #00adff;
|
||||
padding: 0 2em;
|
||||
width: 100%;
|
||||
`;
|
||||
@@ -200,7 +200,7 @@ const Feature = styled(Grid.Unit)`
|
||||
`;
|
||||
|
||||
const Footer = styled.div`
|
||||
background: hsl(127, 58%, 85%);
|
||||
background: #aa34f0;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
padding: 4em 2em;
|
||||
@@ -210,6 +210,10 @@ const Footer = styled.div`
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
${breakpoint('tablet')`
|
||||
margin: 2em 0;
|
||||
padding: 6em 4em;
|
||||
|
||||
29
server/pages/Integration.js
Normal file
29
server/pages/Integration.js
Normal file
@@ -0,0 +1,29 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { find } from 'lodash';
|
||||
import Grid from 'styled-components-grid';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import Header from './components/Header';
|
||||
import Content from './components/Content';
|
||||
import IntegrationMenu from './components/IntegrationMenu';
|
||||
import integrations from '../config/integrations';
|
||||
|
||||
export default function Integration({ slug }: { slug: string }) {
|
||||
const integation = find(integrations, i => i.slug === slug);
|
||||
|
||||
return (
|
||||
<Grid>
|
||||
<Helmet>
|
||||
<title>{integation.name} Integration</title>
|
||||
</Helmet>
|
||||
<Header>
|
||||
<h1>{integation.name} Integration</h1>
|
||||
<p>{integation.description}</p>
|
||||
</Header>
|
||||
<Content>
|
||||
<IntegrationMenu integrations={integrations} />
|
||||
<div />
|
||||
</Content>
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
77
server/pages/Integrations.js
Normal file
77
server/pages/Integrations.js
Normal file
@@ -0,0 +1,77 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { map, groupBy } from 'lodash';
|
||||
import styled from 'styled-components';
|
||||
import Grid from 'styled-components-grid';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import Header from './components/Header';
|
||||
import Content from './components/Content';
|
||||
import integrations from '../config/integrations';
|
||||
|
||||
const categories = groupBy(integrations, i => i.category);
|
||||
|
||||
function Integrations() {
|
||||
return (
|
||||
<Grid>
|
||||
<Helmet>
|
||||
<title>Integrations</title>
|
||||
</Helmet>
|
||||
<Header background="#FFB500">
|
||||
<h1>Integrations</h1>
|
||||
<p>
|
||||
Outline is designed to integrate with your existing workflow and
|
||||
tools.
|
||||
</p>
|
||||
</Header>
|
||||
<Content>
|
||||
{map(categories, (integrations, category) => (
|
||||
<div key={category}>
|
||||
<h2>{category}</h2>
|
||||
<Category>
|
||||
{integrations.map(i => (
|
||||
<Grid.Unit size={{ desktop: 1 / 4 }} key={i.slug}>
|
||||
<Integration href={`/integrations/${i.slug}`}>
|
||||
<Logo src={`/images/${i.slug}.png`} alt={i.name} />
|
||||
<h3>{i.name}</h3>
|
||||
<p>{i.description}</p>
|
||||
</Integration>
|
||||
</Grid.Unit>
|
||||
))}
|
||||
</Category>
|
||||
</div>
|
||||
))}
|
||||
</Content>
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
|
||||
const Logo = styled.img`
|
||||
height: 60px;
|
||||
border-radius: 4px;
|
||||
`;
|
||||
|
||||
const Category = styled(Grid)`
|
||||
margin: 0 -1em;
|
||||
`;
|
||||
|
||||
const Integration = styled.a`
|
||||
display: block;
|
||||
padding: 2em 2em 1em;
|
||||
margin: 1em;
|
||||
border-radius: 4px;
|
||||
border: 2px solid ${props => props.theme.slateLight};
|
||||
color: ${props => props.theme.text};
|
||||
font-size: 16px;
|
||||
transition: background 200ms ease-in-out;
|
||||
|
||||
h3,
|
||||
p {
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: ${props => props.theme.slateLight};
|
||||
}
|
||||
`;
|
||||
|
||||
export default Integrations;
|
||||
@@ -1,15 +1,17 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import breakpoint from 'styled-components-breakpoint';
|
||||
import styled from 'styled-components';
|
||||
import Centered from './Centered';
|
||||
|
||||
type Props = {
|
||||
children: React.Node,
|
||||
background?: string,
|
||||
};
|
||||
|
||||
const Header = ({ children }: Props) => {
|
||||
const Header = ({ children, background }: Props) => {
|
||||
return (
|
||||
<Wrapper>
|
||||
<Wrapper background={background}>
|
||||
<Centered>{children}</Centered>
|
||||
</Wrapper>
|
||||
);
|
||||
@@ -17,9 +19,13 @@ const Header = ({ children }: Props) => {
|
||||
|
||||
const Wrapper = styled.div`
|
||||
width: 100%;
|
||||
padding: 2em;
|
||||
background: ${props => props.theme.contentHeaderBackground};
|
||||
padding: 8em 0 3em;
|
||||
|
||||
margin-top: -70px;
|
||||
margin-bottom: 2em;
|
||||
text-align: center;
|
||||
background: ${props => props.background || 'transparent'};
|
||||
z-index: -1;
|
||||
|
||||
p {
|
||||
font-size: 22px;
|
||||
@@ -29,9 +35,17 @@ const Wrapper = styled.div`
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.5em;
|
||||
font-size: 2em;
|
||||
margin: 0 0 0.1em;
|
||||
}
|
||||
|
||||
${breakpoint('tablet')`
|
||||
padding: 8em 3em 3em 3em;
|
||||
|
||||
h1 {
|
||||
font-size: 4em;
|
||||
}
|
||||
`};
|
||||
`;
|
||||
|
||||
export default Header;
|
||||
|
||||
24
server/pages/components/IntegrationMenu.js
Normal file
24
server/pages/components/IntegrationMenu.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// @flow
|
||||
import { map, groupBy } from 'lodash';
|
||||
import * as React from 'react';
|
||||
|
||||
export default function IntegrationMenu({ integrations }) {
|
||||
const categories = groupBy(integrations, i => i.category);
|
||||
|
||||
return (
|
||||
<nav>
|
||||
{map(categories, (integrations, category) => (
|
||||
<React.Fragment>
|
||||
<h3>{category}</h3>
|
||||
<ul>
|
||||
{integrations.map(i => (
|
||||
<li>
|
||||
<a href={`/integrations/${i.slug}`}>{i.name}</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</React.Fragment>
|
||||
))}
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
changelog,
|
||||
features,
|
||||
about,
|
||||
integrations,
|
||||
privacy,
|
||||
githubUrl,
|
||||
twitterUrl,
|
||||
@@ -42,14 +43,11 @@ function TopNavigation({ sessions, loggedIn }: Props) {
|
||||
<a href={features()}>Features</a>
|
||||
</MenuItemDesktop>
|
||||
<MenuItemDesktop>
|
||||
<a href={about()}>About</a>
|
||||
<a href={integrations()}>Integrations</a>
|
||||
</MenuItemDesktop>
|
||||
<MenuItemDesktop>
|
||||
<a href={changelog()}>Changelog</a>
|
||||
</MenuItemDesktop>
|
||||
<MenuItemDesktop>
|
||||
<a href={twitterUrl()}>Twitter</a>
|
||||
</MenuItemDesktop>
|
||||
<MenuItem>
|
||||
<a href={developers()}>API</a>
|
||||
</MenuItem>
|
||||
@@ -109,6 +107,9 @@ function BottomNavigation() {
|
||||
<div>
|
||||
<a href={privacy()}>Privacy</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href={about()}>About</a>
|
||||
</div>
|
||||
</BottomNav>
|
||||
);
|
||||
}
|
||||
@@ -118,11 +119,11 @@ const MenuLinkStyle = props => `
|
||||
font-weight: 500;
|
||||
|
||||
a {
|
||||
color: ${props.theme.slate};
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: ${props.theme.slateDark};
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
text-decoration: underline;
|
||||
}
|
||||
`;
|
||||
@@ -142,17 +143,17 @@ const MenuItem = styled.li`
|
||||
props.highlighted &&
|
||||
`
|
||||
position: relative;
|
||||
border: 2px solid ${props.theme.slate};
|
||||
border: 2px solid rgba(0, 0, 0, 0.6);
|
||||
border-radius: 4px;
|
||||
padding: 6px 8px;
|
||||
margin-top: -6px;
|
||||
margin-bottom: -6px;
|
||||
|
||||
&:hover {
|
||||
border: 2px solid ${props.theme.slateDark};
|
||||
border: 2px solid rgba(0, 0, 0, 0.4);
|
||||
|
||||
> a {
|
||||
color: ${props.theme.slateDark};
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user