<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>myClub</title>

        <!-- Fonts -->
        <link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap" rel="stylesheet">

    
        @push('styles')
        <link rel="stylesheet" type="text/css" href="{{ asset('public/css/bootstrap-md.min.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ asset('public/css/all.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ asset('public/css/style.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ asset('public/css/aos.css') }}">
        @endpush
    </head>
    <body>
        <div class="body-wrapper">
            <header>
                <!-- Navbar -->
                <nav class="navbar navbar-expand-lg">
                  <!-- Container wrapper -->
                  <div class="container-fluid">
                    <!-- Navbar brand -->
                    <a class="navbar-brand" href="{{url(ADMIN)}}"><img src="{!! asset('public/images/bgp-logo.png') !!}"></a>

                  </div>
                  <!-- Container wrapper -->
                </nav>
                <!-- Navbar -->
            </header>
            <div class="login-wrapper">

                <form action="{{url(ADMIN.'/login')}}" method="POST">
                {!! Form::open(['url' => ADMIN.'/login', 'method' => 'post', 'role' => 'form' ,'id' => 'login','class' => 'form-wrapper']) !!}
                    @csrf
                    @if(Session::has('message'))
                        <div id="timeoutmsg" class="alertmsg skew alert alert-light tc"><i class="far fa-meh"></i><p>{!!Session::get("message")!!}</p></div>
                        <div class="overlay"></div>
                    @endif

                  <!-- Email input -->
                  <div class="form-section">
                    <label class="form-label">Email </label>
                    <input type="text"  class="form-control emailTrim" name="email" />
                  </div>

                  <!-- Password input -->
                  <div class="form-section">
                    <label class="form-label" >Password</label>
                    <input type="password" name="password" id="password" class="form-control" />
                  </div>

                  <!-- Submit button -->
                  <div class="form-section">
                    <button type="submit" class="btn btn-primary ">Sign In</button>
                  </div>

                  <div class="form-section">
                    <a href="{{url(ADMIN.'/forgotpassword')}}">Forgot  Password?</a>
                  </div>

                  <input type="hidden" name="Login" value="1">

                  <?php /* <div class="form-section">
                    <span class="text">Don’t have an account?</span>
                    <a href="#"> Register here</a>
                  </div> */ ?>
                {!! Form::close() !!}
            </div>
        </div>

        <!-- jQuery -->
        {!! Html::script('public/js/jquery-3.3.1.min.js') !!}
        {!! Html::script('public/js/popper.js') !!}
        {!! Html::script('public/js/bootstrap-md.js') !!}
        <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
        {!! Html::script('public/js/jquery-validate.js') !!}
        {!! Html::script('public/js/all.js') !!}
        {!! Html::script('public/js/aos.js') !!}
        <script>
            $(document).ready(function(){
                $('body').bootstrapMaterialDesign();
                $('.emailTrim').on('input propertychange keyup paste blur',function(){
                    var mailChck = $(this).val();
                    var emailText = $.trim(mailChck);
                    $('.emailTrim').val(emailText);
                    $('.emailTrim').valid();
                });
                setTimeout(function(){ jQuery("#timeoutmsg").hide(); }, 4000);

                $("#login").validate({
                  rules : {
                    email        : {
                      required : true,
                      email  : true
                    },
                    password: {
                      required: true,
                       minlength: 6
                    }
                  },
                  messages : {
                    email: {
                        required: "Please enter email.",
                        email: "Please enter valid email."
                    },
                    password: {
                        required: "Please enter password.",
                        minlength: "Password minimum length must be 6 characters."
                    }
                  }
                });
                // onscroll header shrink

                // $(window).scroll(function() {
                //     var scroll = $(window).scrollTop();


                //     if (scroll >= 200) {

                //         $("#header").addClass("styled-header");
                //     }
                //     else{
                //         $("#header").removeClass("styled-header");
                //     }
                // });

            });

        </script>
    </body>
</html>