Skip to content

Commit

Permalink
Showing 9 changed files with 136 additions and 9 deletions.
5 changes: 1 addition & 4 deletions app/components/Dashboard/BestNewMusicTab/index.js
Original file line number Diff line number Diff line change
@@ -23,9 +23,7 @@ class BestNewMusicTab extends React.Component {
<div className={styles.best_new_music_section_container}>
<BestNewList
data={this.props.dashboardData.bestNewAlbums}
/>


/>
</div>
<h2>
Best new tracks
@@ -36,7 +34,6 @@ class BestNewMusicTab extends React.Component {
/>
</div>
</div>

</Tab.Pane>
);
}
2 changes: 1 addition & 1 deletion app/components/Dashboard/GenresTab/index.js
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ class GenresTab extends React.Component {
<div className={styles.genre_overlay}>
<div className={styles.genre_bg}
style={{
backgroundImage: 'url(' + 'https://picsum.photos/500/500/?random&blur&seed=' + i + ')'
backgroundImage: 'url(' + 'https://picsum.photos/256x256/?random&seed=' + i + ')'
}}
>
</div>
3 changes: 1 addition & 2 deletions app/components/Dashboard/GenresTab/styles.scss
Original file line number Diff line number Diff line change
@@ -40,10 +40,9 @@
position: relative;
width: 100%;
height: 100%;
background-image: url(https://source.unsplash.com/random/512x512);
background-size: contain;
background-position: center;
opacity: 0.65;
opacity: 0.60;
}

.genre_name {
32 changes: 32 additions & 0 deletions app/components/TagView/TagHeader/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import _ from 'lodash';

import styles from './styles.scss';

class TagHeader extends React.Component {
constructor(props) {
super(props);
}

render() {
let {
tag,
tagInfo,
topArtists
} = this.props;

return (
<div className={styles.tag_header_container}>
<div
style={{backgroundImage: `url(${_.last(topArtists[0].image)['#text']})`}}
className={styles.tag_header_background}
/>
<div className={styles.tag_header_name}>
{tag}
</div>
</div>
);
}
}

export default TagHeader;
29 changes: 29 additions & 0 deletions app/components/TagView/TagHeader/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.tag_header_container {
position: relative;
display: flex;
flex-flow: column;
height: 25rem;
width: 100%;

.tag_header_background {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
background-size: cover;
filter: brightness(40%);
}

.tag_header_name {
display: flex;
flex-flow: row;
justify-content: flex-start;
align-items: flex-end;
height: 100%;
font-size: 48px;
font-weight: normal;
z-index: 10;
padding: 2rem;
}
}
21 changes: 21 additions & 0 deletions app/components/TagView/TagTopArtists/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';

import styles from './styles.scss';

class TagTopArtists extends React.Component {
constructor(props) {
super(props);
}

render() {
let {

} = this.props;
return (
<div className={styles.tag_top_artists}>
</div>
);
}
}

export default TagTopArtists;
3 changes: 3 additions & 0 deletions app/components/TagView/TagTopArtists/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.tag_top_artists {

}
36 changes: 34 additions & 2 deletions app/components/TagView/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react';
import {Dimmer, Loader} from 'semantic-ui-react';

import TagHeader from './TagHeader';
import TagTopArtists from './TagTopArtists';
import styles from './styles.scss';

class TagView extends React.Component {
@@ -17,10 +20,39 @@ class TagView extends React.Component {
tag,
tags
} = this.props;

let tagInfo, topTracks, topAlbums, topArtists;
if (tags[tag] && tags[tag].loading !== true) {
tagInfo = tags[tag][0].tag;
topTracks = tags[tag][1].tracks.track;
topAlbums = tags[tag][2].albums.album;
topArtists = tags[tag][3].topartists.artist;
}

return (
<div>
{tag}
<div className={styles.tag_view_container}>
<Dimmer.Dimmable>
<Dimmer active={tags[tag] === undefined || tags[tag].loading}>
<Loader/>
</Dimmer>

{
tags[tag] === undefined || tags[tag].loading
? null
: (
<div className={styles.tag_view}>
<TagHeader
tag={tag}
tagInfo={tagInfo}
topArtists={topArtists}
/>
<TagTopArtists
topArtists={topArtists}
/>
</div>
)
}
</Dimmer.Dimmable>
</div>
);
}
14 changes: 14 additions & 0 deletions app/components/TagView/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.tag_view_container {
width: 100%;
height: 100%;

.dimmable {
width: 100%;
height: 100%;
}

.tag-view {
width: 100%;
height: 100%;
}
}

0 comments on commit ac94fef

Please sign in to comment.