tweak lastfm box
This commit is contained in:
parent
f9cb750c17
commit
39154c1759
2 changed files with 33 additions and 21 deletions
|
|
@ -126,24 +126,33 @@ body {
|
||||||
|
|
||||||
.now-playing-wrapper {
|
.now-playing-wrapper {
|
||||||
width: 190px;
|
width: 190px;
|
||||||
#np {
|
|
||||||
|
h2 { margin-bottom: 0px; }
|
||||||
|
a { text-decoration: none; }
|
||||||
|
|
||||||
|
#trackInfo {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: space-evenly;
|
max-height: 64px;
|
||||||
img {
|
img {
|
||||||
order: 1;
|
height: 100%;
|
||||||
max-width: 36px;
|
margin: 0px 0px 0px 0px;
|
||||||
padding: 4px;
|
|
||||||
}
|
}
|
||||||
h3 {
|
#trackInfoText {
|
||||||
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
|
display: flex;
|
||||||
font-size: 0.8em;
|
align-items: flex-start;
|
||||||
padding: 0px 0px 0px 4px;
|
flex-direction: column;
|
||||||
}
|
h3 {
|
||||||
p {
|
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
|
||||||
font-size: 0.7em;
|
font-size: 0.8em;
|
||||||
padding: 0px 0px 2px 4px;
|
padding: 0px 0px 0px 4px;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
font-size: 0.7em;
|
||||||
|
padding: 0px 0px 0px 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
&:hover { background: hsl(0, 65%, 5%); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
19
js/lastfm.js
19
js/lastfm.js
|
|
@ -23,14 +23,17 @@ const getTrack = async () => {
|
||||||
// ARTIST: json.track.artist['#text']
|
// ARTIST: json.track.artist['#text']
|
||||||
|
|
||||||
document.getElementById("listening").innerHTML = `
|
document.getElementById("listening").innerHTML = `
|
||||||
<div class="now-playing-wrapper box">
|
<div class="now-playing-wrapper box" title="listening to...">
|
||||||
<h2>listening to:</h2>
|
<!--<h2>listening to:</h2>-->
|
||||||
<div id="np">
|
<a href="https://fm.yuki.k4w411.net/" target="_blank">
|
||||||
<img src="${json.track.image[1]['#text']}">
|
<div id="trackInfo">
|
||||||
<div id="trackInfo">
|
<img src="${json.track.image[1]['#text']}">
|
||||||
<h3 id="trackName">${json.track.name}</h3>
|
<div id="trackInfoText">
|
||||||
<p id="artistName">${json.track.artist['#text']}</p>
|
<h3 id="trackName">${json.track.name}</h3>
|
||||||
</div>
|
<p id="artistName">${json.track.artist['#text']}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue