{{-- Upload this file  --}}
<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js @if(request()->path()=='listing') listing-html @endif" lang="">
<!--<![endif]-->

<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>@section('title') {{ get_option('site_title') }} @show</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    @section('social-meta')
    <meta property="og:title" content="{{ get_option('site_title') }}">
    <meta property="og:description" content="{{ get_option('meta_description') }}">
    <meta property="og:url" content="{{ route('home') }}">
    <meta name="twitter:card" content="summary_large_image">
    <!--  Non-Essential, But Recommended -->
    <meta name="og:site_name" content="{{ get_option('site_name') }}">
    @show

    <!-- bootstrap css -->
    <link rel="stylesheet" href="{{ asset('assets/css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ asset('assets/css/custom.css') }}">

    <link rel="stylesheet" href="{{ asset('assets/css/bootstrap-theme.min.css') }}">
    <!-- Font awesome 4.4.0 -->
    <link rel="stylesheet" href="{{ asset('assets/font-awesome-4.7.0/css/font-awesome.min.css') }}">
    <!-- load page specific css -->

    <!-- main select2.css -->
    <link href="{{ asset('assets/select2-3.5.3/select2.css') }}" rel="stylesheet" />
    <link href="{{ asset('assets/select2-3.5.3/select2-bootstrap.css') }}" rel="stylesheet" />
    <link rel="stylesheet" href="{{ asset('assets/plugins/toastr/toastr.min.css') }}">
    <link rel="stylesheet" href="{{ asset('assets/plugins/nprogress/nprogress.css') }}">

    <!--Font Awesome import-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
        integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
    <!-- Conditional page load script -->
    @if(request()->segment(1) === 'dashboard')
    <link rel="stylesheet" href="{{ asset('assets/css/admin.css') }}">
    <link rel="stylesheet" href="{{ asset('assets/plugins/metisMenu/dist/metisMenu.min.css') }}">
    @endif


    <!-- main style.css -->
    <?php $default_style = get_option('default_style'); ?>
    @if($default_style == 'default')
    <link rel="stylesheet" href="{{ asset('assets/css/style.css') }}">
    @else
    <link rel="stylesheet" href="{{ asset("assets/css/style-{$default_style}.css") }}">
    @endif

    @yield('page-css')

    @if(get_option('additional_css'))
    <style type="text/css">
        {
                {
                get_option('additional_css')
            }
        }
    </style>
    @endif

    <script src="{{ asset('assets/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js') }}"></script>
    <link rel="stylesheet" href="{{ asset('assets/css/custom.listing.css') }}">
    
    <!--Favicon Links-->
    <link rel="apple-touch-icon" sizes="57x57" href="{{ asset('assets/favicon/apple-icon-57x57.png') }}">
    <link rel="apple-touch-icon" sizes="60x60" href="{{ asset('assets/favicon/apple-icon-60x60.png') }}">
    <link rel="apple-touch-icon" sizes="72x72" href="{{ asset('assets/favicon/apple-icon-72x72.png') }}">
    <link rel="apple-touch-icon" sizes="76x76" href="{{ asset('assets/favicon/apple-icon-76x76.png') }}">
    <link rel="apple-touch-icon" sizes="114x114" href="{{ asset('assets/favicon/apple-icon-114x114.png') }}">
    <link rel="apple-touch-icon" sizes="120x120" href="{{ asset('assets/favicon/apple-icon-120x120.png') }}">
    <link rel="apple-touch-icon" sizes="144x144" href="{{ asset('assets/favicon/apple-icon-144x144.png') }}">
    <link rel="apple-touch-icon" sizes="152x152" href="{{ asset('assets/favicon/apple-icon-152x152.png') }}">
    <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('assets/favicon/apple-icon-180x180.png') }}">
    <link rel="icon" type="image/png" sizes="192x192"  href="{{ asset('assets/favicon/android-icon-192x192.png') }}">
    <link rel="icon" type="image/png" sizes="32x32" href="{{ asset('assets/favicon/favicon-32x32.png') }}">
    <link rel="icon" type="image/png" sizes="96x96" href="{{ asset('assets/favicon/favicon-96x96.png') }}">
    <link rel="icon" type="image/png" sizes="16x16" href="{{ asset('assets/favicon/favicon-16x16.png') }}">
    <link rel="manifest" href="/manifest.json">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="{{ asset('assets/favicon/ms-icon-144x144.png') }}">
    <meta name="theme-color" content="#ffffff">
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-163336393-1"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'UA-163336393-1');
    </script>
</head>

<body>
    <!-- Load Facebook SDK for JavaScript -->
    <div id="fb-root"></div>
    <script>
    window.fbAsyncInit = function() {
      FB.init({
        xfbml            : true,
        version          : 'v9.0'
      });
    };
    
    (function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = 'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    
    <!-- Your Chat Plugin code -->
    <div class="fb-customerchat"
      attribution=install_email
      page_id="2324658504422630"
        logged_in_greeting="Welcome to Kupeza! How can we help you?"
        logged_out_greeting="Welcome to Kupeza! How can we help you?">
    </div>
    <!--<div id="page-loader">-->
    <!--    <div id="loading-icon">-->

    <!--    </div>-->

    <!--</div>-->

    <nav class="navbar custom-nav-wide @if(request()->path()=='listing') listingpagenav @endif @if(request()->path()=='dashboard') dashboard-page @endif">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand logo" href="{{ route('home') }}">
                    @if(get_option('logo_settings') == 'show_site_name')
                    {{ get_option('site_name') }}
                    @else
                    @if(logo_url())
                    <img src="{{ logo_url() }}">
                    @else
                    {{ get_option('site_name') }}
                    @endif
                    @endif
                </a>
            </div>
            <div class="collapse navbar-collapse" id="myNavbar">
                <ul class="nav navbar-nav navbar-right topnavbar">
                    {{-- <li class="active"><a href="#">Home</a></li> --}}

                    @if(strcmp( $req, 'sale') == 0 )
                    <li class="@if(request()->path()=='listing') active @endif "><a
                            href="{{route('create_ad')}}">List For Free</a></li>
                    <li class=""><a href="{{ route('listing') }}">Listing</a></li>
                    <li class="active"><a href="{{ route('listing') }}?q=sale">Buy</a></li>
                    <li class=" "><a href="{{ route('listing') }}?q=rent">Rent</a></li>

                    @elseif(strcmp( $req, 'rent') == 0 )
                    <li class=""><a href="{{ route('listing') }}">Listing</a></li>
                    <li class=""><a href="{{ route('listing') }}?q=sale">Buy</a></li>
                    <li class="active"><a href="{{ route('listing') }}?q=rent">Rent</a></li>
                    @else

                    <li class="@if(request()->path()=='listing') active @endif "><a
                            href="{{ route('listing') }}">Listing</a></li>
                    <li class=""><a href="{{ route('listing') }}?q=sale">Buy</a></li>
                    <li class=" "><a href="{{ route('listing') }}?q=rent">Rent</a></li>
                    @endif


                    <li class="@if(request()->path()=='contact-us') active @endif "><a
                            href="{{ route('contact_us_page') }}">Contact Us</a></li>
                    <li class="@if(request()->path()=='about-us') active @endif "><a
                            href="{{ route('about_us_page') }}">About Us</a></li>
                    <li class="@if(request()->path()=='privacy') active @endif "><a
                            href="{{route('privacy')}}">Privacy</a></li>
                    @if( ! Auth::check())
                     <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Login<span
                                class="caret"></span></a>
                        <ul class="dropdown-menu form-nav-drop">
                            {{ Form::open(['route'=>'login','class'=> 'form-nav', 'role'=> 'form']) }}
                            <div class="form-group">
                                <input type="email" class="form-control dd_credentials" name="email"
                                    value="{{ old('email') }}" placeholder="Email Address">
                            </div>
                            <div class="form-group">
                                <input type="password" class="form-control dd_credentials" name="password"
                                    placeholder="Password">
                            </div>
                            <button type="submit"
                                class="btn btn-success form-nav-drop-button">@lang('app.sign_in')</button>
                            {{ Form::close() }}

                            <span class="text-center">or</span>
                            <a href="{{ route('facebook_redirect') }}" class="btn btn-lg btn-block btn-facebook">
                                <i class="fab fa-facebook-square visible-xs"></i>
                                <span class="hidden-xs"><i class="fab fa-facebook-square"
                                        style="font-size: large; color:white;"> </i>Login with Facebook</span>
                            </a><br>
                            <a href="#" class="forgot_pw" data-toggle="modal" data-target="#forgotPasswordEmail">Forgot your password? Please click here.</a>
                        </ul>

                    </li>
                    <li class="@if(request()->path()=='user/create') active @endif "><a
                            href="{{ route('user.create') }}">{{ trans('app.register') }}</a></li>

                    @else
                    <li class="@if(request()->path()=='dashboard/u/posts/create') active @endif "><a
                            href="{{ route('create_ad') }}"> <i class="fa fa-tag"></i> @lang('app.post_an_ad')</a></li>

                    <li class="@if(request()->path()=='dashboard') active @endif ">
                        <a href="{{ route('dashboard') }}">
                            <i class="fa fa-user"></i>
                            @lang('app.hi'), {{ $logged_user->name }}
                        </a>
                    </li>
                    <li>
                        <a href="{{ route('logout') }}">
                            @lang('app.logout')
                        </a>
                    </li>
                    @endif

                </ul>
            </div>
        </div>
    </nav>

<div class="modal fade" id="forgotPasswordEmail" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            {!! Form::open(['route'=>'send_reset_link']) !!}

            <div class="modal-header">
                <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
                <h4 class="modal-title">@lang('app.enter_email_to_reset_password')</h4>
            </div>
            <div class="modal-body">

                    <div class="form-group">
                        <label for="email" class="control-label">@lang('app.email'):</label>
                        <input type="text" class="form-control" id="email" name="email">
                        <div id="email_info"></div>
                    </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">@lang('app.close')</button>
                <button type="submit" class="btn btn-primary" id="send_reset_link">@lang('app.send_reset_link')</button>
            </div>
            </form>

        </div>
    </div>
</div>
