//- 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 && !game.your_turn) - let move_games = games.filter(game => game.status === 1 && game.is_opposed && game.your_turn) - let solo_games = games.filter(game => game.status === 1 && !game.is_opposed) - let finished_games = games.filter(game => game.status === 2) - move_games.sort((a,b)=> a.mtime < b.mtime ? -1 : a.mtime > b.mtime ? 1 : 0) doctype html html head include head title= SITE_NAME if active_games.length > 0 meta(http-equiv="refresh" content=600) body include header article.wide h1 Your games if open_games.length > 0 h2 Open +gamelist(open_games) p a(href="/create") Create a new game +tourlist(seeds, active_pools, finished_pools) p a(href="/tm/list") Join a tournament if move_games.length > 0 h2 Move +gamelist(move_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 a(href="/games/finished") All your finished games br a(href="/tm/finished") All your finished tournaments