<% if (plugins.steam) { %>

Steam

<% if (plugins.steam.error) { %>
<%= plugins.steam.error.message %>
<% } else { %> <% if ((plugins.steam.sections.includes("player"))&&(plugins.steam.player)) { %>
<%= plugins.steam.player.name %>
<%= plugins.steam.games.count %> game<%= s(plugins.steam.games.count) %>
Steam level <%= plugins.steam.player.level %>
<%= f(parseInt(plugins.steam.games.playtime)) %> hour<%= s(plugins.steam.games.playtime) %> played
<% } %> <% for (const section of ["most-played", "recently-played"]) { if (plugins.steam.sections.includes(section)) { %>

<%= {"most-played":"Most played", "recently-played":"Recently played"}[section] %>

<% for (const {name, icon, playtime, played, achievements, rate, genres, description} of plugins.steam.games[section]) { %>
<%= name %>
<%= genres.join(", ") %>
<%= f(parseInt(playtime)) %> hour<%= s(playtime) %> played
Last played on <%= f.date(played*1000, {date:true, timeZone:config.timezone?.name}) %>
<%= rate.achieved %> / <%= rate.total %> achievement<%= s(rate.total) %> unlocked
<% { const achieved = achievements.filter(({achieved}) => achieved) %> <% for (const {icon, name, description, unlocked} of achieved) { %>
<%= name %>
<%= f.date(unlocked*1000, {date:true, timeZone:config.timezone?.name}) %>
<%= description %>
<% } %> <% if ((achieved.length)&&(rate.achieved-achieved.length > 0)) { %>
+<%= rate.achieved-achieved.length %> other<%= s(rate.achieved-achieved.length) %>...
<% } %> <% } %>
<% } %>
<% } } %> <% } %>
<% } %>