fosspay/templates/index.html

140 lines
5.5 KiB
HTML

{% extends "layout.html" %}
{% block scripts %}
<script>
window.stripe_key = "{{ _cfg("stripe-publish") }}";
window.avatar = "{{ avatar }}";
window.your_name = "{{ _cfg("your-name") }}";
</script>
<script src="//checkout.stripe.com/checkout.js"></script>
<script src="static/index.js"></script>
{% endblock %}
{% block body %}
<div class="well">
<div class="container">
<h1>Donate to {{ _cfg("your-name") }}</h1>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<p>
Donations accumulate until there's enough to fund one week of
full time development. The project you specify influences which
projects receive the most time. Each donated-to project will
receive attention, even if there's just one donation for it.
Monthly donations will help me keep doing this for a long time,
but one-offs are also great.
</p>
</div>
</div>
</div>
</div>
<noscript>
<div class="container">
<div class="alert alert-danger">
<p>This page requires Javascript. It's necessary to send your credit card number to
<a href="https://stripe.com/">Stripe</a> directly, so you don't need to trust me with it.</p>
</div>
</div>
</noscript>
<div class="container text-center hidden" id="thanks">
{% include "post-donation-message.html" %}
<div id="new-donor-password" class="hidden">
<p>Set a password now if you want to manage your donations later:</p>
<input type="password" placeholder="Password" />
<button class="btn btn-primary btn-sm">Submit</button>
</div>
</div>
<div class="container text-center" id="donation-stuff">
<h3>How much?</h3>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="btn-group btn-group-justified amounts" role="group" aria-label="...">
<div class="btn-group" role="group">
<button data-amount="5" type="button" class="btn btn-default">$5</button>
</div>
<div class="btn-group" role="group">
<button data-amount="10" type="button" class="btn btn-default active">$10</button>
</div>
<div class="btn-group" role="group">
<button data-amount="20" type="button" class="btn btn-default">$20</button>
</div>
<div class="btn-group" role="group">
<button data-amount="50" type="button" class="btn btn-default">$50</button>
</div>
<div class="btn-group" role="group">
<button data-amount="custom" type="button" class="btn btn-default">Custom</button>
</div>
</div>
</div>
</div>
<div class="row hidden" id="custom-amount" style="margin-top: 20px;">
<div class="col-md-4 col-md-offset-4">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">$</span>
<input id="custom-amount-text" type="text" value="1"
class="form-control" placeholder="Amount" />
</div>
</div>
</div>
</div>
<h3>How often?</h3>
<div class="row">
<div class="col-md-4 col-md-offset-4">
<p class="text-muted"><small>Bitcoin is only supported for one-time donations.</small></p>
<div class="form-group">
<div class="btn-group btn-group-justified frequencies" role="group" aria-label="...">
<div class="btn-group" role="group">
<button data-frequency="once" type="button"
class="btn btn-default">Once</button>
</div>
<div class="btn-group" role="group">
<button data-frequency="monthly" type="button"
class="btn btn-default active">Monthly</button>
</div>
</div>
</div>
</div>
</div>
{% if len(projects) > 1 %}
<h3>What project?</h3>
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div class="form-group">
<select id="project" class="form-control">
<option value="null">None in particular</option>
{% for project in projects %}
<option value="{{ project.id }}">{{ project.name }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div class="form-group">
<input type="text" id="comments" class="form-control" placeholder="Any comments?" />
</div>
</div>
</div>
<div class="row" style="margin-top: 50px">
<div class="col-md-4 col-md-offset-4">
<button class="btn btn-block btn-success" id="donate-button">Donate</button>
</div>
</div>
</div>
<hr />
<div class="container text-center">
<p>
<small class="text-muted">
Been here before? <a href="/login">Log in</a> to view your donation
history, edit recurring donations, and so on.
</small>
</p>
<p>
<small class="text-muted">
Powered by <a href="https://github.com/SirCmpwn/fosspay">fosspay</a>.
</small>
</p>
</div>
{% endblock %}