diff options
Diffstat (limited to 'views/head.pug')
-rw-r--r-- | views/head.pug | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/views/head.pug b/views/head.pug index 3792429..75e1135 100644 --- a/views/head.pug +++ b/views/head.pug @@ -8,6 +8,14 @@ link(rel="stylesheet" href="/style.css") if SITE_THEME link(rel="stylesheet" href="/themes/"+SITE_THEME) +mixin altcha_script() + if ALTCHA + script(async defer type="module" src="/altcha.min.js") + +mixin altcha_widget() + if ALTCHA + altcha-widget(challengeurl="/altcha-challenge" hidelogo hidefooter auto="onsubmit" style="--altcha-border-radius:0") + mixin social(title,description,game) meta(property="og:title" content=title) meta(property="og:type" content="website") @@ -78,7 +86,10 @@ mixin gamelist(list,hide_title=0) case item.status when 0 - a(class="command" href=`/join/${item.game_id}`) Join + if item.is_match + a(class="command" href="/join/"+item.game_id) Wait + else + a(class="command" href="/join/"+item.game_id) Join when 1 if !item.is_ready a(class="command" href="/join/"+item.game_id) Join @@ -98,7 +109,16 @@ mixin gamelist(list,hide_title=0) else a(class="command" href=`/${item.title_id}/play.html?game=${item.game_id}`) Review when 3 - | Archived + if ENABLE_ARCHIVE + if item.is_yours + if item.your_role + a(class="command" href=`/${item.title_id}/play.html?game=${item.game_id}&role=${encodeURIComponent(item.your_role)}`) Archived + else + a(class="command" href="/join/"+item.game_id) Archived + else + a(class="command" href=`/${item.title_id}/play.html?game=${item.game_id}&role=Observer`) Archived + else + | Archived div.game_main div.game_info @@ -185,12 +205,8 @@ mixin tourlist(seeds, pools, fin) if (seeds && seeds.length > 0) || (pools && pools.length > 0) || (fin && fin.length > 0) h2 Tournaments div.tour_list - if seeds && seeds.length > 0 - div - +seedlist(seeds, "Registrations") - if pools && pools.length > 0 - div - +poollist(pools, "Active", TM_ICON_ACTIVE) - if fin && fin.length > 0 - div - +poollist(fin, "Finished", TM_ICON_FINISHED) + div + +seedlist(seeds, "Registrations") + +poollist(pools, "Active", TM_ICON_ACTIVE) + div + +poollist(fin, "Finished", TM_ICON_FINISHED) |