chore: link now playing track
This commit is contained in:
parent
363c0b3daf
commit
b59cbed552
3 changed files with 3 additions and 1 deletions
|
@ -58,6 +58,7 @@ export default async () => {
|
|||
return Response.json({
|
||||
artist: track['artist']['#text'],
|
||||
title: track['name'],
|
||||
url: track['url'],
|
||||
genre,
|
||||
emoji: emojiMap(genre, track['artist']['#text']),
|
||||
})
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
</span>
|
||||
<span id="now-playing-display" class="flex flex-row items-center">
|
||||
<span id="now-playing-emoji" class="mr-1"></span>
|
||||
<span id="now-playing-content"></span>
|
||||
<a href id="now-playing-content"></a>
|
||||
</span>
|
||||
</p>
|
|
@ -7,6 +7,7 @@
|
|||
const populateNowPlaying = (data) => {
|
||||
loading.style.display = 'none'
|
||||
emoji.innerText = data.emoji
|
||||
content.href = data.url
|
||||
content.innerText = `${data.title} by ${data.artist}`
|
||||
emoji.classList.remove('hidden')
|
||||
content.classList.remove('hidden')
|
||||
|
|
Reference in a new issue