diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-11-20 19:47:08 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-11-21 12:48:15 +0100 |
commit | a1fe768c6d40c7c885db1c9843c61527cbe583e3 (patch) | |
tree | c397e7d6796049607d6348c538621d1e8809a847 /views/join.pug | |
parent | d1318d147297161691f5048e1f2cb4e516159144 (diff) | |
download | server-a1fe768c6d40c7c885db1c9843c61527cbe583e3.tar.gz |
Rewrite view templates to use Pug engine.
Diffstat (limited to 'views/join.pug')
-rw-r--r-- | views/join.pug | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/views/join.pug b/views/join.pug new file mode 100644 index 0000000..be95075 --- /dev/null +++ b/views/join.pug @@ -0,0 +1,58 @@ +//- vim:ts=4:sw=4: +doctype html +html + head + include head + title= game.title_name + style. + table { min-width: auto; } + th,td { min-width: 10em; } + table td a.red { text-decoration: none; color: brown; font-size: 14px; } + td a { text-decoration: underline; color: blue; } + .hide { display: none; } + script. + let game = !{ JSON.stringify(game) }; + let roles = !{ JSON.stringify(roles) }; + let players = !{ JSON.stringify(players) }; + let user_id = !{ user.user_id }; + let ready = !{ ready }; + script(src="/join.js") + body + include header + article + h1= game.title_name + if flash + p.error#error= flash + else + p.error#error + + a(href="/info/"+game.title_id): img.logo(src="/"+game.title_id+"/cover.jpg") + + p + if game.private + | Owner: #{game.owner_name} (private) + else + | Owner: #{game.owner_name} + br + | Scenario: #{game.scenario} + br + | Options: #{game.options} + + p= game.description || "No description." + + br(clear="left") + + p + table + tr + each role in roles + th.command(id="role_"+role.replace(/ /g, "_")+"_name")= role + tr + each role in roles + td.command(id="role_"+role.replace(/ /g, "_")) - + tr + td.command#message(colspan=roles.length) - + + p + button.hide#delete_button(onclick="confirm_delete()") Delete + button.hide#start_button(onclick=`javascript:send('/start/${game.game_id}')` disabled) Start |