Add banner and modal window
[fsf-giving-guide.git] / v12 / givingguide.html
index 5066489dded5718c31219b7fa1e678c27805ebc8..59d7b65bcd97f901a687dffc727981fdbe6de47e 100644 (file)
 
 <!-- Add banner and modal window here -->
 
+    <iframe src="//static.fsf.org/nosvn/banners/202206fundraiser/" scrolling="no"
+      style="width: 100%; height: 150px; display: block; margin: 0; border: 0 none; overflow: hidden;">
+    </iframe>
+
+            <!-- Begin fsf-modal-window-elem campaign element -->
+            <link type="text/css" rel="stylesheet" href="https://static.fsf.org/nosvn/fonts/fa/css/font-awesome.min.css">
+            <style>
+#fsf-modal-window-elem-container div {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+
+@media screen and (min-width: 700px) {
+  #fsf-modal-window-elem-outer-v-center {
+    display: table;
+    position: absolute;
+    height: 100%;
+    width: 100%;
+  }
+
+  #fsf-modal-window-elem-inner-v-center {
+    display: table-cell;
+    vertical-align: middle;
+  }
+
+  #fsf-modal-window-elem {
+    width: 687px;
+    margin-left: auto;
+    margin-right: auto;
+  }
+
+  #fsf-modal-window-elem-right-column {
+    float: right;
+    width: 280px;
+    padding-left: 20px;
+    color: #002047;
+  }
+
+  #fsf-modal-window-elem-left-column {
+    width: 100%;
+    float: left;
+    margin-right: -280px;
+  }
+
+  #fsf-modal-window-elem-text {
+    margin-right: 280px;
+  }
+}
+
+@media screen and (max-width: 699px) {
+  #fsf-modal-window-elem {
+    -ms-box-orient: horizontal;
+    display: -webkit-box;
+    display: -moz-box;
+    display: -ms-flexbox;
+    display: -moz-flex;
+    display: -webkit-flex;
+    display: flex;
+    -webkit-flex-flow: row wrap;
+    flex-flow: row wrap;
+  }
+
+  #fsf-modal-window-elem {
+    width: 80vw;
+    margin-left: 10vw;
+    margin-right: 10vw;
+    margin-top: 40px;
+    margin-bottom: 40px;
+  }
+
+  #fsf-modal-window-elem-right-column {
+    width: 100%;
+    order: 1;
+  }
+
+  #fsf-modal-window-elem-left-column {
+    width: 100%;
+    order: 2;
+  }
+
+  #fsf-modal-window-elem-text {
+    margin-top: 20px;
+  }
+}
+
+@media screen and (max-width: 360px) {
+  .long-button-text {
+    font-size: 25px !important;
+  }
+}
+
+#fsf-modal-window-elem-container {
+  position: fixed;
+  z-index: 10000;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  overflow: auto;
+  background-color: rgba(0,0,0,0.8);
+  font-weight: normal;
+}
+
+#fsf-modal-window-elem a, a:active, a:focus {
+  outline: none;
+  border-bottom: 0px;
+}
+
+#fsf-modal-window-elem {
+  overflow: auto;
+  padding: 20px;
+  border-style: solid;
+  border-width: 5px;
+  border-color: #b25ea8;
+  border-radius: 20px;
+  box-shadow: 0px 0px 10px #111111;
+  background-color: #e3d9e4;
+}
+
+#fsf-modal-window-elem-header {
+  width: 100%;
+}
+
+#fsf-modal-window-elem-header h2 {
+  font-family: sans-serif,"Helvetica",Arial;
+  font-weight: bold;
+  font-size: 24px;
+  color: #002047;
+  padding-bottom: 20px;
+  margin-top: 0px;
+  margin-bottom: 0px;
+  border: none;
+}
+
+#fsf-modal-window-elem-close-button {
+  float: right;
+  height: 40px;
+  margin-right: -20px;
+  margin-top: -20px;
+  padding: 11px;
+  color: #888;
+  cursor: pointer;
+}
+
+#fsf-modal-window-elem-close-button:hover {
+  color: #aaf;
+}
+
+#fsf-modal-window-elem-right-column {
+  text-align: center;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+}
+
+#fsf-modal-window-elem-buttons div {
+  height:53.333px;
+  line-height: 53.333px;
+  margin-left:auto;
+  margin-right:auto;
+  display:block;
+}
+
+#fsf-modal-window-elem-buttons a {
+  width: 100%;
+  display: block;
+  text-align: center;
+  font-size:35px;
+  color:#002047;
+  text-decoration: none;
+  font-family: sans-serif,"Helvetica",Arial;
+  font-weight: normal;
+}
+
+#fsf-modal-window-elem-maybe-later {
+  margin-top: 5px;
+  margin-bottom: -5px;
+}
+
+#fsf-modal-window-elem-maybe-later a {
+  color: #367c93;
+  line-height: 20px;
+  text-decoration: none;
+  cursor: pointer;
+  font-weight: normal;
+  font-family: sans-serif,"Helvetica",Arial;
+  font-size: 16px;
+}
+
+#fsf-modal-window-elem-text a {
+  color: #002047;
+  font-weight: 700;
+  text-decoration: none;
+}
+
+#fsf-modal-window-elem-text a:hover {
+  color: #fd8e1b;
+}
+
+#fsf-modal-window-elem-text a:focus {
+  color: #fd8e1b;
+}
+
+#fsf-modal-window-elem-text a:active {
+  color: #ffac30;
+}
+
+#fsf-modal-window-elem-text p {
+  font-family: sans-serif,"Helvetica",Arial;
+  font-size: 17px;
+  font-weight: normal;
+  margin: 0px 0px 10px 0px;
+  line-height: 20px;
+  color: #002047;
+}
+            </style>
+            <div id="fsf-modal-window-elem-container" style="display: none;">
+                <div id="fsf-modal-window-elem-outer-v-center">
+                    <div id="fsf-modal-window-elem-inner-v-center">
+                        <div id="fsf-modal-window-elem">
+                            <div id="fsf-modal-window-elem-header">
+                                <div id="fsf-modal-window-elem-close-button" onclick="//fsfModalWindowElemDontShowForAWhile();">
+                                    <i class="fa fa-close">&#8203;</i>
+                                </div>
+                                <h2>Support #UserFreedom!</h2>
+                            </div>
+                            <div id="fsf-modal-window-elem-left-column">
+                                <div id="fsf-modal-window-elem-text">
+
+<p>
+
+To truly have the right to collaborate, repair, and live more sustainably, we need freedom for computer users. A world with free software would have better privacy, protection from bulk surveillance, and would avoid user lock-in.
+
+</p>
+
+<p>
+
+With your support, we can continue helping people find their reasons and motivation to live more freely. Donate today and help us achieve our spring goal of $67,000 by July 8.
+
+</p>
+
+<p><span id="fsf-modal-window-text-link"><a href="https://www.fsf.org/appeal?mtm_campaign=spring22&mtm_source=modal">Read more</a> | <a href="https://my.fsf.org/donate?mtm_campaign=spring22&mtm_source=modal">Donate</a></span></p>
+
+                                </div>
+                            </div>
+                            <div id="fsf-modal-window-elem-right-column">
+                                <div id="fsf-modal-window-elem-buttons" style="border-radius: 20px;box-shadow: 5px 0 5px -6px #002047, -5px 0 5px -6px #002047;">
+                                    <div style="background-color:#c87137; border-top-right-radius: 20px; border-top-left-radius: 20px;">
+                                      <a style="text-shadow: 0px 0px 6px #ffe6b4;" href="https://my.fsf.org/join?mtm_campaign=spring22&mtm_source=modal" onclick="//fsfModalWindowElemFollowedLink();"><i class="fa fa-check-circle">&nbsp;</i>Join</a>
+                                    </div>
+
+                                    <div style="background-color:#e3d9e4;">
+                                      <a href="https://my.fsf.org/renew?mtm_campaign=spring22&mtm_source=modal" onclick="//fsfModalWindowElemFollowedLink();"><i class="fa fa-refresh">&nbsp;</i>Renew</a>
+                                    </div>
+
+                                    <div style="background-color:#b25ea8; border-bottom-right-radius: 20px; border-bottom-left-radius: 20px; margin-bottom: 2px">
+                                      <a style="text-shadow: 0px 0px 6px #ffe6b4;" href="https://my.fsf.org/donate?mtm_campaign=spring22&mtm_source=modal" onclick="//fsfModalWindowElemFollowedLink();"><i class="fa fa-money">&nbsp;</i>Donate</a>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <script>
+// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0
+
+// Licensed GPLv3-or-later by Andrew Engelbrecht
+
+var startTime, endTime, switchTextTime;
+
+startTime = new Date('2022-06-12T04:00:00Z');
+switchTextTime = new Date('2022-12-12T04:00:00Z');
+// endTime is unused.
+endTime = new Date('2022-12-17T04:00:00Z');
+
+// Possibly switch the text that is displayed in the modal window, depending
+// upon the current date.
+function fsfModalWindowElemMaybeSwitchText () {
+
+    var now;
+
+    now = new Date();
+    if (now.getTime() < switchTextTime.getTime()) {
+        return; // Do not switch the text
+    }
+
+    // Switch text
+    document.getElementById("fsf-modal-window-elem-text").innerHTML =' \
+\
+<p>To truly have the right to collaborate, repair, and live more sustainably, we need freedom for computer users. A world with free software would have better privacy, protection from bulk surveillance, and would avoid user lock-in.<\/p><p>With your support, we can continue helping people find their reasons and motivation to live more freely. Donate today and help us achieve our spring goal of \$67,000 by July 8!<\/p> \
+\
+<p><span id="fsf-modal-window-text-link"><a href="https://www.fsf.org/appeal?mtm_campaign=spring22&mtm_source=modal">Read more<\/a> |  <a href="https://my.fsf.org/donate?mtm_campaign=spring22&mtm_source=modal">Donate<\/a><\/span><\/p>';
+}
+
+// Show fsf-modal-window-elem if it has not been previously closed by
+// the user, nor recently hit "maybe later",
+// and the campaign is still happening
+function fsfModalWindowElemMaybeShow () {
+
+    var pattern, noShowFsfModalWindowElementP, now;
+
+    // See if cookie says not to show element
+    pattern = /showFsf202206FundraiserModalWindowElementP\s*=\s*false/;
+    noShowFsfModalWindowElementP = pattern.test(document.cookie);
+
+//// Uncomment here to enable modal window hiding
+    if (!noShowFsfModalWindowElementP) {
+        setTimeout(function () {
+            // display the element
+            document.getElementById("fsf-modal-window-elem-container").style.display="block";
+        }, 0);
+    }
+}
+
+// Call this first to set the proper text.
+fsfModalWindowElemMaybeSwitchText();
+// Check if appeal is the url.
+if (window.location.href.indexOf("appeal") == -1) {
+  // Call this right away to avoid flicker.
+  fsfModalWindowElemMaybeShow();
+}
+
+// Get the time `plusDays` in the future.
+// This can be a fraction.
+function daysInFuture (plusDays) {
+    var now, future;
+
+    now = new Date();
+    future = new Date(now.getTime() + Math.floor(1000 * 60 * 60 * 24 * plusDays));
+    return future.toGMTString();
+}
+
+// Hide the fsf-modal-window-elem
+function fsfModalWindowElemHide () {
+    document.getElementById("fsf-modal-window-elem-container").style.display="none";
+}
+
+// Optionally hide elem and set a cookie to keep the fsf-modal-window-elem hidden for the next `forDays`.
+function fsfModalWindowElemDontShowForDays (forDays, hideNow) {
+    if (hideNow === true) {
+        fsfModalWindowElemHide();
+    }
+    //document.cookie = "showFsf202206FundraiserModalWindowElementP=false; path=/; domain=.fsf.org; expires=" + daysInFuture(forDays);
+    document.cookie = "showFsf202206FundraiserModalWindowElementP=false; path=/; SameSite=Strict; Secure; expires=" + daysInFuture(forDays);
+}
+
+// Hide the element from now to two weeks after closing it
+function fsfModalWindowElemDontShowForAWhile () {
+  fsfModalWindowElemDontShowForDays(7, true);
+}
+
+// Keep the element visible for now, but do not show it for a while
+function fsfModalWindowElemFollowedLink () {
+  fsfModalWindowElemDontShowForDays(14, false);
+}
+
+// Check if visiting appeal page.
+if (window.location.href.indexOf("appeal") > -1) {
+  fsfModalWindowElemDontShowForAWhile();
+}
+
+// Close popup if user clicks trasparent part
+document.getElementById("fsf-modal-window-elem-container").addEventListener("click", function(event){
+  fsfModalWindowElemDontShowForAWhile();
+});
+
+// Do not close popup if clicking non-trasparent part (with the text and buttons)
+document.getElementById("fsf-modal-window-elem").addEventListener("click", function(event){
+  event.stopPropagation();
+});
+
+// Close popup if user clicks X icon
+document.getElementById("fsf-modal-window-elem-close-button").addEventListener("click", function(event){
+  fsfModalWindowElemDontShowForAWhile();
+});
+
+// Disable popup if user clicks one of the main buttons
+document.getElementById("fsf-modal-window-elem-buttons").addEventListener("click", function(event){
+  fsfModalWindowElemFollowedLink();
+});
+
+// Disable popup if user clicks one of the "Read more" link
+document.getElementById("fsf-modal-window-text-link").addEventListener("click", function(event){
+  fsfModalWindowElemFollowedLink();
+});
+
+// Close popup if user presses escape key
+window.addEventListener("keydown",  function  (event)  {
+    switch  (event.key)  {
+        case  "Escape":
+            fsfModalWindowElemDontShowForAWhile();
+            break;
+        default:
+            return;
+    }
+},  true);
+// @license-end
+                </script>
+            </div>
+            <!-- End fsf-modal-window-elem campaign element -->
+
   <nav class="navbar navbar-default">
     <div class="container-fluid">
       <!-- Brand and toggle get grouped for better mobile display -->
