mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 09:35:48 +00:00
bdbadd1142
Summary: The goal of this PR is to place greater emphasis on the blog as a destination. The dark Hero from the landing page is now present in the blog as well, and the content is front and center. The sidebar has been removed. It is not necessary to show a list of recent blog posts in the sidebar when the blog landing page shows the same number of posts along with short excerpts. The prev/next links have swapped positions, and will now display "Older posts" and "Newer posts". The excerpts have been stripped of formatting and they are now consistent across the blog landing page and the OpenGraph metatags. Fixes #10597. A signup form for the new React Native newsletter has been added to the footer. Newsletter signup form in footer: ![screencapture-localhost-8079-react-native-1477944030909](https://cloud.githubusercontent.com/assets/165856/19869614/4bb035aa-9f6a-11e6-9b8e-e0333417f423.png) Blog landing page: ![screencapture-localhost-8079-r Closes https://github.com/facebook/react-native/pull/10660 Differential Revision: D4117034 Pulled By: bestander fbshipit-source-id: 215f966008fdf5c8870ed28d92384034a0d23c39
46 lines
1.5 KiB
JavaScript
46 lines
1.5 KiB
JavaScript
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*
|
|
* @providesModule BlogPostLayout
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
var React = require('React');
|
|
var Site = require('Site');
|
|
var Hero = require('Hero');
|
|
var MetadataBlog = require('MetadataBlog');
|
|
var BlogPost = require('BlogPost');
|
|
var BlogPostHeader = require('BlogPostHeader');
|
|
var Marked = require('Marked');
|
|
|
|
var BlogPostLayout = React.createClass({
|
|
render: function() {
|
|
return (
|
|
<Site
|
|
section="blog"
|
|
title={this.props.metadata.title}
|
|
description={this.props.metadata.excerpt}
|
|
path={'blog/' + this.props.metadata.path}
|
|
author={this.props.metadata.author}
|
|
authorTwitter={this.props.metadata.authorTwitter}
|
|
image={this.props.metadata.hero ? 'https://facebook.github.io' + this.props.metadata.hero : 'https://facebook.github.io/react-native/img/opengraph.png' }
|
|
>
|
|
<Hero title="React Native Blog" subtitle="Stay up-to-date with the latest React Native news and events." />
|
|
<section className="content wrap documentationContent">
|
|
<BlogPost
|
|
post={this.props.metadata}
|
|
content={this.props.children} />
|
|
</section>
|
|
</Site>
|
|
);
|
|
}
|
|
});
|
|
|
|
module.exports = BlogPostLayout;
|