diff options
author | alyx <alyx@aleteoryx.me> | 2023-08-10 20:45:01 -0400 |
---|---|---|
committer | alyx <alyx@aleteoryx.me> | 2023-08-10 20:45:01 -0400 |
commit | 9edafd94b00a73662d51824dbcba0a018e2140cf (patch) | |
tree | 3389bb7be8296ccfa1b287cb23ba4b45f35f1b2e /src/themes | |
parent | 0216a2a99ff28b1f5f102f52b7d980bbc4afc729 (diff) | |
download | lfm_embed-9edafd94b00a73662d51824dbcba0a018e2140cf.tar.gz lfm_embed-9edafd94b00a73662d51824dbcba0a018e2140cf.tar.bz2 lfm_embed-9edafd94b00a73662d51824dbcba0a018e2140cf.zip |
Create plain theme, do some escaping, fix some busted envvars, document themes.
Diffstat (limited to 'src/themes')
-rw-r--r-- | src/themes/plain.hbs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/themes/plain.hbs b/src/themes/plain.hbs new file mode 100644 index 0000000..cbe8948 --- /dev/null +++ b/src/themes/plain.hbs @@ -0,0 +1,34 @@ +<!doctype html> +<html lang="en" style="font-size: 0.5cm; margin: 0.5rem; overflow: hidden;"> + <head> + <meta charset="UTF-8"/> + <title>{{#if error}}Error!{{else}}@{{user.name}}'s Last.fm Stats{{/if}}</title> + <style> + {{#if (eq query.dark null)}} + :root { --b: black; color: black; backgrond-color: white; } + {{else}} + :root { --b: white; color: white; background-color: black; } + a:visited { color: pink } + a { color: cyan; } + {{/if}} + p { margin: 0px; padding: 0px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + </style> + </head> + <body> + {{#if error}} + <p style="white-space: unset;">{{error}}</p> + {{else}} + <a style="float: left;" target="_blank" href="{{scrobble.url}}"><img src="{{scrobble.image_url}}" style="height: 4.0rem; border: solid var(--b) 0.2rem; margin: 0.1rem;" /></a> + <p><a target="_blank" href="{{user.url}}">@{{user.name}}</a>{{#if scrobble.now_playing}} + is scrobbling{{else}}'s last scrobble was + {{/if}} + </p><p> + <i><b><a target="_blank" href="{{scrobble.url}}">{{scrobble.name}}</a></b></i> + </p><p> + {{#if scrobble.album}}from <i><b>{{scrobble.album}}</b></i>{{/if}} + </p><p> + by <b><a target="_blank" href="{{scrobble.artist.url}}">{{scrobble.artist.name}}</a></b>. + </p> + {{/if}} + </body> +</html>
\ No newline at end of file |