@@ -366,7 +769,6 @@ Apple prevents you from installing third-party free software on your own phone,
                <p>
                <a href="https://shop.libiquity.com/product/taurinus-x200" class="seller action-button">Libiquity</a>
                </p>
-                               <p>  <a href="https://store.vikings.net/x200-ryf-certfied" class="seller action-button">Vikings</a></p>
               </div>
             </div>
 
@@ -381,7 +783,6 @@ Apple prevents you from installing third-party free software on your own phone,
                <p>
                <a href="https://shop.libiquity.com/product/taurinus-x200" class="seller action-button">Libiquity</a>
                </p>
-                               <p>                               <a href="https://store.vikings.net/x200-ryf-certfied" class="seller action-button">Vikings</a></p>
               </div>
             </noscript>
             <!-- End Buy/Download button -->
@@ -416,59 +817,6 @@ it's the laptop that's most frequently used in the FSF office!</p>
       </div>
         <!--End Row-->
 
- <div class="container">
-        <div class="row is-table-row">
-          <div class="col-md-5 col-sm-6 recommended-img">
-                   <h5 class="text-center">Vikings D8</h5>
-            <img src="img/products/desktop.png" alt="Vikings D8" class="center-block" />
-
-            <!-- Buy/Download Button   -->
-            <a id="get-item-d8" class="btn get-item" role="button" data-toggle="collapse" href="#sellers-d8" aria-expanded="false" aria-controls="sellers-d8" style="display:none;">
-              BUY
-            </a>
-            <div class="collapse" id="sellers-d8">
-              <div class="center-block seller-group">
-                <a href="https://store.vikings.net/ryf-certified-hardware/d8ryf" class="seller action-button">Vikings</a>
-              </div>
-            </div>
-
-            <script>
-            document.getElementById('get-item-d8').style.display = '';
-            </script>
-            <noscript>
-              <div class="center-block seller-group">
-                <p style="color: #6b6b6b">
-                  <strong>Get it from</strong>
-                </p>
-                <a href="https://store.vikings.net/ryf-certified-hardware/d8ryf" class="seller action-button">Vikings</a>
-              </div>
-            </noscript>
-            <ul class="pros">
-<p>Why it's cool: The Vikings D8 is a robust desktop computer that can be scaled up or down according to your needs, and which is capable of doing everything from simple Web browsing and video playback to intense code compilation.</p>
-
-<p>You can order the Vikings D8 installed with the FSF-endorsed <a href="https://trisquel.info">Trisquel</a> distribution of GNU/Linux, a fully free operating system that removes the user-hostile binary-only blobs lurking in the drivers of many common network and graphics cards, or, if you prefer, you can order the D8 installed with any other <a href="https://gnu.org/distros/free-distros.html">free distribution of GNU/Linux</a>.</p>
-</ul>
-</div>
-
-<div class="good col-md-6 col-sm-6">
-<ul class="pros">
-  <li>Want to graduate from the X200? The D8 is higher performing while still just as respectful of your freedom.</li>
-  <li>Has room for three hard drives and four custom case fans.</li>
-  <li>Despite being a mid-tower PC, it runs quietly, allowing you to surf the Web or code in peace.</li>
-                         </ul>
-            <h5 class="text-center">Desktops running Microsoft Windows</h5>
-            <ul class="cons">
-              <li>Windows is <a href="https://gnu.org/proprietary">proprietary software</a> that profits from treating the user as a product. It <a href="https://www.fsf.org/news/the-fsfs-statement-on-windows-10">forces users to consent to data collection</a> for "targeted advertising." <a href="https://www.fsf.org/news/lifes-better-together-when-you-avoid-windows-11">Windows 11</a> is no better.
-              </li>
-              <li>Mandatory Windows updates force users to test potentially unstable new versions. <a href="https://www.fsf.org/campaigns/windows">Read more about Windows's abuses.</a></li>
-            <li>Looking at a computer that includes an Intel CPU? They come with the <a href="https://www.fsf.org/blogs/sysadmin/the-management-engine-an-attack-on-computer-users-freedom">Intel Management Engine</a>, a hardware-based backdoor that gives Intel -- or intruders -- permanent and privileged access to your computer.</li>
-            </ul>
-          </div>
-          <!--End Bad-->
-        </div>
-        <!--End Row-->
-      <!--End Container-->
-
       <h2 class="title text-center">Cool Devices</h2>
   <!-- cool devices -->
 <div class="container">
@@ -769,7 +1117,7 @@ numbers, which aids in password generation and encryption.</p>
   <p>Try these video services and sites instead:</p>
 <ul class="pros">
   <li>Visit the <a href="https://archive.org/details/movies">Moving Internet Archive</a> for free (as in freedom) classic films and art projects.</li>
-<li>The <a href="https://cloud.blender.org/open-projects">Blender Open Movies</a> project has a collection of computer-animated films that were made entirely with <a href="https://blender.org">Blender</a>, an enormously popular free software tool.</li>
+<li>The <a href="https://studio.blender.org/films">Blender Open Movies</a> project has a collection of computer-animated films that were made entirely with <a href="https://blender.org">Blender</a>, an enormously popular free software tool.</li>
 <li><p>Visit the <a href="https://www.defectivebydesign.org/guide/">Guide to DRM-free Living</a> for more suggestions on how to stay a film lover and keep your freedom at the same time.</p></li>
            </ul>
 
@@ -885,7 +1233,6 @@ numbers, which aids in password generation and encryption.</p>
                     <p>The graphics and photos used on this page have been modified by the Free Software Foundation and are licensed separately under the following terms: </p>
                     <ul style="list-style: none inside none;">
                       <li>X200 product image in the public domain.</li>
-                                         <li>Vikings product images copyright © 2019, Vikings GmbH. Licensed under the <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0</a> license.</li>
                                          <li>NeuG product image copyright © 2020, Free Software Foundation, Inc. Licensed under the <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0</a> license.</li>
                       <li>ThinkPenguin product images © 2019, ThinkPenguin, Inc. Licensed under the <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0</a> license.</li> 
                      <li>Bookshelf photo copyright © 2010, <a href="https://www.flickr.com/photos/seeminglee/4556156477/">See-ming Lee</a>. Licensed under the <a href="https://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Attribution-ShareAlike 2.0</a> license.</li>