//- vim:ts=4:sw=4: meta(name="viewport" content="width=device-width,height=device-height,initial-scale=1") link(rel="icon" type="image/svg+xml" href="/favicon.svg") link(rel="stylesheet" href="/fonts/fonts.css") link(rel="stylesheet" href="/style.css") mixin social(title,description,game) meta(property="og:title" content=title) meta(property="og:type" content="website") if game meta(property="og:image" content=SITE_URL+"/"+game+"/cover.2x.jpg") else meta(property="og:image" content=SITE_URL+"/images/rally-the-troops.png") meta(property="og:description" content=description) mixin gamecover(title_id) a(href="/"+title_id) img(src=`/${title_id}/cover.1x.jpg` srcset=`/${title_id}/cover.2x.jpg 2x`) mixin forumpost(row,show_buttons) .post .head .from: a(href="/user/"+row.author_name)= row.author_name .time= row.ctime if row.edited | | (edited #{row.mtime}) .body!= row.body if show_buttons && user .edit if row.author_id === user.user_id | #[a(href="/forum/edit/"+row.post_id) Edit] | | #[a(href="/forum/reply/"+row.post_id) Reply] mixin gametable(status,table,hide_title=0) table thead tr th ID unless hide_title th Title th Scenario th Players th Description case status when 0 th Created when 1 th Changed th Turn when 2 th Finished th Result th tbody each row in table tr td: a(href="/join/"+row.game_id)= row.game_id unless hide_title td.w: a(href="/"+row.title_id)= row.title_name if true td= row.scenario else td= row.options !== "None" ? row.scenario + ", " + row.options : row.scenario if row.player_names td!= row.player_names else td.error Nobody td= row.description case status when 0 td.w= row.ctime when 1 td.w= row.mtime if (row.is_active) td.is_active= row.active else td= row.active when 2 td.w= row.mtime td= row.result td.command if status === 0 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 a(href="/join/"+row.game_id)= "Play" else a(href=`/${row.title_id}/play:${row.game_id}:${row.your_role}`)= "Play" else a(href=`/${row.title_id}/play:${row.game_id}`) View else if status >= 2 a(href=`/${row.title_id}/replay:${row.game_id}`) View else tr case status when 0 td(colspan=7-hide_title) No open games. when 1 td(colspan=8-hide_title) No active games. when 2 td(colspan=8-hide_title) No finished games.