storj/web/marketing/pages/free-offers.html

61 lines
2.4 KiB
HTML

<!-- Copyright (C) 2019 Storj Labs, Inc.
See LICENSE for copying information. -->
{{define "freeOffers"}}
<div class="offers-table mt-2 mb-5 container">
<div class="row">
<div class="col col-heading">Name</div>
<div class="col col-heading">Give Credit</div>
<div class="col col-heading">Redeemable Capacity</div>
<div class="col col-heading">Created</div>
<div class="col col-heading">Expiration</div>
<div class="col col-heading">Status</div>
</div><hr>
<div class="row offer-heading ">
<p class="offer-type">Default&nbsp;Offer</p>
</div>
{{$defaultOffer := .FreeCredits.Default}}
{{if not $defaultOffer.IsEmpty}}
<div class="row data-row">
<div class="col ml-3">{{$defaultOffer.Name}}</div>
<div class="col">${{$defaultOffer.InviteeCredit}}</div>
<div class="col">{{$defaultOffer.RedeemableCap}}</div>
<div class="col">{{printf "%.10s" $defaultOffer.CreatedAt}}</div>
<div class="col">{{printf "%.10s" $defaultOffer.ExpiresAt}}</div>
<div class="col"></div>
</div><hr>
{{end}}
<div class="row offer-heading ">
<p class="offer-type">Current&nbsp;Offer</p>
</div>
{{$currentOffer := .FreeCredits.Active}}
{{if not $currentOffer.IsEmpty}}
<div class="row data-row">
<div class="col ml-3">{{$currentOffer.Name}}</div>
<div class="col">${{$currentOffer.InviteeCredit}}</div>
<div class="col">{{$currentOffer.RedeemableCap}}</div>
<div class="col">{{printf "%.10s" $currentOffer.CreatedAt}}</div>
<div class="col">{{printf "%.10s" $currentOffer.ExpiresAt}}</div>
<div class="col stop-offer">
<span data-toggle="modal" data-target=".stop-free-credit-modal">
<strong>Live &#183;</strong>
</span>
</div>
</div><hr>
{{end}}
{{template "stopFreeCredit" .}}
<div class="row offer-heading ">
<p class="offer-type">Discontinued&nbsp;Offers</p>
</div>
{{range .FreeCredits.Done}}
<div class="row data-row">
<div class="col ml-3">{{.Name}}</div>
<div class="col">${{.InviteeCredit}}</div>
<div class="col">{{.RedeemableCap}}</div>
<div class="col">{{printf "%.10s" .CreatedAt}}</div>
<div class="col">{{printf "%.10s" .ExpiresAt}}</div>
<div class="col">off</div>
</div><hr>
{{end}}
</div>
{{end}}