Add app to showcase with source link
Summary:3 small changes Added a published android app to the showcase. Modified the rendering of the apps. When there's a _source_ property on the app object, the link will show up as shown in this screenshot. ![screen shot 2016-02-04 at 9 13 31 am](https://cloud.githubusercontent.com/assets/5065940/12823220/a79bafcc-cb1f-11e5-8cf5-03b03ecadc45.png) Also, external links have the _blank target and not just blank (without the underscore), so a new tab/window will always be opened. Closes https://github.com/facebook/react-native/pull/5761 Differential Revision: D2943464 fb-gh-sync-id: 18c88a90fc7c477730a78442ab0ab45733676dea shipit-source-id: 18c88a90fc7c477730a78442ab0ab45733676dea
This commit is contained in:
parent
11594b8531
commit
4642733743
|
@ -456,6 +456,13 @@ var apps = [
|
|||
icon: 'https://lh3.googleusercontent.com/5N0WYat5WuFbhi5yR2ccdbqmiZ0wbTtKRG9GhT3YK7Z-qRvmykZyAgk0HNElOxD2JOPr=w300-rw',
|
||||
link: 'https://play.google.com/store/apps/details?id=com.rhyble.nalathekerala',
|
||||
author: 'Rhyble',
|
||||
},
|
||||
{
|
||||
name: 'No Fluff: Hiragana',
|
||||
icon: 'https://lh3.googleusercontent.com/kStXwjpbPsu27E1nIEU1gfG0I8j9t5bAR_20OMhGZvu0j2vab3EbBV7O_KNZChjflZ_O',
|
||||
link: 'https://play.google.com/store/apps/details?id=com.hiragana',
|
||||
author: 'Matthias Sieber',
|
||||
source: 'https://github.com/manonthemat/no-fluff-hiragana'
|
||||
},
|
||||
{
|
||||
name: 'Night Light',
|
||||
|
@ -683,6 +690,7 @@ var AppList = React.createClass({
|
|||
{app.linkAppStore && app.linkPlayStore ? this._renderLinks(app) : null}
|
||||
<p>By {app.author}</p>
|
||||
{this._renderBlogPosts(app)}
|
||||
{this._renderSourceLink(app)}
|
||||
{this._renderVideos(app)}
|
||||
</div>
|
||||
);
|
||||
|
@ -693,7 +701,7 @@ var AppList = React.createClass({
|
|||
|
||||
return (
|
||||
<div className="showcase" key={i}>
|
||||
<a href={app.link} target="blank">
|
||||
<a href={app.link} target="_blank">
|
||||
{inner}
|
||||
</a>
|
||||
</div>
|
||||
|
@ -707,7 +715,7 @@ var AppList = React.createClass({
|
|||
|
||||
if (app.blogs.length === 1) {
|
||||
return (
|
||||
<p><a href={app.blogs[0]} target="blank">Blog post</a></p>
|
||||
<p><a href={app.blogs[0]} target="_blank">Blog post</a></p>
|
||||
);
|
||||
} else if (app.blogs.length > 1) {
|
||||
return (
|
||||
|
@ -718,12 +726,22 @@ var AppList = React.createClass({
|
|||
|
||||
_renderBlogPost: function(url, i) {
|
||||
return (
|
||||
<a href={url} target="blank">
|
||||
<a href={url} target="_blank">
|
||||
{i + 1}
|
||||
</a>
|
||||
);
|
||||
},
|
||||
|
||||
_renderSourceLink: function(app) {
|
||||
if (!app.source) {
|
||||
return;
|
||||
}
|
||||
|
||||
return (
|
||||
<p><a href={app.source} target="_blank">Source</a></p>
|
||||
);
|
||||
},
|
||||
|
||||
_renderVideos: function(app) {
|
||||
if (!app.videos) {
|
||||
return;
|
||||
|
@ -731,7 +749,7 @@ var AppList = React.createClass({
|
|||
|
||||
if (app.videos.length === 1) {
|
||||
return (
|
||||
<p><a href={app.videos[0]} target="blank">Video</a></p>
|
||||
<p><a href={app.videos[0]} target="_blank">Video</a></p>
|
||||
);
|
||||
} else if (app.videos.length > 1) {
|
||||
return (
|
||||
|
@ -742,7 +760,7 @@ var AppList = React.createClass({
|
|||
|
||||
_renderVideo: function(url, i) {
|
||||
return (
|
||||
<a href={url} target="blank">
|
||||
<a href={url} target="_blank">
|
||||
{i + 1}
|
||||
</a>
|
||||
);
|
||||
|
@ -751,9 +769,8 @@ var AppList = React.createClass({
|
|||
_renderLinks: function(app) {
|
||||
return (
|
||||
<p>
|
||||
<a href={app.linkAppStore} target="blank">iOS</a>
|
||||
{" - "}
|
||||
<a href={app.linkPlayStore} target="blank">Android</a>
|
||||
<a href={app.linkAppStore} target="_blank">iOS</a> -
|
||||
<a href={app.linkPlayStore} target="_blank">Android</a>
|
||||
</p>
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue