Browse Source

Added versions page with links to recent releases

main
Brian Vaughn 7 years ago
parent
commit
8e45c4bd6a
  1. 22
      src/components/LayoutHeader/Header.js
  2. 54
      src/pages/versions.js

22
src/components/LayoutHeader/Header.js

@ -10,9 +10,9 @@ import HeaderLink from './HeaderLink';
import Link from 'gatsby-link';
import React from 'react';
import {colors, fonts, media} from 'theme';
import {version} from 'site-constants';
import ExternalLinkSvg from 'templates/components/ExternalLinkSvg';
import DocSearch from './DocSearch';
import VersionToggler from './VersionToggler';
import logoSvg from 'icons/logo.svg';
@ -146,7 +146,25 @@ const Header = ({location}: {location: Location}) => (
width: 'calc(100% / 6)',
},
}}>
<VersionToggler />
<a
css={{
padding: '5px 10px',
whiteSpace: 'nowrap',
...fonts.small,
':hover': {
color: colors.brand,
},
':focus': {
outline: 0,
backgroundColor: colors.lighter,
borderRadius: 15,
},
}}
href="/versions">
v{version}
</a>
<a
css={{
padding: '5px 10px',

54
src/pages/versions.js

@ -0,0 +1,54 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* @emails react-core
* @flow
*/
import Container from 'components/Container';
import Header from 'components/Header';
import TitleAndMetaTags from 'components/TitleAndMetaTags';
import React from 'react';
import {sharedStyles} from 'theme';
const Versions = () => (
<Container>
<div css={sharedStyles.articleLayout.container}>
<div css={sharedStyles.articleLayout.content}>
<Header>React Versions</Header>
<TitleAndMetaTags title="React - Versions" />
<div css={sharedStyles.markdown}>
<p>
A complete release history for React is available{' '}
<a
href="https://github.com/facebook/react/releases"
target="_blank"
rel="noopener">
in GitHub
</a>.
</p>
<p>Documentation for recent releases can also be accessed below:</p>
<ul>
<li>
<a href="/version/16.2" rel="nofollow">
16.2.0
</a>
</li>
<li>
<a href="/version/16.1" rel="nofollow">
16.1.1
</a>
</li>
<li>
<a href="/version/16.0" rel="nofollow">
16.0.0
</a>
</li>
</ul>
</div>
</div>
</div>
</Container>
);
export default Versions;
Loading…
Cancel
Save