diff --git a/web/donate/donate.org b/web/donate/donate.org index cdd50b5..0970631 100644 --- a/web/donate/donate.org +++ b/web/donate/donate.org @@ -1,230 +1,231 @@ # -*- html -*- #+TITLE: GnuPG - Donate #+STARTUP: showall #+SETUPFILE: "../share/setup.inc" # # Note: Do not use relative links because this page is also used as a # template from cgi-bin/. Using https://www.gnupg.org/... is # fine as it is stripped before publishing. #+BEGIN_HTML

Support GnuPG

To process your donation we need to collect some information. This information is only used for the purpose of the donation and no data will ever be send to any entity not directly involved in the donation process. Not giving a name makes the donation “anonymous” in that the name won’t be listed on the public thank you page.

-
+
500 € + class="btn btn-default amount-btn-500">500 € 200 € + class="btn btn-default amount-btn-200">200 € 100 € + class="btn btn-default amount-btn-100">100 € 50 € + class="btn btn-default amount-btn-50">50 € 20 € + class="btn btn-default amount-btn-20">20 € 10 € + class="btn btn-default amount-btn-10">10 € 5 € + class="btn btn-default amount-btn-5">5 €
Suggested amounts.
If you want to be listed on the list of donors, please enter your name as it shall appear there.
In case of payment problems we may want to contact you, thus please enter your e-mail address.
If you want to leave a message for us, please enter it here.
#+END_HTML diff --git a/web/share/campaign/campaign.js b/web/share/campaign/campaign.js index fd3c23c..ffba06f 100644 --- a/web/share/campaign/campaign.js +++ b/web/share/campaign/campaign.js @@ -1,57 +1,70 @@ /* For mobile devices in landscape orientation, the navbar is in the way of the video. So hide it automatically then. */ $(document).ready(function() { - $(".navbar-fixed-top").autoHidingNavbar({ - disableAutohide: true, - hideOffset: 20 - }); - check_autohide = function(event) { - let hide = (screen.width < 768) && (screen.height < screen.width); - $(".navbar-fixed-top").autoHidingNavbar("setDisableAutohide", !hide); - if (!hide) { - $(".navbar-fixed-top").autoHidingNavbar("show"); - } - }; - $(window).on('orientationchange', check_autohide); - check_autohide(); + $(".navbar-fixed-top").autoHidingNavbar({ + disableAutohide: true, + hideOffset: 20 + }); + check_autohide = function(event) { + let hide = (screen.width < 768) && (screen.height < screen.width); + $(".navbar-fixed-top").autoHidingNavbar("setDisableAutohide", !hide); + if (!hide) { + $(".navbar-fixed-top").autoHidingNavbar("show"); + } + }; + $(window).on('orientationchange', check_autohide); + check_autohide(); }); - +/* Random starting points for the testimonial carousel. */ $(document).ready(function() { - let nr_items_lg = 3 * $("#myCarousel div.item").length; - let nr_items_md = 2 * $("#myCarouselMedium div.item").length; - let nr_items_xs = 1 * $("#myCarouselSmall div.item").length; - let nr_items = Math.min(nr_items_lg, nr_items_md, nr_items_xs); + let nr_items_lg = 3 * $("#myCarousel div.item").length; + let nr_items_md = 2 * $("#myCarouselMedium div.item").length; + let nr_items_xs = 1 * $("#myCarouselSmall div.item").length; + let nr_items = Math.min(nr_items_lg, nr_items_md, nr_items_xs); - let active_item = Math.trunc(nr_items * Math.random()); + let active_item = Math.trunc(nr_items * Math.random()); - let active_slide_lg = Math.trunc(active_item / 3); - let active_slide_md = Math.trunc(active_item / 2); - let active_slide_xs = Math.trunc(active_item / 1); + let active_slide_lg = Math.trunc(active_item / 3); + let active_slide_md = Math.trunc(active_item / 2); + let active_slide_xs = Math.trunc(active_item / 1); - $("#myCarousel div.item").removeClass("active"); - $("#myCarouselMedium div.item").removeClass("active"); - $("#myCarouselSmall div.item").removeClass("active"); + $("#myCarousel div.item").removeClass("active"); + $("#myCarouselMedium div.item").removeClass("active"); + $("#myCarouselSmall div.item").removeClass("active"); - $("#myCarousel div.item").eq(active_slide_lg).addClass("active"); - $("#myCarouselMedium div.item").eq(active_slide_md).addClass("active"); - $("#myCarouselSmall div.item").eq(active_slide_xs).addClass("active"); + $("#myCarousel div.item").eq(active_slide_lg).addClass("active"); + $("#myCarouselMedium div.item").eq(active_slide_md).addClass("active"); + $("#myCarouselSmall div.item").eq(active_slide_xs).addClass("active"); }); +/* Advance carousel by swiping. */ $(document).ready(function() { - $('.carousel').bcSwipe({ threshold: 50 }); + $('.carousel').bcSwipe({ threshold: 50 }); }); +/* Defer loading Youtube iframe until the user clicks on the video. */ +$(document).ready(function() { + /* For the video preview, we use this for devices without hover events. */ + if ("ontouchstart" in document.documentElement) { + $("body").addClass("touch"); + } + /* Click handler for all videos. */ + $(".camp-video").one("click", function() { + let yt_id = $(this).data("embed"); + $(this).html(''); + }); +}); + +/* Fill donation amounts w/ javascript if possible. */ $(document).ready(function() { - /* For the video preview, we use this for devices without hover events. */ - if ("ontouchstart" in document.documentElement) { - $("body").addClass("touch"); - } + let vals = ["500", "200", "100", "50", "10", "5"]; - /* Click handler for all videos. */ - $(".camp-video").one("click", function() { - let yt_id = $(this).data("embed"); - $(this).html(''); + for (let value of vals) { + $(".amount-btn-" + value.toString()).attr("href","#"); + $(".amount-btn-" + value.toString()).one("onclick",function() { + $("#amountother").attr("value",value.toString()); }); + } });