Built personal website based on GOTH Stack
This commit is contained in:
parent
3d719132f1
commit
9346c395fc
3 changed files with 3 additions and 2 deletions
|
@ -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, "")
|
||||
}
|
||||
|
|
|
@ -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
1
public/css/styles.example.css
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue