Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- INICIO login.html -->
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Sistema Cripto</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link href="css/estilo.css" rel="stylesheet">
- </head>
- <body class="align login">
- <div class="grid" >
- <form class="form loginform">
- <div class="form__field">
- <label for="username"><svg class="icon"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#user"></use></svg><span class="hidden">Username</span></label>
- <input type="text" name="username" id='username' class="form__input" placeholder="Usuario" required>
- </div>
- <div class="form__field">
- <label for="password"><svg class="icon"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#lock"></use></svg><span class="hidden">Password</span></label>
- <input type="password" id="password" name="password" class="form__input" placeholder="Password" required>
- </div>
- <div class="form__field">
- <input type="button" id='btningresar' value="Ingresar">
- </div>
- </form>
- <br>
- <div id='contenedormensaje'>
- <div class="alert alert-danger alert-dismissible fade show" role="alert">
- <button type="button" class="close" id='close' style="right: 0px;">
- <span aria-hidden="true">×</span>
- </button>
- <strong>Atención!</strong><div id='mensaje'></div>
- </div>
- </div>
- </div>
- <svg xmlns="http://www.w3.org/2000/svg" class="icons"><symbol id="arrow-right" viewBox="0 0 1792 1792"><path d="M1600 960q0 54-37 91l-651 651q-39 37-91 37-51 0-90-37l-75-75q-38-38-38-91t38-91l293-293H245q-52 0-84.5-37.5T128 1024V896q0-53 32.5-90.5T245 768h704L656 474q-38-36-38-90t38-90l75-75q38-38 90-38 53 0 91 38l651 651q37 35 37 90z"/></symbol><symbol id="lock" viewBox="0 0 1792 1792"><path d="M640 768h512V576q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28H416q-40 0-68-28t-28-68V864q0-40 28-68t68-28h32V576q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z"/></symbol><symbol id="user" viewBox="0 0 1792 1792"><path d="M1600 1405q0 120-73 189.5t-194 69.5H459q-121 0-194-69.5T192 1405q0-53 3.5-103.5t14-109T236 1084t43-97.5 62-81 85.5-53.5T538 832q9 0 42 21.5t74.5 48 108 48T896 971t133.5-21.5 108-48 74.5-48 42-21.5q61 0 111.5 20t85.5 53.5 62 81 43 97.5 26.5 108.5 14 109 3.5 103.5zm-320-893q0 159-112.5 271.5T896 896 624.5 783.5 512 512t112.5-271.5T896 128t271.5 112.5T1280 512z"/></symbol></svg>
- </body>
- <script type="text/javascript" src='js/jquery-3.2.1.min.js' ></script>
- <script type="text/javascript" src='js/bootstrap.min.js'></script>
- <script>
- $('#contenedormensaje').hide();
- var callback = function(){
- var username = $('#username').val();
- var password = $('#password').val();
- var user = JSON.parse(localStorage.getItem('user'));
- console.log("Usuario -> " + user.username + " password ->" + user.password );
- console.log( user, password, password );
- if(username == user.username && password != user.password){
- $('#contenedormensaje').show();
- $('#mensaje').text("Por favor, ingrese su contraseña correctamente.");
- }else if(username != user.username && password != user.password){
- $('#contenedormensaje').show();
- $('#mensaje').text("El usuario no existe.");
- }else if(username == user.username && password == user.password){
- $('#contenedormensaje').hide();
- window.location.href = "index.html";
- }
- }
- $('#btningresar').click(callback);
- $(".login").keypress(function() {
- if (event.which == 13) callback();
- });
- $('#close').click(function(){ $('#contenedormensaje').hide(); });
- </script>
- </html>
- <!-- FIN login.html -->
- <!-- INICIO estilo.css -->
- /* loginform */
- .align {
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-orient: vertical;
- -webkit-box-direction: normal;
- -ms-flex-direction: column;
- flex-direction: column;
- -webkit-box-pack: center;
- -ms-flex-pack: center;
- justify-content: center;
- }
- /* helpers/grid.css */
- .grid {
- margin-left: auto;
- margin-right: auto;
- max-width: 320px;
- max-width: 20rem;
- width: 90%;
- }
- /* helpers/hidden.css */
- .hidden {
- border: 0;
- clip: rect(0 0 0 0);
- height: 1px;
- margin: -1px;
- overflow: hidden;
- padding: 0;
- position: absolute;
- width: 1px;
- }
- /* helpers/icon.css */
- .icons {
- display: none;
- }
- .icon {
- display: inline-block;
- fill: #606468;
- font-size: 16px;
- font-size: 1rem;
- height: 1em;
- vertical-align: middle;
- width: 1em;
- }
- /* layout/base.css */
- * {
- box-sizing: inherit;
- }
- html {
- box-sizing: border-box;
- font-size: 100%;
- height: 100%;
- }
- body {
- background-color: #2c3338;
- color: #606468;
- font-family: 'Open Sans', sans-serif;
- font-size: 14px;
- font-size: 0.875rem;
- font-weight: 400;
- height: 100%;
- line-height: 1.5;
- margin: 0;
- min-height: 100%;
- }
- /* modules/anchor.css */
- a {
- color: #eee;
- outline: 0;
- text-decoration: none;
- }
- a:focus,
- a:hover {
- text-decoration: underline;
- }
- /* modules/form.css */
- input {
- background-image: none;
- border: 0;
- color: inherit;
- font: inherit;
- margin: 0;
- outline: 0;
- padding: 0;
- -webkit-transition: background-color 0.3s;
- transition: background-color 0.3s;
- }
- input[type='button'] {
- cursor: pointer;
- }
- .form {
- margin: -14px;
- margin: -0.875rem;
- }
- .form input[type='password'],
- .form input[type='text'],
- .form input[type='button'] {
- width: 100%;
- }
- .form__field {
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- margin: 14px;
- margin: 0.875rem;
- }
- .form__input {
- -webkit-box-flex: 1;
- -ms-flex: 1;
- flex: 1;
- }
- /* modules/loginform.css */
- .loginform {
- color: #eee;
- }
- .loginform label,
- .loginform input[type='text'],
- .loginform input[type='password'],
- .loginform input[type='button'] {
- border-radius: 0.25rem;
- padding: 16px;
- padding: 1rem;
- }
- .loginform label {
- background-color: #363b41;
- border-bottom-right-radius: 0;
- border-top-right-radius: 0;
- padding-left: 20px;
- padding-left: 1.25rem;
- padding-right: 20px;
- padding-right: 1.25rem;
- }
- .loginform input[type='password'],
- .loginform input[type='text'] {
- background-color: #3b4148;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- }
- .loginform input[type='password']:focus,
- .loginform input[type='password']:hover,
- .loginform input[type='text']:focus,
- .loginform input[type='text']:hover {
- background-color: #434a52;
- }
- .loginform input[type='button'] {
- background-color: #1e88e5;
- color: #eee;
- font-weight: 700;
- text-transform: uppercase;
- }
- .loginform input[type='button']:focus,
- .loginform input[type='button']:hover {
- background-color: #1e88e5;
- }
- /* modules/text.css */
- p {
- margin-bottom: 24px;
- margin-bottom: 1.5rem;
- margin-top: 24px;
- margin-top: 1.5rem;
- }
- .text--center {
- text-align: center;
- }
- /* FIN loginform */
- /* DIV ERROR loginform */
- .alert-danger, .alert-error {
- color: #E9EDEF;
- background-color: rgba(231,76,60,.88);
- border-color: rgba(231,76,60,.88);}
- .alert-dismissable, .alert-dismissible {
- padding-right: 35px;
- }
- .alert {
- padding: 15px;
- margin-bottom: 20px;
- border: 1px solid transparent;
- border-radius: 4px;
- }
- .close:focus, .close:hover {
- color: #000;
- text-decoration: none;
- cursor: pointer;
- filter: alpha(opacity=50);
- opacity: .5;
- }
- .alert-dismissable .close, .alert-dismissible .close {
- position: relative;
- top: -2px;
- right: -21px;
- color: inherit;
- }
- button.close {
- -webkit-appearance: none;
- padding: 0;
- cursor: pointer;
- background: 0 0;
- border: 0;
- }
- .close {
- float: right;
- font-size: 21px;
- font-weight: 700;
- line-height: 1;
- color: #000;
- text-shadow: 0 1px 0 #fff;
- filter: alpha(opacity=20);
- opacity: .2;
- }
- <!-- FIN estilo.css -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement