Stop inlining Youtube videos for now
This commit is contained in:
parent
c6681ae436
commit
1965a8787d
10 changed files with 66 additions and 58 deletions
|
@ -15,7 +15,7 @@ module.exports = React.createClass({
|
|||
<head>
|
||||
<meta charSet="utf-8" />
|
||||
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>Match Audio</title>
|
||||
<title>{this.props.shares ? "Listen to " + this.props.shares[0].name + " by " + this.props.shares[0].artist.name + " on Match Audio": "Match Audio"}</title>
|
||||
<meta name="description" content="" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#FE4365" />
|
||||
|
@ -26,7 +26,7 @@ module.exports = React.createClass({
|
|||
<meta name="twitter:image:src" property="og:image" content={image} />
|
||||
<meta property="og:url" content={shareUrl} />
|
||||
<link rel="shortcut icon" href="/images/favicon.png" />
|
||||
<link rel="icon" sizes="512x512" href="/images/logo-512.png" />
|
||||
<link rel="icon" sizes="512x512" href="/images/logo-128.png" />
|
||||
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css' />
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="/stylesheets/style.css" />
|
||||
|
|
|
@ -44,7 +44,11 @@ var MusicItem = React.createClass({
|
|||
<div className={"service" + (this.props.inc == 0 ? " source-service" : "")}>
|
||||
<div className="matching-from hidden-xs">{this.props.inc == 0 ? "Found matches using this link": ""}</div>
|
||||
<a href={this.props.item.streamUrl || this.props.item.purchaseUrl}>
|
||||
<div className="artwork" style={{backgroundImage: "url("+this.props.item.artwork.small+")"}}></div>
|
||||
<div className="artwork" style={{backgroundImage: "url("+this.props.item.artwork.small+")"}}>
|
||||
</div>
|
||||
<div className={this.props.item.service == "youtube" && this.props.inc > 0 ? "youtube" : ""}>
|
||||
{this.props.item.service == "youtube" && this.props.inc > 0 ? this.props.item.name : ""}
|
||||
</div>
|
||||
</a>
|
||||
<div className="service-link">
|
||||
<a href={this.props.item.streamUrl || this.props.item.purchaseUrl}>
|
||||
|
@ -59,28 +63,6 @@ var MusicItem = React.createClass({
|
|||
|
||||
});
|
||||
|
||||
var VideoItem = React.createClass({
|
||||
|
||||
render: function() {
|
||||
if (this.props.item.id) {
|
||||
return (
|
||||
<div className="col-md-6 col-xs-12">
|
||||
<div className={"service" + (this.props.inc == 0 ? " source-service" : "")}>
|
||||
<div className="matching-from hidden-xs">{this.props.inc == 0 ? "Found matches using this link": ""}</div>
|
||||
<div className="js-video widescreen">
|
||||
<iframe width="100%" src={"//www.youtube.com/embed/" + this.props.item.id} frameBorder="0" allowFullScreen></iframe>
|
||||
</div>
|
||||
<a href={"https://www.youtube.com/results?search_query=" + this.props.items[0].name + " " + this.props.items[0].artist.name}>More Youtube matches</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return (<div />);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
module.exports = React.createClass({
|
||||
|
||||
mixins: [ Router.State ],
|
||||
|
@ -202,11 +184,7 @@ module.exports = React.createClass({
|
|||
</div>
|
||||
<div className="row">
|
||||
{this.state.shares.map(function(item, i){
|
||||
if (item.service == "youtube") {
|
||||
return (<VideoItem items={this.state.shares} item={item} inc={i} key={i} />);
|
||||
} else {
|
||||
return (<MusicItem items={this.state.shares} item={item} inc={i} key={i} />);
|
||||
}
|
||||
return (<MusicItem items={this.state.shares} item={item} inc={i} key={i} />);
|
||||
}.bind(this))}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue