[git] gnupg-doc - branch, preview, updated. 34df709ae272a8acb7a59b8414234cae2d360126

by Kai Michaelis cvs at cvs.gnupg.org
Wed May 17 15:03:09 CEST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GnuPG website and other docs".

The branch, preview has been updated
       via  34df709ae272a8acb7a59b8414234cae2d360126 (commit)
       via  a16f4a52ecc5f629b3aaf4255fbe3e93e07b5a5f (commit)
      from  0b95dcb511721a4fcb64a7f2e5de9d901741dcd9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 34df709ae272a8acb7a59b8414234cae2d360126
Author: Kai Michaelis <kai at gnupg.org>
Date:   Wed May 17 15:04:53 2017 +0200

    campaign: js for prefilling donation page

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
@@ -94,21 +94,22 @@
       <!-- Custom amounts -->
       <div class="form-group">
         <div class="col-md-offset-2 col-md-6">
-          <div class="btn-group btn-group-xs" role="group" aria-label="suggested amounts">
+          <div class="btn-group btn-group-xs" role="group"
+               aria-label="suggested amounts">
             <a href="/cgi-bin/procdonate.cgi?mode=preset&s_amt=500&s_cur=eur"
-               class="btn btn-default">500&#x202f;€</a>
+               class="btn btn-default amount-btn-500">500&#x202f;€</a>
             <a href="/cgi-bin/procdonate.cgi?mode=preset&s_amt=200&s_cur=eur"
-               class="btn btn-default">200&#x202f;€</a>
+               class="btn btn-default amount-btn-200">200&#x202f;€</a>
             <a href="/cgi-bin/procdonate.cgi?mode=preset&s_amt=100&s_cur=eur"
-               class="btn btn-default">100&#x202f;€</a>
+               class="btn btn-default amount-btn-100">100&#x202f;€</a>
             <a href="/cgi-bin/procdonate.cgi?mode=preset&s_amt=50&s_cur=eur"
-               class="btn btn-default">50&#x202f;€</a>
+               class="btn btn-default amount-btn-50">50&#x202f;€</a>
             <a href="/cgi-bin/procdonate.cgi?mode=preset&s_amt=20&s_cur=eur"
-               class="btn btn-default">20&#x202f;€</a>
+               class="btn btn-default amount-btn-20">20&#x202f;€</a>
             <a href="/cgi-bin/procdonate.cgi?mode=preset&s_amt=10&s_cur=eur"
-               class="btn btn-default">10&#x202f;€</a>
+               class="btn btn-default amount-btn-10">10&#x202f;€</a>
             <a href="/cgi-bin/procdonate.cgi?mode=preset&s_amt=5&s_cur=eur"
-               class="btn btn-default">5&#x202f;€</a>
+               class="btn btn-default amount-btn-5">5&#x202f;€</a>
           </div>
           <span class="help-block">
             Suggested amounts.
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('<iframe class="embed-responsive-item" allowfullscreen src="https://www.youtube.com/embed/' + yt_id + '?autoplay=1&rel=0"></iframe>');
+  });
+});
+
+/* 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('<iframe class="embed-responsive-item" allowfullscreen src="https://www.youtube.com/embed/' + yt_id + '?autoplay=1&rel=0"></iframe>');
+  for (let value of vals) {
+    $(".amount-btn-" + value.toString()).attr("href","#");
+    $(".amount-btn-" + value.toString()).one("onclick",function() {
+      $("#amountother").attr("value",value.toString());
     });
+  }
 });

commit a16f4a52ecc5f629b3aaf4255fbe3e93e07b5a5f
Author: Kai Michaelis <kai at gnupg.org>
Date:   Wed May 17 14:39:24 2017 +0200

    campaign: fix identation

diff --git a/web/donate/donate.org b/web/donate/donate.org
index e6a5c1a..cdd50b5 100644
--- a/web/donate/donate.org
+++ b/web/donate/donate.org
@@ -9,16 +9,16 @@
 
 #+BEGIN_HTML
 <!--custom-page-->  <!-- this disables all standard processing. -->
-	<!-- bootstrap core and site css -->
-	<link href="/share/3rdparty/bootstrap/bootstrap-gnupg.css" rel="stylesheet">
-	<link href="/share/campaign/campaign.css" rel="stylesheet">
+  <!-- bootstrap core and site css -->
+  <link href="/share/3rdparty/bootstrap/bootstrap-gnupg.css" rel="stylesheet">
+  <link href="/share/campaign/campaign.css" rel="stylesheet">
 
-	<script defer src="/share/3rdparty/jquery/jquery.min.js"></script>
-	<script defer src="/share/3rdparty/bootstrap/bootstrap.min.js"></script>
-	<script defer src="/share/3rdparty/bootstrap/carousel.js"></script>
-	<script defer src="/share/3rdparty/bs-autohidingnavbar.js"></script>
-	<script defer src="/share/3rdparty/bcswipe.js"></script>
-	<script defer src="/share/campaign/campaign.js"></script>
+  <script defer src="/share/3rdparty/jquery/jquery.min.js"></script>
+  <script defer src="/share/3rdparty/bootstrap/bootstrap.min.js"></script>
+  <script defer src="/share/3rdparty/bootstrap/carousel.js"></script>
+  <script defer src="/share/3rdparty/bs-autohidingnavbar.js"></script>
+  <script defer src="/share/3rdparty/bcswipe.js"></script>
+  <script defer src="/share/campaign/campaign.js"></script>
 
 </head>
 <body lang="en">
@@ -28,15 +28,15 @@
 
       <div class="navbar-header">
         <button type="button" class="navbar-toggle collapsed"
-				        data-toggle="collapse" data-target="#navbar"
-								aria-expanded="false" aria-controls="navbar">
+                data-toggle="collapse" data-target="#navbar"
+                aria-expanded="false" aria-controls="navbar">
           <span class="sr-only">Toggle navigation</span>
           <span class="icon-bar"></span>
           <span class="icon-bar"></span>
           <span class="icon-bar"></span>
         </button>
         <img class="navbar-brand" alt="GnuPG"
-				     src="/share/gnupg-lock-white-250x250.png">
+             src="/share/gnupg-lock-white-250x250.png">
       </div>
 
       <div id="navbar" class="navbar-collapse collapse">

-----------------------------------------------------------------------

Summary of changes:
 web/donate/donate.org          | 41 ++++++++++----------
 web/share/campaign/campaign.js | 87 ++++++++++++++++++++++++------------------
 2 files changed, 71 insertions(+), 57 deletions(-)


hooks/post-receive
-- 
The GnuPG website and other docs
http://git.gnupg.org




More information about the Gnupg-commits mailing list