Template
1
0
Fork 0

Built personal website based on GOTH Stack

This commit is contained in:
Atridad Lahiji 2024-02-15 01:41:13 -07:00
parent 3d719132f1
commit 9346c395fc
No known key found for this signature in database
3 changed files with 3 additions and 2 deletions

View file

@ -20,7 +20,7 @@ func NowPlayingHandler(c echo.Context) error {
}
if playing.Item != nil && playing.Playing {
return c.String(http.StatusOK, `<div class="indicator-item badge badge-success"><a _="on mouseover put '🎧 Listening to `+playing.Item.Name+" by "+playing.Item.Artists[0].Name+` 🎧' into my.textContent on mouseout put '🎧' into my.textContent" href="`+playing.Item.ExternalURLs["spotify"]+`" rel="noreferrer" target="_blank">🎧</a></div>`)
return c.String(http.StatusOK, `<div class="indicator-item badge badge-success"><a _="on mouseover put '🔥 Listening to `+playing.Item.Name+" by "+playing.Item.Artists[0].Name+` 🔥' into my.textContent on mouseout put '🔥' into my.textContent" href="`+playing.Item.ExternalURLs["spotify"]+`" rel="noreferrer" target="_blank">🔥</a></div>`)
} else {
return c.String(http.StatusOK, "")
}

View file

@ -55,7 +55,7 @@ func CurrentlyPlayingTrackSSE(ctx context.Context, pubSub pubsub.PubSub) error {
}
if playing.Item != nil && playing.Playing {
SendSSE(ctx, pubSub, "spotify", `<div class="indicator-item badge badge-success"><a _="on mouseover put '🎧 Listening to `+playing.Item.Name+" by "+playing.Item.Artists[0].Name+` 🎧' into my.textContent on mouseout put '🎧' into my.textContent" href="`+playing.Item.ExternalURLs["spotify"]+`" rel="noreferrer" target="_blank">🎧</a></div>`)
SendSSE(ctx, pubSub, "spotify", `<div class="indicator-item badge badge-success"><a _="on mouseover put '🔥 Listening to `+playing.Item.Name+" by "+playing.Item.Artists[0].Name+` 🔥' into my.textContent on mouseout put '🔥' into my.textContent" href="`+playing.Item.ExternalURLs["spotify"]+`" rel="noreferrer" target="_blank">🔥</a></div>`)
} else {
SendSSE(ctx, pubSub, "spotify", "")
}

1
public/css/styles.example.css vendored Normal file

File diff suppressed because one or more lines are too long