//- vim:ts=4:sw=4:
- let open_games = games.filter(game => game.status === 0 && !game.is_match)
- let future_games = games.filter(game => game.status === 0 && game.is_match)
- let active_games = games.filter(game => game.status === 1 && game.is_opposed)
- let solo_games = games.filter(game => game.status === 1 && !game.is_opposed)
- let finished_games = games.filter(game => game.status === 2)
doctype html
html
head
include head
title= who.name
style.
.about {
white-space: pre-wrap;
font-style: italic;
padding: 8px 12px;
border: var(--thin-border);
box-shadow: var(--drop-shadow);
background-color: var(--color-text);
}
body
include header
article
h1= who.name
if who.about
p.about= who.about
p Member since #{human_date(who.ctime)}.
p Last seen #{human_date(who.atime)}.
if user && (who.user_id !== user.user_id)
p
a(href="/message/send/"+who.name) Send message
br
if relation > 0
a(href="/contacts/remove/"+who.name) Remove from friends
else if relation < 0
a(href="/contacts/remove/"+who.name) Remove from blacklist
else
a(href="/contacts/add-friend/"+who.name) Add to friends
br
a(href="/contacts/add-enemy/"+who.name) Add to blacklist
if (who.move_time_mean !== null)
h3 Response time
div Average response time: #{format_minutes(who.move_time_mean)}
if (who.move_time_q2 !== null)
div Median response time: #{format_minutes(who.move_time_q2)}
if (who.move_time_q1 !== null && who.move_time_q2 !== null)
div Middle half of response times: #{format_minutes(who.move_time_q1)} to #{format_minutes(who.move_time_q3)}
h3 Timeouts
div Total number of timeouts: #{who.timeout_total}
div Games completed since last timeout: #{who.games_since_timeout}
if ratings.length > 0
h3 Most played games
table
thead
tr
th Title
th Count
th Last played
if user && user.user_id === 1
th Elo
tbody
each row in ratings
tr
td
a.black(href="/" + row.title_id)= row.title_name
td.r= row.count
td.r= row.last
if user && user.user_id === 1
td.r= row.rating
+tourlist(null, active_pools, finished_pools)
if open_games.length > 0
h2 Invitations
+gamelist(open_games)
if active_games.length > 0
h2 Active
+gamelist(active_games)
if solo_games.length > 0
h2 Solo
+gamelist(solo_games)
if future_games.length > 0
h2 Future
+gamelist(future_games)
if finished_games.length > 0
h2 Recently finished
+gamelist(finished_games)
p All #{who.name}'s finished games
if ENABLE_TOURNAMENTS
p All #{who.name}'s finished tournaments
if user && user.user_id === 1
if who.is_banned
p UNBAN USER
else
p BAN USER