fix lastfm
This commit is contained in:
parent
e79123c0ca
commit
856cff9ee3
3 changed files with 10 additions and 14 deletions
|
|
@ -4,15 +4,7 @@ title: home
|
||||||
lastfm: true
|
lastfm: true
|
||||||
---
|
---
|
||||||
<div class="welcome-aside-left">
|
<div class="welcome-aside-left">
|
||||||
<div class="now-playing-wrapper box">
|
<div id="listening"></div>
|
||||||
<h2>last played</h2>
|
|
||||||
<div id="listening"></div>
|
|
||||||
<div class="noscript">
|
|
||||||
<noscript>
|
|
||||||
<h3 style="padding: 0px 0px 4px 0px;">javascript is disabled...</h2>
|
|
||||||
</noscript>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="buttons-wrapper box">
|
<div class="buttons-wrapper box">
|
||||||
<h2>please visit...</h3>
|
<h2>please visit...</h3>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ body {
|
||||||
|
|
||||||
.now-playing-wrapper {
|
.now-playing-wrapper {
|
||||||
width: 190px;
|
width: 190px;
|
||||||
#listening {
|
#np {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
|
|
|
||||||
12
js/lastfm.js
12
js/lastfm.js
|
|
@ -23,10 +23,14 @@ const getTrack = async () => {
|
||||||
// ARTIST: json.track.artist['#text']
|
// ARTIST: json.track.artist['#text']
|
||||||
|
|
||||||
document.getElementById("listening").innerHTML = `
|
document.getElementById("listening").innerHTML = `
|
||||||
<img src="${json.track.image[1]['#text']}">
|
<div class="now-playing-wrapper box">
|
||||||
<div id="trackInfo">
|
<h2>last played</h2>
|
||||||
<h3 id="trackName">${json.track.name}</h3>
|
<div id="np">
|
||||||
<p id="artistName">${json.track.artist['#text']}</p>
|
<img src="${json.track.image[1]['#text']}">
|
||||||
|
<div id="trackInfo">
|
||||||
|
<h3 id="trackName">${json.track.name}</h3>
|
||||||
|
<p id="artistName">${json.track.artist['#text']}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue