{{--
    Autor: Giovanni López O.
    @gmlo_89
--}}
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>{{ Config::get('core.app_name') }}</title>
        <base href="{{ url('') }}">
        {{-- Cargamos los css necesarios. --}}
        
        
        {{-- Carga lo que ocupe algún modulo en el head --}}
        @yield('head')

        {{-- Estilos del Dashboard --}}
        @if(App::environment('local'))
            <link rel="stylesheet/less" type="text/css" href="{{ asset('backend/less/dashboard.less') }}" />
        @else
            {{ HTML::style('backend/css/dashboard.min.css') }}
        @endif
    </head>
    <body class="login">


        <div class="cont-login">
            <div class="header">
                <p class="title">
                    {{ Config::get('core.app_name'); }}
                </p>
                <p class="description">
                    {{ trans('auth::message.instruction_login') }}
                </p>
            </div>
            {{ Alert::render() }}
            <div class="body">
                {{ Form::open(array('url' => url('admin/login'))) }}
                    <div class="input-group ">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
                        {{ Form::text(
                            'username', 
                            Input::old('username'), 
                            array('class' => 'form-control required', 'placeholder' => trans('auth::label.username'), 'required', 'autofocus')
                        ) }}
                    </div>
                    <div class="input-group ">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
                        {{ Form::password(
                            'password', 
                            array('class' => 'form-control', 'placeholder' => trans('auth::label.password'), 'required')
                        ) }}
                    </div>
                    <label class="checkbox">
                        <input type="checkbox" name="rememberme" value="remember-me" />
                        {{ trans('auth::label.rememberme') }}
                    </label>
                    <button type="submit" class="btn btn-primary btn-lg btn-block">{{ trans('auth::label.login') }}</button>
                {{ Form::close() }}
                @if(Config::get('core.help_to_login'))
                    <a class="login-help" href="{{ url('admin/password/remind') }}">{{ trans('auth::label.loginhelp') }}</a>
                @endif
            </div>
        </div>



        {{-- JS que se necesitaran a lo largo de la aplicación. --}}
        <script src="https://code.jquery.com/jquery.js"></script>
        <script>window.jQuery || document.write('<script src="{{ asset("backend/vendor/jquery/dist/jquery.js") }}"><\/script>')</script>
        
       @if(App::environment('local'))
            <!-- set options before less.js script -->
            <script>
              less = {
                env: "development",
                async: false,
                fileAsync: false,
                poll: 1000,
                functions: {},
                dumpLineNumbers: "comments",
                relativeUrls: false,
                rootpath: ""
              };
            </script>
            {{ HTML::script('backend/vendor/less/dist/less-1.7.0.min.js'); }}
        @endif

        {{ HTML::script('backend/js/bootstrap.min.js'); }}
        {{ HTML::script('backend/js/jquery.validate.js'); }}

        {{-- JS propio para cuando ocupe algunas funciones. --}}
        {{ HTML::script('backend/js/scripts.js'); }}



    </body>
</html>