Files
lair.moe/blueprints/risdeveau/templates/steam.htm
T

64 lines
2.2 KiB
HTML
Raw Normal View History

2026-02-05 14:20:03 +03:00
<div
class="block steam"
hx-get="/m/steam"
hx-trigger="every 1m"
hx-swap="outerHTML"
2026-02-06 18:52:55 +03:00
hx-headers='{
"If-Modified-Since": {{ (recent.last_updated, owned.last_updated) | max | int }},
"If-None-Match": "{{ steam_etag() }}"
}'
2026-02-05 14:20:03 +03:00
>
2026-02-04 00:34:16 +03:00
<h2><a href="https://steamcommunity.com/id/risdeveau">Steam</a></h2>
{% if recent.data.games %}
<h3>Recently played:</h3>
{% for g in recent.data.games %}
<a href="https://store.steampowered.com/app/{{ g.appid }}" class="block">
<picture>
<source media="(max-width: 45rem)" srcset="{{ g.v_cover }}">
<img src="{{ g.h_cover }}">
</picture>
<div>
<strong>{{ g.name }}</strong>
<p>Played last 2 weeks: {{ tmsmp(g.playtime_2weeks*60) }}
<p>
Total played:
{{ tmsmp(g.playtime_linux_forever*60) }} (<abbr title="On Linux">L</abbr>) +
{{ tmsmp(g.playtime_windows_forever*60) }} (<abbr title="On Windows">W</abbr>) =
{{ tmsmp(g.playtime_forever*60) }} (<abbr title="Total">T</abbr>)
</p>
</div>
</a>
{% endfor %}
<p>Last updated: {{ rtmsmp(recent.last_updated) }} ago</p>
{% endif %}
{% if owned.data.games %}
<h3>Top played games:</h3>
{% set owned_games = owned.data.games | sort(attribute="playtime_forever", reverse=true) %}
{% for g in owned_games[:5] %}
<a href="https://store.steampowered.com/app/{{ g.appid }}" class="block">
<picture>
<source media="(max-width: 45rem)" srcset="{{ g.v_cover }}">
<img src="{{ g.h_cover }}">
</picture>
<div>
<strong>{{ g.name }}</strong>
<p>
Total played:
{{ tmsmp(g.playtime_linux_forever*60) }} (<abbr title="On Linux">L</abbr>) +
{{ tmsmp(g.playtime_windows_forever*60) }} (<abbr title="On Windows">W</abbr>) =
{{ tmsmp(g.playtime_forever*60) }} (<abbr title="Total">T</abbr>)
</p>
{% if g.rtime_last_played != 0 %}
<p>Last played: {{ utmsmp(g.rtime_last_played) }}</p>
{% endif %}
</div>
</a>
{% endfor %}
<p>Last updated: {{ rtmsmp(owned.last_updated) }} ago</p>
{% endif %}
</div>