mirror of
https://github.com/Alvin-Zilverstand/novatorem.git
synced 2026-03-06 02:57:12 +01:00
Status string
This commit is contained in:
@@ -79,12 +79,14 @@ def makeSVG(data):
|
||||
|
||||
if data == {}:
|
||||
#contentBar = "" #Shows/Hides the EQ bar if no song is currently playing
|
||||
currentStatus = "Last seen playing:"
|
||||
recentPlays = recentlyPlayed()
|
||||
recentPlaysLength = len(recentPlays["items"])
|
||||
itemIndex = random.randint(0, recentPlaysLength - 1)
|
||||
item = recentPlays["items"][itemIndex]["track"]
|
||||
else:
|
||||
item = data["item"]
|
||||
currentStatus = "Vibing to:"
|
||||
|
||||
image = loadImageB64(item["album"]["images"][1]["url"])
|
||||
artistName = item["artists"][0]["name"].replace("&", "&")
|
||||
@@ -96,6 +98,7 @@ def makeSVG(data):
|
||||
"artistName": artistName,
|
||||
"songName": songName,
|
||||
"image": image,
|
||||
"status": currentStatus
|
||||
}
|
||||
|
||||
return render_template("spotify.html.j2", **dataDict)
|
||||
|
||||
@@ -5,16 +5,25 @@
|
||||
}
|
||||
|
||||
.main {
|
||||
margin-top: 40px;
|
||||
display: flex;
|
||||
width: 480px;
|
||||
height: 133px;
|
||||
}
|
||||
|
||||
.currentStatus {
|
||||
position: static;
|
||||
float: left;
|
||||
font-size: 24px;
|
||||
margin-top: -5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.container {
|
||||
border-radius: 5px;
|
||||
padding: 10px 10px 10px 0px;
|
||||
}
|
||||
|
||||
|
||||
.art {
|
||||
float: left;
|
||||
width: 27%;
|
||||
@@ -78,6 +87,8 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="currentStatus">Currently playing</div>
|
||||
|
||||
<div class="main">
|
||||
<a class="art" href="{}" target="_BLANK">
|
||||
<center>
|
||||
|
||||
@@ -7,9 +7,18 @@
|
||||
}
|
||||
|
||||
.main {
|
||||
margin-top: 40px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.currentStatus {
|
||||
position: static;
|
||||
float: left;
|
||||
font-size: 24px;
|
||||
margin-top: -5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.container {
|
||||
border-radius: 5px;
|
||||
padding: 10px 10px 10px 0px;
|
||||
@@ -82,6 +91,8 @@
|
||||
</style>
|
||||
|
||||
<div class="main">
|
||||
<div class="currentStatus">{{status}}</div>
|
||||
|
||||
<a class="art" href="{}" target="_BLANK">
|
||||
<center>
|
||||
<img src="data:image/png;base64, {{image}}" class="cover" />
|
||||
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.3 KiB |
Reference in New Issue
Block a user