diff --git a/public/js/index.js b/public/js/index.js index c6a0ccc..530b58d 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -185,4 +185,11 @@ jQuery(document).ready(function ($) { } } } -}) \ No newline at end of file +}) + +function subscribe() { + let request = new XMLHttpRequest(); + let email = document.getElementById("newsletter_email").value; + request.open('GET', `api/subscribe?email=${email}`, false); + request.send(null); +} \ No newline at end of file diff --git a/views/pages/index.ejs b/views/pages/index.ejs index ce1bd80..a6386a7 100644 --- a/views/pages/index.ejs +++ b/views/pages/index.ejs @@ -561,16 +561,14 @@
-
- -
+
+ + +