From 22be90562af3b42c2706294603dd7e3e8af6fa22 Mon Sep 17 00:00:00 2001 From: Rafael Irgolic Date: Mon, 21 Oct 2019 15:49:33 +0200 Subject: [PATCH] Download: Mail course subscribe prompt popup upon download button click --- layouts/download/list.html | 46 ++++++++++++++++++++++++++++++++++---- static/css/custom.css | 35 +++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 4 deletions(-) diff --git a/layouts/download/list.html b/layouts/download/list.html index 7d5474b66f..7b7a8c039e 100644 --- a/layouts/download/list.html +++ b/layouts/download/list.html @@ -1,5 +1,11 @@ {{ define "main"}} +
+ +
+ +
+
@@ -24,12 +30,14 @@

{{ .title }}

Download the latest version for Windows

- + Download Orange

Standalone installer (default)

- Orange3-Miniconda-x86_64.exe (64 bit)
+ Orange3-Miniconda-x86_64.exe + (64 bit)

Can be used without administrative priviledges.

Anaconda

If you are using python provided by Anaconda @@ -57,12 +65,12 @@

Download archive

Download the latest version for Mac

- + Download Orange

Bundle

- Orange.dmg
+ Orange.dmg

A universal bundle with everything packed in and ready to use.

Anaconda

@@ -235,6 +243,36 @@

Installing add-ons

els[i].classList.remove('icon-selected'); } } + + var popupShown = false; + + function showEmailCourse() { + if (popupShown) { + return + } + $("#bkgOverlay").delay(2800).fadeIn(200); + $("#delayedPopup").delay(3000).fadeIn(200); + popupShown = true + } + + function hideEmailCourse() { + $("#bkgOverlay").fadeOut(200); + $("#delayedPopup").fadeOut(200); + } + + $(document).ready(function () { + $(".download-button").click(showEmailCourse); + + //close popup when clicking x or off popup + $('#bkgOverlay').click(hideEmailCourse); + + //close popup when clicking the esc keyboard button + $(document).keyup(function (event) { + if (event.which == '27') { + hideEmailCourse(); + } + }); + });
diff --git a/static/css/custom.css b/static/css/custom.css index 20d1b1a86e..b15bd6bf12 100755 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -911,3 +911,38 @@ blockquote cite { } } +/* This is a dimmed background overlay */ +.backgroundOverlay { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + height: 100%; + width: 100%; + margin: 0; + padding: 0; + background: #000000; + opacity: .85; + filter: alpha(opacity=85); + -moz-opacity: .85; + z-index: 101; + display: none; +} + +/* This is the Popup Window */ +.delayedPopupWindow { + display: none; + position: fixed; + width: auto; + max-width: 480px; + height: 310px; + top: 50%; + left: 50%; + margin-left: -260px; + margin-top: -180px; + background-color: #efefef; + border: 2px solid #333; + z-index: 102; + padding: 10px 20px; +} \ No newline at end of file