mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-12 19:48:30 +08:00
Introduce blog
Summary:Ported the infrastructure from jest.  Closes https://github.com/facebook/react-native/pull/6629 Differential Revision: D3094423 Pulled By: vjeux fb-gh-sync-id: a01aec6a55d28484c45bb241d037ca6717bc5e81 shipit-source-id: a01aec6a55d28484c45bb241d037ca6717bc5e81
This commit is contained in:
committed by
Facebook Github Bot 4
parent
05b8944382
commit
b80698df1c
42
website/core/BlogSidebar.js
Normal file
42
website/core/BlogSidebar.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* 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 BlogSidebar
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var MetadataBlog = require('MetadataBlog');
|
||||
var React = require('React');
|
||||
|
||||
var BlogSidebar = React.createClass({
|
||||
render: function() {
|
||||
return (
|
||||
<div className="nav-docs">
|
||||
<div className="nav-docs-section">
|
||||
<h3>Recent Posts</h3>
|
||||
<ul>
|
||||
{MetadataBlog.files.map(function(post) {
|
||||
return (
|
||||
<li key={post.path}>
|
||||
<a
|
||||
className={this.props.title === post.title ? 'active' : ''}
|
||||
href={'/react-native/blog/' + post.path}>
|
||||
{post.title}
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
}.bind(this))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = BlogSidebar;
|
||||
Reference in New Issue
Block a user