forked from walkingeyerobot/r38
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraft.tmpl
82 lines (81 loc) · 2.26 KB
/
draft.tmpl
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
<!doctype html>
<html>
<head>
<title>not for ulb nope</title>
<link href="/static/favicon.png" rel="icon">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.card {
display: inline-block;
vertical-align: top;
margin-bottom: 1em;
}
</style>
</head>
<body>
<div>{{ .DraftName }}</div>
<div>Seat {{ .Position }}</div>
<hr/>
<div>Public Messages</div>
<ul>
{{ range .Revealed }}
<li>{{ . }}</li>
{{ end }}
</ul>
</div>
<hr/>
<div>
{{ define "cardname" }}
<div style="display:flex;align-items:center;">
<span style="margin-left: 4px;padding-bottom: 2px;">{{ . }}</span>
<a style="margin-left: 6px" href="https://scryfall.com/search?q=name:"{{.}}"&unique=cards"
><img width="16" height="16" src="/static/scryfall.png"></a>
</div>
{{ end }}
{{ if not .Pack }}
<div>no packs available</div>
{{ else }}
<div>current pack</div>
{{ range .Pack }}
<div class="card">
<a href="/pick/{{ .Id }}{{ $.ViewUrl }}">
<img src="/proxy/{{ .Edition }}/{{ .Number }}" height=300 />
</a>
{{template "cardname" .Name}}
{{ if .Tags }}
<div>({{ .Tags }})</div>
{{ end }}
</div>
{{ end }}
{{ end }}
<hr/>
{{ if not .Picks }}
<div>no picks yet</div>
{{ else }}
<div>previous picks - <a href="/pdf/{{ .DraftId }}{{ $.ViewUrl }}">print proxies</a> - <a href="/mtgo/{{ .DraftId }}{{ $.ViewUrl }}">export to mtgo</a></div>
{{ range .Picks }}
<div class="card">
<img src="/proxy/{{ .Edition }}/{{ .Number }}" height=300 />
{{template "cardname" .Name}}
{{ if .Tags }}
<div>({{ .Tags }})</div>
{{ end }}
</div>
{{ end }}
{{ end }}
<hr/>
<div>Powers</div>
{{ if not .Powers}}
<div>no powers available</div>
{{ else }}
{{ range .Powers }}
<div class="card">
<a href="/power/{{ .Id }}{{ $.ViewUrl }}">
<img src="/proxy/{{ .Edition }}/{{ .Number }}" height=300 />
</a>
<div>{{ .Name }}</div>
</div>
{{ end }}
{{ end }}
</body>
</html>