This commit is contained in:
Matt Claypotch 2015-01-12 09:35:49 -08:00
Родитель 151a9521b0
Коммит cb4e0d3789
3 изменённых файлов: 16 добавлений и 5 удалений

Просмотреть файл

@ -140,7 +140,7 @@ var ZoneDetail = React.createClass({
<h1>{z.name}</h1>
</header>
<div className="nowplaying">
<AlbumArt url={now.sArtwork} />
<AlbumArt url={now.sArtwork} big={true} />
<div className="info">
<h1>{now.sArtist} - {now.sSong}</h1>
<User className="user" avatar={now.sUserImage} name={now.sUser} />
@ -163,8 +163,13 @@ var ZoneDetail = React.createClass({
var AlbumArt = React.createClass({
render: function () {
var url = this.props.url;
var big = this.props.big;
if (big) {
url = url.replace('/150/', '/500/');
}
var style = {
backgroundImage: 'url(' + this.props.url + ')'
backgroundImage: 'url(' + url + ')'
};
return <div className="art" style={style} />;
}

Просмотреть файл

@ -99,7 +99,8 @@ header > * + * {
margin-left: 1em;
}
header a {
padding: 1rem 1rem 1rem 0;
padding: 1rem;
margin: -1rem;
}
header > h1 {
flex: 1;

Просмотреть файл

@ -140,7 +140,7 @@ var ZoneDetail = React.createClass({displayName: "ZoneDetail",
React.createElement("h1", null, z.name)
),
React.createElement("div", {className: "nowplaying"},
React.createElement(AlbumArt, {url: now.sArtwork}),
React.createElement(AlbumArt, {url: now.sArtwork, big: true}),
React.createElement("div", {className: "info"},
React.createElement("h1", null, now.sArtist, " - ", now.sSong),
React.createElement(User, {className: "user", avatar: now.sUserImage, name: now.sUser})
@ -163,8 +163,13 @@ var ZoneDetail = React.createClass({displayName: "ZoneDetail",
var AlbumArt = React.createClass({displayName: "AlbumArt",
render: function () {
var url = this.props.url;
var big = this.props.big;
if (big) {
url = url.replace('/150/', '/500/');
}
var style = {
backgroundImage: 'url(' + this.props.url + ')'
backgroundImage: 'url(' + url + ')'
};
return React.createElement("div", {className: "art", style: style});
}