diff --git a/api-payroll/public/css/login.css b/api-payroll/public/css/login.css new file mode 100644 index 0000000..c8b4eae --- /dev/null +++ b/api-payroll/public/css/login.css @@ -0,0 +1,81 @@ +body { + background: url(../imagenes/grey_background.jpg); + background-size: cover; + font-family: Montserrat; +} +@media only screen and (min-device-width: 480px) { + body { + background: url('../imagenes/grey_background.jpg') no-repeat fixed center center; + } +} +.logo { + width: 213px; + height: 60px; + margin: 30px auto; +} +.login-block { + width: 320px; + padding: 20px; + background: #fff; + border-radius: 5px; + border-top: 5px solid #bdb035; + margin: 0 auto; +} +.login-block h1 { + text-align: center; + color: #000; + font-size: 18px; + text-transform: uppercase; + margin-top: 0; + margin-bottom: 20px; +} +.login-block input { + width: 100%; + height: 42px; + box-sizing: border-box; + border-radius: 5px; + border: 1px solid #ccc; + margin-bottom: 20px; + font-size: 14px; + font-family: Montserrat; + padding: 0 20px 0 50px; + outline: none; +} +.login-block input#user { + background: #fff url('../imagenes/login_username.png') 20px top no-repeat; + background-size: 16px 80px; +} +.login-block input#user:focus { + background: #fff url('../imagenes/login_username.png') 20px bottom no-repeat; + background-size: 16px 80px; +} +.login-block input#password { + background: #fff url('../imagenes/login_password.png') 20px top no-repeat; + background-size: 16px 80px; +} +.login-block input#password:focus { + background: #fff url('../imagenes/login_password.png') 20px bottom no-repeat; + background-size: 16px 80px; +} +.login-block input:active, .login-block input:focus { + border: 1px solid #bdb035; +} +.login-block #loginButon { + width: 100%; + height: 40px; + background: #bdb035; + box-sizing: border-box; + border-radius: 5px; + border: 1px solid #6d661c; + color: #fff; + font-weight: bold; + text-transform: uppercase; + font-size: 14px; + font-family: Montserrat; + outline: none; + cursor: pointer; +} +.login-block button:hover { + background: #c7b935; + border: 1px solid #6d661c; +} \ No newline at end of file diff --git a/api-payroll/public/html/login.php b/api-payroll/public/html/login.php new file mode 100644 index 0000000..e9e43c4 --- /dev/null +++ b/api-payroll/public/html/login.php @@ -0,0 +1,25 @@ + + + + + + + +
+ +
+ +
+
+ +
+ +
+ + + \ No newline at end of file diff --git a/api-payroll/public/imagenes/grey_background.jpg b/api-payroll/public/imagenes/grey_background.jpg new file mode 100644 index 0000000..eac6adb Binary files /dev/null and b/api-payroll/public/imagenes/grey_background.jpg differ diff --git a/api-payroll/public/imagenes/login_password.png b/api-payroll/public/imagenes/login_password.png new file mode 100644 index 0000000..b675d6e Binary files /dev/null and b/api-payroll/public/imagenes/login_password.png differ diff --git a/api-payroll/public/imagenes/login_username.png b/api-payroll/public/imagenes/login_username.png new file mode 100644 index 0000000..0ecf25d Binary files /dev/null and b/api-payroll/public/imagenes/login_username.png differ diff --git a/api-payroll/public/js/login.js b/api-payroll/public/js/login.js new file mode 100644 index 0000000..55b9d60 --- /dev/null +++ b/api-payroll/public/js/login.js @@ -0,0 +1,28 @@ +function getbaseUrl(uriPath){ + var url = window.location.href; + return url.substring(0, url.indexOf(uriPath)); +} + +function processLogin() { +console.log(getbaseUrl('html/')); + var parametros = { + "userName":$('#userName').val(), + "password":$('#password').val() + }; + + $.ajax({ + url: getbaseUrl('/html/') + '/index.php/api/session/login', + type: 'POST', + dataType: 'json', + data: parametros, + success:function(data){ + console.log(JSON.stringify(data)) + + + }, + error:function(x,e,h) { + console.log(x); + console.log(e + " " + h); + }, + }); +} \ No newline at end of file