From efaebe8574cff9dc6074863642ee729ede0a000b Mon Sep 17 00:00:00 2001 From: apapachristou Date: Wed, 9 Sep 2020 11:08:53 +0300 Subject: [PATCH] Adds slider on static page per 3 sec, stops on option click. --- dmp-frontend/src/assets/splash/index.html | 8 ++++---- dmp-frontend/src/assets/splash/js/scripts.js | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dmp-frontend/src/assets/splash/index.html b/dmp-frontend/src/assets/splash/index.html index b5df09f6f..9f1b8dd75 100644 --- a/dmp-frontend/src/assets/splash/index.html +++ b/dmp-frontend/src/assets/splash/index.html @@ -103,13 +103,13 @@

Argos

 

experience

-
+

1

 

Select Templates

-
+

2

 

Fill the information

-
+

3

 

Share DMP

@@ -393,4 +393,4 @@ - \ No newline at end of file + diff --git a/dmp-frontend/src/assets/splash/js/scripts.js b/dmp-frontend/src/assets/splash/js/scripts.js index 6abf11b0b..724c64c44 100644 --- a/dmp-frontend/src/assets/splash/js/scripts.js +++ b/dmp-frontend/src/assets/splash/js/scripts.js @@ -45,3 +45,19 @@ window.onclick = function (event) { this.closeOpenDropdowns(); } } + +// Slideshow per 3 sec, stops on option click +window.onload = function slideImages() { + var x = -1; + slides = setInterval(function displayNextImage() { + x = (x === images.length - 1) ? 0 : x + 1; + document.getElementById('template-preview').src = images[x]; + toggleClass(['id1','id2','id3'], 'id'.concat((x + 1).toString())); + }, 3000); +} + +var slides; +var images = []; +images[0] = 'assets/img/template-preview-1.svg'; +images[1] = 'assets/img/template-preview-2.svg'; +images[2] = 'assets/img/template-preview-3.svg';