Adding content pages [wip]
This commit is contained in:
@@ -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