blob: 911def4daed5de8e3d1b3b24936dd5ff9c81931d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
//- vim:ts=4:sw=4:
meta(name="viewport" content="width=device-width,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 gamelist(list,status,hide_title=0)
div.game_list(class=status)
each item in list
div
div.game_item(class=item.your_turn ? "your_turn" : "")
div.game_head
if item.scenario.length <= 2
div
| <a href="/join/#{item.game_id}">#{item.game_id}</a> –
| <a href="/#{item.title_id}">#{item.title_name}</a>
| (#{item.scenario})
else
div
| <a href="/join/#{item.game_id}">#{item.game_id}</a> –
| <a href="/#{item.title_id}">#{item.title_name}</a>
if item.status === 0 || !item.is_ready
a(class="command" href=`/join/${item.game_id}`) Join
else
if item.is_yours
- let verb = (item.status > 1) ? "Review" : "Play"
if item.your_role
a(class="command" href=`/${item.title_id}/play:${item.game_id}:${item.your_role}`)= verb
else
a(class="command" href="/join/"+item.game_id)= verb
else
- let verb = (item.status > 1) ? "Review" : "View"
a(class="command" href=`/${item.title_id}/play:${item.game_id}`)= verb
div.game_main
div.game_info
if item.description
i= item.description
if item.scenario !== "Standard" && item.scenario !== "Historical" && item.scenario.length > 2
div Scenario: #{item.scenario}
unless item.human_options === "None"
div Options: #{item.human_options}
if item.player_names
div Players: !{item.player_names}
else
div Players: <span class="error">Nobody</span>
case item.status
when 0
div Created: #{item.ctime}
when 1
div Changed: #{item.mtime}
when 2
div Finished: #{item.mtime}
div Result: !{item.result}
unless hide_title
img(src=`/${item.title_id}/thumbnail.jpg`)
|