Categories
HTML/CSS

Minimal Login Form

I am sharing this simple login form, responsive in all screen devices with bootstrap 4.4 that can be integrate in your projects and customize as you like I hope you’ll customize this template according to your individual project’s needs .

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Site | Login</title>
  <link rel="shortcut icon" href="assets/images/logo.png" type="image/x-icon">
  <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="assets/custom-fonts/style.css">
  <link rel="stylesheet" href="assets/izitoast/dist/css/iziToast.min.css">
  <link rel="stylesheet" href="assets/css/fonts.css">
  <link rel="stylesheet" href="assets/css/responsive.css">
  <link rel="stylesheet" href="assets/css/custom.css">
  <style>
  body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: #e65c00;
    background: -webkit-linear-gradient(45deg, #e0eafc, #cfdef3);
    background: linear-gradient(45deg, #e0eafc, #cfdef3);
  }

  .column-login {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .card {
    box-shadow: 0px 10px 30px -10px rgba(151, 163, 184, 0.5) !important;
    -webkit-box-shadow: 0px 10px 30px -10px rgba(151, 163, 184, 0.5) !important;
    -moz-box-shadow: 0px 10px 30px -10px rgba(151, 163, 184, 0.5) !important;
    -ms-box-shadow: 0px 10px 30px -10px rgba(151, 163, 184, 0.5) !important;
    -o-box-shadow: 0px 10px 30px -10px rgba(151, 163, 184, 0.5) !important;
  }

  .crd-theme {
    background: #00B4DB;
    background: -webkit-linear-gradient(45deg, #0083B0, #00B4DB);
    background: linear-gradient(45deg, #0083B0, #00B4DB);
  }

  .show-pass {
    cursor: pointer;
  }
  </style>
</head>

<body>
  <main class="py-5">
    <section id="login-area">
      <div class="container-fluid">
        <div class="row align-items-center">
          <div class="column-login col-lg-4 mx-auto">
            <div class="card border-0">
              <div class="card-header text-center crd-theme text-white">
                <h5 class="font-weight-regular"> Login Account</h5>
                <p class="card-text">This is a secure system and you will need <br />
                  to provide your login details to access the site.</p>
              </div>
              <div class="card-body">

                <div class="row">
                  <div class="col-12 my-2">
                    <div class="input-group">
                      <div class="input-group-prepend">
                        <span class="input-group-text"><i class="cf-user-o"></i></span>
                      </div>
                      <input class="form-control" type="text" name="" placeholder="Your Email or Username"
                        aria-label="Recipient's ">
                    </div>
                  </div>
                  <div class="col-12 my-2">
                    <div class="input-group">
                      <div class="input-group-prepend">
                        <span class="input-group-text"><i class=" cf-key  "></i></span>
                      </div>
                      <input class="form-control" type="password" name="" placeholder="Your Password"
                        aria-label="Recipient's ">
                      <div class="input-group-append">
                        <span class="input-group-text bg-transparent"><i class=" cf-eye-slash show-pass"></i></span>
                      </div>
                    </div>
                  </div>
                  <div class="col-12 my-2">
                    <div class="input-group">
                      <div class="input-group-prepend mr-2">
                        <span class="input-group-text"> <input type="checkbox" name="" id=""></span>
                      </div>
                      <label>Keep me logged in</label>
                    </div>
                  </div>
                  <div class="col-12 text-right">
                    <button class="btn btn-secondary" type="submit">Login</button>
                  </div>
                </div>
              </div>
              <div class="card-footer">
                <p class="m-0"> © <span class="badge badge-primary" id="copyrightYear"></span> Name of Site</p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </main>

  <script src="assets/jquery/jquery-3.3.1.js"></script>

  <script>
  let d = new Date();
  let y = d.getFullYear();
  document.getElementById("copyrightYear").innerHTML = y;

  $(".show-pass").on('click', function() {
    $(this).toggleClass('cf-eye');
    $(this).toggleClass('cf-eye-slash');
    $(this).parent().parent().parent().find('input').toggleAttr('type', 'text', 'password');
  });

  // jquery toggle just the attribute value
  $.fn.toggleAttr = function(attr, val1, val2) {
    var test = $(this).attr(attr);
    if (test === val1) {
      $(this).attr(attr, val2);
      return this;
    }
    if (test === val2) {
      $(this).attr(attr, val1);
      return this;
    }
    // default to val1 if neither
    $(this).attr(attr, val1);
    return this;
  };
  </script>

</body>

</html>

Let me know what you need just leave a message/comment  and I will do my very best to make that happen. Hopefully, these templates will help you. Enjoy Coding!

Share this
  •  
  •  
  •  
  •  
  •  
  •  
  • 42
    Shares

Leave a Reply

Your email address will not be published. Required fields are marked *