diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/games.pug | 8 | ||||
-rw-r--r-- | views/head.pug | 5 | ||||
-rw-r--r-- | views/info.pug | 4 | ||||
-rw-r--r-- | views/profile.pug | 6 |
4 files changed, 19 insertions, 4 deletions
diff --git a/views/games.pug b/views/games.pug index 2ab54f1..14ea168 100644 --- a/views/games.pug +++ b/views/games.pug @@ -3,16 +3,20 @@ doctype html html head include head - title Public Games + title= SITE_NAME if user meta(http-equiv="refresh" content=300) body include header article - h1 Public Games + h1= SITE_NAME h2 Open +gametable(0, open_games) + if ready_games.length > 0 + h2 Ready to start + +gametable(0, ready_games) + h2 Active +gametable(1, active_games) diff --git a/views/head.pug b/views/head.pug index df1b762..e65fca2 100644 --- a/views/head.pug +++ b/views/head.pug @@ -75,7 +75,10 @@ mixin gametable(status,table,hide_title=0) td= row.result td.command if status === 0 - a(href="/join/"+row.game_id) Join + if row.is_ready + a(href="/join/"+row.game_id) Enter + else + a(href="/join/"+row.game_id) Join else if status === 1 if row.is_yours if row.is_shared diff --git a/views/info.pug b/views/info.pug index 86a74d0..e38091c 100644 --- a/views/info.pug +++ b/views/info.pug @@ -25,6 +25,10 @@ html p a(href="/create/"+title.title_id) Create a new game + if ready_games.length > 0 + h2 Ready to start + +gametable(0,ready_games) + if active_games.length > 0 h2 Active games +gametable(1,active_games,1) diff --git a/views/profile.pug b/views/profile.pug index 6fb777a..5c98743 100644 --- a/views/profile.pug +++ b/views/profile.pug @@ -33,6 +33,10 @@ html br | » <a href="/logout">Logout</a> + if ready_games.length > 0 + h2 Ready to start + +gametable(0,ready_games) + if open_games.length > 0 h2 Open games +gametable(0,open_games) @@ -45,5 +49,5 @@ html h2 Finished games +gametable(2,finished_games) - if open_games.length === 0 && active_games.length === 0 && finished_games.length === 0 + if open_games.length === 0 && ready_games.length === 0 && active_games.length === 0 && finished_games.length === 0 p You don't have any current or finished games. |