[git] gnupg-doc - branch, master, updated. 8692682e2cfb5ebd4a3671a2c87aff2fcc392ade

by Marcus Brinkmann cvs at cvs.gnupg.org
Wed Jun 7 11:53:13 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, master has been updated
       via  8692682e2cfb5ebd4a3671a2c87aff2fcc392ade (commit)
      from  8f84be9c0dd8a305ca14d3a29a13369ce0ce33d9 (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 8692682e2cfb5ebd4a3671a2c87aff2fcc392ade
Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Date:   Wed Jun 7 11:28:33 2017 +0200

    web: Better votd handling.

diff --git a/web/donate/index.de.org b/web/donate/index.de.org
index c7a1ed6..8ad986a 100644
--- a/web/donate/index.de.org
+++ b/web/donate/index.de.org
@@ -213,9 +213,9 @@ href="/cgi-bin/procdonate.cgi?mode=preset&lang=de"
 	  <div class="row">
 	    <div class="col-lg-10 col-lg-offset-0">
 	      <div class="embed-responsive embed-responsive-16by9 camp-video"
-		   data-embed="andre,alex,benjamin"
+		   data-embed="votd"
                    data-embed-list="PLjX3x3GHoOWKs-VCjFBu_Yk5l1-l9mJzi">
-		<img src="/share/campaign/img/thumbs/andre.jpg">
+		<img src="/share/campaign/img/thumbs/votd.jpg">
 		<div class="play-button"></div>
 		<div class="video-text">Klicken um das Video zu starten
 		  <noscript><br />
diff --git a/web/donate/index.fr.org b/web/donate/index.fr.org
index d370bc2..3cae60b 100644
--- a/web/donate/index.fr.org
+++ b/web/donate/index.fr.org
@@ -206,9 +206,9 @@
 	  <div class="row">
 	    <div class="col-lg-10 col-lg-offset-0">
 	      <div class="embed-responsive embed-responsive-16by9 camp-video"
-		   data-embed="benjamin,alex,andre"
+		   data-embed="votd"
                    data-embed-list="PLjX3x3GHoOWKs-VCjFBu_Yk5l1-l9mJzi">
-		<img src="/share/campaign/img/thumbs/benjamin.jpg">
+		<img src="/share/campaign/img/thumbs/votd.jpg">
 		<div class="play-button"></div>
 		<div class="video-text">Cliquez pour lancer la vidéo
                   <noscript><br />
diff --git a/web/donate/index.ja.org b/web/donate/index.ja.org
index 7e5547b..cce9aa2 100644
--- a/web/donate/index.ja.org
+++ b/web/donate/index.ja.org
@@ -196,9 +196,9 @@
 	  <div class="row">
 	    <div class="col-lg-10 col-lg-offset-0">
 	      <div class="embed-responsive embed-responsive-16by9 camp-video"
-		   data-embed="alex,andre,benjamin"
+		   data-embed="votd"
                    data-embed-list="PLjX3x3GHoOWKs-VCjFBu_Yk5l1-l9mJzi">
-		<img src="/share/campaign/img/thumbs/qmuXUVg9Mjo.jpg">
+		<img src="/share/campaign/img/thumbs/votd.jpg">
 		<div class="play-button"></div>
 		<div class="video-text">クリックして動画をスタート
                   <noscript><br />
diff --git a/web/donate/index.org b/web/donate/index.org
index cc957d7..193c963 100644
--- a/web/donate/index.org
+++ b/web/donate/index.org
@@ -205,9 +205,9 @@
 	  <div class="row">
 	    <div class="col-lg-10 col-lg-offset-0">
 	      <div class="embed-responsive embed-responsive-16by9 camp-video"
-		   data-embed="alex,andre,benjamin"
+		   data-embed="votd"
                    data-embed-list="PLjX3x3GHoOWKs-VCjFBu_Yk5l1-l9mJzi">
-		<img src="/share/campaign/img/thumbs/alex.jpg">
+		<img src="/share/campaign/img/thumbs/votd.jpg">
 		<div class="play-button"></div>
 		<div class="video-text">Click to start the video
                   <noscript><br />
diff --git a/web/share/campaign/campaign.js b/web/share/campaign/campaign.js
index f158b5f..6cecf8b 100644
--- a/web/share/campaign/campaign.js
+++ b/web/share/campaign/campaign.js
@@ -88,8 +88,11 @@ function get_param_from_url(name) {
 /* Defer loading Youtube iframe until the user clicks on the video.  */
 $(document).ready(function() {
 
+    // VOTD: Update VOTD here.
+    let VIDLIST = "thenmozhi,alex,andre,benjamin";
+
     let YTID = { "main": "wNHhkntqklg",
-		 "thenmozhi": "2V-6JdTsIns",
+		 "thenmozhi": "sQMj332dgIE",
 		 "sze": "tKPMof5ptc0",
 		 "sheera": "zwPaVA4vhDM",
 		 "seanus": "H6iO_MkOICM",
@@ -116,12 +119,17 @@ $(document).ready(function() {
 
     let wanted_yt_id = get_param_from_url('play');
     $(".camp-video").each(function() {
-	let yt_ids = $(this).data("embed").split(",");
+	let embed = $(this).data("embed");
+	if (embed != 'votd') {
+	    return;
+	}
+	let yt_ids = VIDLIST.split(",");
 	let yt_id_idx = yt_ids.indexOf(wanted_yt_id);
-	if (yt_id_idx != -1) {
-	    $(this).data("embed", wanted_yt_id);
-	    $(this).children("img").attr("src", "/share/campaign/img/thumbs/" + wanted_yt_id + ".jpg");
+	if (yt_id_idx == -1) {
+	    wanted_yt_id = yt_ids[0];
 	}
+	$(this).data("embed", wanted_yt_id);
+	$(this).children("img").attr("src", "/share/campaign/img/thumbs/" + wanted_yt_id + ".jpg");
     });
 
     /* To download the thumbs in share/campaign/img/thumbs:
@@ -129,7 +137,11 @@ $(document).ready(function() {
 
     /* Click handler for all videos.  */
     $(".camp-video").one("click", function() {
-	let yt_id = $(this).data("embed").split(",")[0];
+	let embed = $(this).data("embed");
+	if (embed == 'votd') {
+	    embed = VIDLIST;
+	}
+	let yt_id = embed.split(",")[0];
 	yt_id = YTID[yt_id]; // What if key does not exist?
 	let yt_list = $(this).data("embed-list");
 	let extra_parms = "";
diff --git a/web/share/campaign/img/thumbs/votd.jpg b/web/share/campaign/img/thumbs/votd.jpg
new file mode 100644
index 0000000..049e477
Binary files /dev/null and b/web/share/campaign/img/thumbs/votd.jpg differ

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

Summary of changes:
 web/donate/index.de.org                |   4 ++--
 web/donate/index.fr.org                |   4 ++--
 web/donate/index.ja.org                |   4 ++--
 web/donate/index.org                   |   4 ++--
 web/share/campaign/campaign.js         |  24 ++++++++++++++++++------
 web/share/campaign/img/thumbs/votd.jpg | Bin 0 -> 48778 bytes
 6 files changed, 26 insertions(+), 14 deletions(-)
 create mode 100644 web/share/campaign/img/thumbs/votd.jpg


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




More information about the Gnupg-commits mailing list