2015-12-19 16:36:44 +00:00
|
|
|
|
<template>
|
2016-02-08 13:14:51 +00:00
|
|
|
|
<article v-if="artist.id" id="artistInfo">
|
2016-06-05 10:46:40 +00:00
|
|
|
|
<h1 class="name">
|
2016-02-08 13:14:51 +00:00
|
|
|
|
<span>{{ artist.name }}</span>
|
|
|
|
|
|
2015-12-19 16:36:44 +00:00
|
|
|
|
<a class="shuffle" @click.prevent="shuffleAll"><i class="fa fa-random"></i></a>
|
|
|
|
|
</h1>
|
|
|
|
|
|
2016-02-08 13:14:51 +00:00
|
|
|
|
<div v-if="artist.info">
|
|
|
|
|
<img v-if="artist.info.image" :src="artist.info.image"
|
2015-12-19 16:36:44 +00:00
|
|
|
|
title="They see me posin, they hatin"
|
|
|
|
|
class="cool-guys-posing cover">
|
|
|
|
|
|
2016-02-08 13:14:51 +00:00
|
|
|
|
<div class="bio" v-if="artist.info.bio.summary">
|
|
|
|
|
<div class="summary" v-show="!showingFullBio">{{{ artist.info.bio.summary }}}</div>
|
|
|
|
|
<div class="full" v-show="showingFullBio">{{{ artist.info.bio.full }}}</div>
|
2015-12-19 16:36:44 +00:00
|
|
|
|
|
|
|
|
|
<button class="more" v-show="!showingFullBio" @click.prevent="showingFullBio = !showingFullBio">
|
|
|
|
|
Full Bio
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<p class="none" v-else>This artist has no Last.fm biography – yet.</p>
|
|
|
|
|
|
2016-02-08 13:14:51 +00:00
|
|
|
|
<footer>Data © <a target="_blank" href="{{{ artist.info.url }}}">Last.fm</a></footer>
|
2015-12-19 16:36:44 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<p class="none" v-else>Nothing can be found. This artist is a mystery.</p>
|
|
|
|
|
</article>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import playback from '../../../services/playback';
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
replace: false,
|
2016-02-08 13:14:51 +00:00
|
|
|
|
props: ['artist'],
|
2015-12-19 16:36:44 +00:00
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
showingFullBio: false,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
2016-01-07 09:03:38 +00:00
|
|
|
|
/**
|
2016-02-08 13:14:51 +00:00
|
|
|
|
* Reset the component's current state.
|
2016-01-07 09:03:38 +00:00
|
|
|
|
*/
|
2015-12-19 16:36:44 +00:00
|
|
|
|
resetState() {
|
|
|
|
|
this.showingFullBio = false;
|
|
|
|
|
},
|
|
|
|
|
|
2016-01-07 09:03:38 +00:00
|
|
|
|
/**
|
|
|
|
|
* Shuffle all songs performed by the current song's artist.
|
|
|
|
|
*/
|
2015-12-19 16:36:44 +00:00
|
|
|
|
shuffleAll() {
|
2016-02-08 13:14:51 +00:00
|
|
|
|
playback.playAllByArtist(this.artist);
|
2015-12-19 16:36:44 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
2016-02-08 13:14:51 +00:00
|
|
|
|
};
|
2015-12-19 16:36:44 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="sass">
|
2016-03-13 17:00:32 +00:00
|
|
|
|
@import "../../../../sass/partials/_vars.scss";
|
|
|
|
|
@import "../../../../sass/partials/_mixins.scss";
|
2015-12-19 16:36:44 +00:00
|
|
|
|
|
|
|
|
|
#artistInfo {
|
2016-06-05 10:46:40 +00:00
|
|
|
|
@include artist-album-info();
|
2015-12-19 16:36:44 +00:00
|
|
|
|
}
|
|
|
|
|
</style>
|