From c8dfadee66a5d8ae3d32ca5cb94a0eadb9a8395f Mon Sep 17 00:00:00 2001 From: System-x64 Date: Wed, 1 Feb 2023 15:32:37 +0530 Subject: [PATCH] Removed play-vid on focus (#16) * removed play-vid on focus * fixed minor height issue --- public/css/home.css | 2 +- public/js/play-vid-on-focus.js | 17 --------- public/js/smooth-view.js | 11 ------ views/home.ejs | 69 ++++++++++++++++++++++++++++------ 4 files changed, 58 insertions(+), 41 deletions(-) delete mode 100644 public/js/play-vid-on-focus.js delete mode 100644 public/js/smooth-view.js diff --git a/public/css/home.css b/public/css/home.css index 1410fd1..b66be18 100644 --- a/public/css/home.css +++ b/public/css/home.css @@ -711,7 +711,7 @@ footer a:hover { } .mob-menu { display: flex; - margin-bottom: 12px; + margin-bottom: 10px; } .get-started a div { diff --git a/public/js/play-vid-on-focus.js b/public/js/play-vid-on-focus.js deleted file mode 100644 index ad455c4..0000000 --- a/public/js/play-vid-on-focus.js +++ /dev/null @@ -1,17 +0,0 @@ -$(document).ready(function () { - $(".animatedVideo").each(function () { - $(this).get(0).pause(); - }); - $(window).on("scroll", function () { - $(".animatedVideo").each(function () { - var scroll = $(window).scrollTop(); - var elementTop = $(this).offset().top; - var elementHeight = $(this).height(); - if (scroll > elementTop - $(window).height() + elementHeight) { - $(this).get(0).play(); - } - - }); - }); -}); - diff --git a/public/js/smooth-view.js b/public/js/smooth-view.js deleted file mode 100644 index 433398c..0000000 --- a/public/js/smooth-view.js +++ /dev/null @@ -1,11 +0,0 @@ -const links = document.querySelectorAll(".like-this"); - - -links.forEach((link) => { - link.addEventListener("click", (event) => { - event.preventDefault(); - const targetId = link.getAttribute("href"); - const target = document.querySelector(targetId); - target.scrollIntoView({ behavior: "smooth" }); - }); -}); \ No newline at end of file diff --git a/views/home.ejs b/views/home.ejs index dfe8784..adc9da2 100644 --- a/views/home.ejs +++ b/views/home.ejs @@ -27,7 +27,10 @@ - + - +
- + -
@@ -160,6 +192,7 @@ @@ -200,6 +233,7 @@ @@ -210,6 +244,7 @@ @@ -243,7 +278,15 @@ -
+