summaryrefslogtreecommitdiff
path: root/views/head.pug
diff options
context:
space:
mode:
Diffstat (limited to 'views/head.pug')
-rw-r--r--views/head.pug15
1 files changed, 12 insertions, 3 deletions
diff --git a/views/head.pug b/views/head.pug
index 911def4..748d417 100644
--- a/views/head.pug
+++ b/views/head.pug
@@ -34,11 +34,20 @@ mixin forumpost(row,show_buttons)
|
| #[a(href="/forum/reply/"+row.post_id) Reply]
-mixin gamelist(list,status,hide_title=0)
- div.game_list(class=status)
+mixin gamelist(list,hide_title=0)
+ div.game_list
each item in list
div
- div.game_item(class=item.your_turn ? "your_turn" : "")
+ -
+ let className = "game_item"
+ if (item.your_turn) className += " your_turn"
+ if (item.status === 0 && !item.is_ready) className += " open"
+ else if (item.status === 0 && item.is_ready) className += " ready"
+ else if (item.status === 1 && !item.is_ready) className += " replacement"
+ else if (item.status === 1 && item.is_ready) className += " active"
+ else if (item.status === 2) className += " finished"
+
+ div(class=className)
div.game_head
if item.scenario.length <= 2
div