This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
mixin game_block(g, show_last_played=false)
|
||||
a.block(href="https://store.steampowered.com/app/#{g.appid}", target="_blank")
|
||||
picture
|
||||
source(media="(max-width: 45rem)", srcset=g.v_cover)
|
||||
img(src=g.h_cover)
|
||||
div
|
||||
strong= g.name
|
||||
if g.playtime_2weeks
|
||||
p Played last 2 weeks: #{tmsmp(g.playtime_2weeks * 60)}
|
||||
p
|
||||
- var lin = g.playtime_linux_forever > 0;
|
||||
- var win = g.playtime_windows_forever > 0;
|
||||
| Total played:
|
||||
if lin
|
||||
= tmsmp(g.playtime_linux_forever * 60)
|
||||
| (
|
||||
abbr(title="On Linux") L
|
||||
| )
|
||||
if lin and win
|
||||
= " + "
|
||||
if win
|
||||
= tmsmp(g.playtime_windows_forever * 60)
|
||||
| (
|
||||
abbr(title="On Windows") W
|
||||
| )
|
||||
if lin and win
|
||||
= " = "
|
||||
= tmsmp(g.playtime_forever * 60)
|
||||
if show_last_played and g.rtime_last_played != 0
|
||||
p Last played: #{utmsmp(g.rtime_last_played)}
|
||||
|
||||
.block.steam(
|
||||
hx-get="/m/steam",
|
||||
hx-trigger="every 1m",
|
||||
hx-swap="outerHTML",
|
||||
hx-headers='{ "If-None-Match": "#{steam.etag}" }'
|
||||
)
|
||||
h2
|
||||
a(href="https://steamcommunity.com/id/risdeveau") Steam
|
||||
|
||||
if steam.caches.recent.data.games
|
||||
h3 Recently played:
|
||||
each g in steam.caches.recent.data.games
|
||||
+game_block(g)
|
||||
p(x-data="rtime(#{steam.caches.recent.last_updated})", x-text="`Last updated: ${timeString}`")
|
||||
|
||||
if steam.caches.owned.data.games
|
||||
h3 Top played games:
|
||||
- var owned_games = steam.caches.owned.data.games | sort(attribute="playtime_forever", reverse=true)
|
||||
each g in owned_games[:5]
|
||||
+game_block(g, true)
|
||||
p(x-data="rtime(#{steam.caches.owned.last_updated})", x-text="`Last updated: ${timeString}`")
|
||||
Reference in New Issue
Block a user