summaryrefslogtreecommitdiffstats
path: root/donate/index.html
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2019-01-05 21:41:18 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2019-01-05 21:41:18 +0100
commitfc511625fde0ef9df3000e469401b3317f650d9f (patch)
treeb8bf90703ae2f641cc248611556d5e4d903ba9a3 /donate/index.html
parent9e8ceefb48b78306344528a8e203abd9d8912980 (diff)
downloadcalcurse.org-fc511625fde0ef9df3000e469401b3317f650d9f.tar.gz
calcurse.org-fc511625fde0ef9df3000e469401b3317f650d9f.zip
Add donations page and improve mobile layout
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'donate/index.html')
-rw-r--r--donate/index.html126
1 files changed, 126 insertions, 0 deletions
diff --git a/donate/index.html b/donate/index.html
new file mode 100644
index 0000000..88672f1
--- /dev/null
+++ b/donate/index.html
@@ -0,0 +1,126 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>calcurse.org</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+ <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
+ <script type="text/javascript" src="/js/lightbox.js"></script>
+ <script type="text/javascript" src="https://checkout.stripe.com/checkout.js"></script>
+
+ <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
+ <link rel="stylesheet" type="text/css" href="/css/style.css" media="all" />
+ <link rel="stylesheet" type="text/css" href="/css/lightbox.css" media="screen" />
+ </head>
+
+ <body>
+ <div id="header" class="typeface-js">
+ <a href="/"><img src="/images/logo.png" alt="calcurse" /></a>
+ <ul>
+ <li><a href="/">About</a></li>
+ <li><a href="/downloads">Downloads</a></li>
+ <li><a href="/support">Support</a></li>
+ <li><a href="/devel">Development</a></li>
+ <li><a href="/donate" class="current">Donate</a></li>
+ </ul>
+ <p style="clear:both;"></p>
+ </div>
+ <div id="contents">
+<h1>Donations</h1>
+<p>
+ There are different ways to support calcurse development. If you are a
+ programmer, one of the best ways to contribute is to <a href="/devel">submit
+ patches</a> fixing bugs, adding features or improving overall code quality.
+</p>
+<p>
+ We are also extremely grateful for donations which help us continue
+ developing calcurse as open source software and are used to cover recurring
+ costs, such as for our servers.
+</p>
+<p>
+ We use <a href="https://stripe.com/checkout/">Stripe Checkout</a> to process
+ payments. The Stripe Checkout payment form requires a modern browser with
+ JavaScript support. If you would like to make a donation but do not want to
+ use Stripe, feel free to contact us at <tt>&lt;donations at calcurse dot
+ org&gt;</tt>. This email address can also be used if you have any questions
+ regarding the donation process.
+</p>
+<p>
+ Use one of the following links to donate...
+</p>
+<ul class="donate">
+ <li><a href="javascript:openHandler(10, 'eur')">10&euro;</a></li>
+ <li><a href="javascript:openHandler(20, 'eur')">20&euro;</a></li>
+ <li><a href="javascript:openHandler(50, 'eur')">50&euro;</a></li>
+ <li><a href="javascript:openHandler(100, 'eur')">100&euro;</a></li>
+ <li><a href="javascript:openHandler(10, 'usd')">$10</a></li>
+ <li><a href="javascript:openHandler(20, 'usd')">$20</a></li>
+ <li><a href="javascript:openHandler(50, 'usd')">$50</a></li>
+ <li><a href="javascript:openHandler(100, 'usd')">$100</a></li>
+ <li id="donate-custom"><a href="javascript:customHandler()">Custom</a></li>
+</ul>
+<div id="donate-status"></div>
+
+<script>
+var amount = 0;
+var handler = StripeCheckout.configure({
+ image: 'https://calcurse.org/images/logo-emblem.png',
+ key: (location.search == '?test') ? 'pk_test_zNePe3wvpZ65O3nEeFq4QL2j' : 'pk_live_g0aFHViGhTkfSSCFmDCr5UI8',
+ locale: 'auto',
+ token: function(token) {
+ $.ajax({
+ type: "POST",
+ url: "/stripe",
+ data: { "token": token.id, "email": token.email, "amount": amount, "currency": token.currency, "test": (location.search == '?test') },
+ success: function(data) {
+ if (data.success) {
+ $("#donate-status").html('<h2>Thank you for your donation!</h2>');
+ } else {
+ $("#donate-status").html('<h2></h2><p class="error">There has been an error, and you have not been charged. Please try again or send an email to <tt>&lt;donations at calcurse dot org&gt;</tt>.');
+ $("#donate-status h2").text(data.message);
+ }
+ },
+ error: function(jqXHR, msg, err) {
+ $("#donate-status").html('<h2></h2><p class="error">There has been an error, and you have not been charged. Please try again or send an email to <tt>&lt;donations at calcurse dot org&gt;</tt>.');
+ $("#donate-status h2").text(msg + ", " + err);
+ }
+ });
+ }
+});
+
+function openHandler(val, currency) {
+ if (val == 0) {
+ val = Number($("input[name=donate-amount]").val());
+ val = Math.max(val, 5);
+ $("input[name=donate-amount]").val(val);
+ currency = $("select[name=donate-currency]").val();
+ }
+ amount = (val * 100) | 0;
+ handler.open({
+ name: 'Donation',
+ description: 'Support calcurse Development',
+ currency: currency,
+ amount: amount,
+ allowRememberMe: false
+ });
+}
+
+function customHandler() {
+ $("#donate-custom").html('<input name="donate-amount" type="number" min="5" /> <select name="donate-currency"> <option value="eur">&euro;</option> <option value="usd">USD</option> </select> <a href="javascript:openHandler(0)">Donate</a>');
+ $("input[name=donate-amount]").focus();
+}
+
+window.addEventListener('popstate', function() {
+ handler.close();
+});
+</script>
+ </div>
+ <div id="footer">
+ Copyright &copy; 2012-2018 <a href="/support/#devs">calcurse Development Team</a>.
+ Licensed under the terms of the BSD License.
+ </div>
+ </body>
+</html>