diff --git a/website/gulpfile.js b/website/gulpfile.js index db1245f1d..8a5aa25cc 100644 --- a/website/gulpfile.js +++ b/website/gulpfile.js @@ -104,7 +104,7 @@ gulp.task('watch', function () { gulp.watch([paths.src.scss.files, '!' + paths.src.scss.icon], gulp.series('scss', 'browsersyncReload')); gulp.watch(paths.src.scss.icon, gulp.series('icons', 'browsersyncReload')); gulp.watch([paths.src.js.dir], gulp.series('js', 'browsersyncReload')); - gulp.watch([paths.src.js.pages], gulp.series('jsPages', 'browsersyncReload')); + // gulp.watch([paths.src.js.pages], gulp.series('jsPages', 'browsersyncReload')); gulp.watch([paths.src.html.files, paths.src.partials.files], gulp.series(['fileinclude', 'scss'], 'browsersyncReload')); }); @@ -115,12 +115,12 @@ gulp.task('js', function () { .pipe(gulp.dest(paths.dist.js.dir)); }); -gulp.task('jsPages', function () { - return gulp - .src(paths.src.js.files) - // .pipe(uglify()) - .pipe(gulp.dest(paths.dist.js.files)); -}); +// gulp.task('jsPages', function () { +// return gulp +// .src(paths.src.js.files) +// // .pipe(uglify()) +// .pipe(gulp.dest(paths.dist.js.files)); +// }); const cssOptions = { compatibility: "*", // (default) - Internet Explorer 10+ compatibility mode @@ -242,7 +242,7 @@ gulp.task('html', function () { }); // Default(Producation) Task -gulp.task('default', gulp.series(gulp.parallel('clean:packageLock', 'clean:dist', 'copy:all', 'copy:libs', 'fileinclude', 'scss', 'icons', 'js', 'jsPages', 'html'), gulp.parallel('browsersync', 'watch'))); +gulp.task('default', gulp.series(gulp.parallel('clean:packageLock', 'clean:dist', 'copy:all', 'copy:libs', 'fileinclude', 'scss', 'icons', 'js', 'html'), gulp.parallel('browsersync', 'watch'))); // Build(Development) Task -gulp.task('build', gulp.series('clean:packageLock', 'clean:dist', 'copy:all', 'copy:libs', 'fileinclude', 'scss', 'icons', 'js', 'jsPages', 'html')); +gulp.task('build', gulp.series('clean:packageLock', 'clean:dist', 'copy:all', 'copy:libs', 'fileinclude', 'scss', 'icons', 'js', 'html')); diff --git a/website/src/assets/js/app.js b/website/src/assets/js/app.js index 88e16d303..f772c2e81 100644 --- a/website/src/assets/js/app.js +++ b/website/src/assets/js/app.js @@ -94,18 +94,29 @@ function activateMenu() { if (matchingMenuItem) { matchingMenuItem.classList.add('active'); + + var immediateParent = getClosest(matchingMenuItem, 'li'); + if (immediateParent) { immediateParent.classList.add('active'); } - var parent = getClosest(matchingMenuItem, '.parent-menu-item'); + var parent = getClosest(immediateParent, '.child-menu-item'); + if(parent){ + parent.classList.add('active'); + } + + var parent = getClosest(parent || immediateParent , '.parent-menu-item'); + if (parent) { parent.classList.add('active'); + var parentMenuitem = parent.querySelector('.menu-item'); if (parentMenuitem) { parentMenuitem.classList.add('active'); } + var parentOfParent = getClosest(parent, '.parent-parent-menu-item'); if (parentOfParent) { parentOfParent.classList.add('active'); @@ -250,4 +261,69 @@ try { new WOW().init(); } catch (error) { -} \ No newline at end of file +} + + +/*************************/ +/* Contact Js */ +/*************************/ + +try { + function validateForm() { + var name = document.forms["myForm"]["name"].value; + var email = document.forms["myForm"]["email"].value; + var subject = document.forms["myForm"]["subject"].value; + var comments = document.forms["myForm"]["comments"].value; + document.getElementById("error-msg").style.opacity = 0; + document.getElementById('error-msg').innerHTML = ""; + if (name == "" || name == null) { + document.getElementById('error-msg').innerHTML = "
"; + fadeIn(); + return false; + } + if (email == "" || email == null) { + document.getElementById('error-msg').innerHTML = ""; + fadeIn(); + return false; + } + if (subject == "" || subject == null) { + document.getElementById('error-msg').innerHTML = ""; + fadeIn(); + return false; + } + if (comments == "" || comments == null) { + document.getElementById('error-msg').innerHTML = ""; + fadeIn(); + return false; + } + var xhttp = new XMLHttpRequest(); + xhttp.onreadystatechange = function () { + if (this.readyState == 4 && this.status == 200) { + document.getElementById("simple-msg").innerHTML = this.responseText; + document.forms["myForm"]["name"].value = ""; + document.forms["myForm"]["email"].value = ""; + document.forms["myForm"]["subject"].value = ""; + document.forms["myForm"]["comments"].value = ""; + } + }; + xhttp.open("POST", "php/contact.php", true); + xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); + xhttp.send("name=" + name + "&email=" + email + "&subject=" + subject + "&comments=" + comments); + return false; + } + + function fadeIn() { + var fade = document.getElementById("error-msg"); + var opacity = 0; + var intervalID = setInterval(function () { + if (opacity < 1) { + opacity = opacity + 0.5 + fade.style.opacity = opacity; + } else { + clearInterval(intervalID); + } + }, 200); + } +} catch (error) { + +} diff --git a/website/src/partials/cookies.html b/website/src/partials/cookies.html index 6304a738b..da7edf259 100644 --- a/website/src/partials/cookies.html +++ b/website/src/partials/cookies.html @@ -1,5 +1,5 @@ -