diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000..f6d6f01
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,2 @@
+# web javascript causes a lot of eslint warnings
+assets/js/*.js
\ No newline at end of file
diff --git a/assets/css/pretendo-auth.css b/assets/css/pretendo-auth.css
index 06b7dd8..1eb5953 100644
--- a/assets/css/pretendo-auth.css
+++ b/assets/css/pretendo-auth.css
@@ -3,6 +3,19 @@ body.flex.center {
align-items: center;
}
+body footer {
+ padding: 0;
+ background-color: transparent;
+}
+body footer .content {
+ border-radius: 0;
+ background-color: transparent;
+ padding: 1em 0;
+ box-shadow: none;
+ width: 30rem;
+ max-width: 100vw;
+}
+
/* login/register card */
.card {
background-color: white;
diff --git a/assets/js/auth.js b/assets/js/auth.js
index e69de29..f41d421 100644
--- a/assets/js/auth.js
+++ b/assets/js/auth.js
@@ -0,0 +1,26 @@
+function postAjax(url, data, success) {
+ var params = (typeof data == 'string') ? data : Object.keys(data).map(function (k) {
+ return encodeURIComponent(k) + '=' + encodeURIComponent(data[k])
+ }).join('&');
+
+ var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
+ xhr.open('POST', url);
+ xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
+ xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+ xhr.send(params);
+ return xhr;
+}
+
+function login() {
+ var xhr = postAjax('/api/v1/login', {
+ email: document.getElementById('email_input').value,
+ password: document.getElementById('password_input').value
+ });
+ xhr.onload = function () {
+ console.log(xhr.responseText);
+ response = JSON.parse(xhr.responseText);
+ if (response.success === true) {
+ location.pathname = '/pnid/dashboard';
+ }
+ }
+}
\ No newline at end of file
diff --git a/views/admin.hbs b/views/admin.hbs
index ea8fa7f..88df635 100644
--- a/views/admin.hbs
+++ b/views/admin.hbs
@@ -121,7 +121,7 @@
Check if logged in
Logout
-
+
{{> footer-default }}