-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Updated the blog's styling to make it more readable. * BlogPageLayout (blog index) - Only excerpts from each article are now shown, as opposed to the entire article. * BlogPost - Broken up into headers, footers. Reorder header so that the blog post title is closer to the content. Adds support for hero images (visible from the blog index). Adds Facebook, Twitter social share buttons. List items are properly spaced now. Blog index: ![screencapture-localhost-8079-react-native-blog-1471905976431](https://cloud.githubusercontent.com/assets/165856/17874405/4ee4fc22-6880-11e6-8344-2ed823f6000e.png) Single blog post: ![screencapture-localhost-8079-react-native-blog-2016-08-12-react-native-meetup-san-francisco-html-1471905997923](https://cloud.githubusercontent.com/assets/165856/17874407/52af9e7a-6880-11e6-99f0-91f90331aced.png) Closes #9532 Differential Revision: D3758524 Pulled By: bestander fbshipit-source-id: 6385a3e98a3a44343c3b1d3105a32023b748c2c6
- Loading branch information
Showing
11 changed files
with
269 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* 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 BlogPostFooter | ||
*/ | ||
|
||
'use strict'; | ||
|
||
var React = require('React'); | ||
|
||
var BlogPostFooter = React.createClass({ | ||
render: function() { | ||
var post = this.props.post; | ||
|
||
return ( | ||
<div> | ||
<aside className="author-info"> | ||
<p className="posted-on">Posted on {this.props.postedOnDate}</p> | ||
<p className="name-title"> | ||
<a href={post.authorURL} target="_blank"> | ||
{post.author} | ||
</a> | ||
</p> | ||
</aside> | ||
<aside className="entry-share"> | ||
<h3 className="small-title">Share this post</h3> | ||
<div className="social-buttons"> | ||
<div | ||
className="fb-like" | ||
data-layout="standard" | ||
data-share="true" | ||
data-width="225" | ||
data-show-faces="false"> | ||
</div> | ||
<a href="https://twitter.com/share" className="twitter-share-button" data-text={post.title} data-url={"http://facebook.github.io/react-native/blog/" + post.path} data-via={post.authorTwitter} data-related="reactnative" data-show-count="false">Tweet</a> | ||
</div> | ||
</aside> | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = BlogPostFooter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 BlogPostHeader | ||
*/ | ||
|
||
'use strict'; | ||
|
||
var React = require('React'); | ||
|
||
var BlogPostHeader = React.createClass({ | ||
render: function() { | ||
var post = this.props.post; | ||
|
||
var hero; | ||
if (post.hero) { | ||
hero = <img src={post.hero} />; | ||
} | ||
|
||
return ( | ||
<header className="entry-header"> | ||
{hero} | ||
<h4 className="entry-authordate"> | ||
<a href={post.authorURL} target="_blank" | ||
className="author"> | ||
{post.author} | ||
</a> | ||
{' — '} | ||
<span className="date">{this.props.postedOnDate}</span> | ||
</h4> | ||
<h1 className="entry-title">{post.title}</h1> | ||
</header> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = BlogPostHeader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* 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 ReadMoreLink | ||
*/ | ||
|
||
'use strict'; | ||
|
||
var React = require('React'); | ||
|
||
var ReadMoreLink = React.createClass({ | ||
render: function() { | ||
return ( | ||
<footer className="entry-readmore"> | ||
<a href={this.props.href} className="btn"> | ||
Read more | ||
</a> | ||
</footer> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = ReadMoreLink; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters