-
Notifications
You must be signed in to change notification settings - Fork 3
/
cap.html
49 lines (48 loc) · 1.78 KB
/
cap.html
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
{{- $discounts := DB_DiscountOffers -}}
<section id="cap">
<p>
<small>Currently outstanding workload / cap:</small>
<span class="amount confirmed">{{HTML_Currency .Outstanding}}</span>
{{if .Incoming}}<small>
+ <span class="amount incoming">
{{HTML_Currency .Incoming}} unconfirmed
</span>
</small>{{end}}{{if .Reserved}}<small>
+ <span class="amount reserved">
{{HTML_Currency .Reserved}} reserved for discounts
</span>
</small>{{end}}
out of
<span class="amount">{{HTML_Currency .Cap}}</span>
</p>
<div class="meter"><div
style="{{CSS_Meter 100}} width: {{ .FracOutstanding}}%"></div><div
style="{{CSS_Meter 0}} width: {{ .FracIncoming}}%"></div><div
style="{{CSS_Meter 50}} width: {{ .FracReserved}}%"></div
></div>{{- if .Reached -}}<p class="desc">
Currently sold out, please check back after the next delivery.<br />
In the meantime, you can <a href="/donate">donate</a>.
</p>{{- else if not .Ctx -}}<p>
Interested in contributing? Make sure you've read the <a href="/faq">
FAQ page</a>, and place your order there.
</p>{{- end -}}
<p class="desc">
Want to support translations? These are funded through
{{HTML_Emoji "opencollective"}} <a href="https://opencollective.com/thpatch">Touhou Patch Center</a>;
{{Blog_PostLink "2023-07-28" "check the announcement for more info"}}!
</p>
{{if len $discounts -}}<hr style="width: 100%;" />
<small>Current discounts:</small>
<ul class="discounts">{{range $discounts -}}
<li>
<strong>{{HTML_FloatMaxPrec (pct .FractionCovered) 0}}%
(= {{HTML_Currency .PushpriceRemaining}} per push)</strong>,
offered by {{DB_CustomerByID .Sponsor}} for the following goals:
<ul>{{range .Goals -}}
<li>{{.}}</li>
{{- end}}</ul>
{{.Ad}}
</li>{{- end}}</ul>
{{- end}}
</section>
<hr />