<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{{ENV('APP_NAME')}}</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="/backend/bootstrap/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="/backend/dist/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
        page. However, you can choose any other skin. Make sure you
        apply the skin class to the body tag so the changes take effect.
  -->

  <link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css" rel="stylesheet">
  @if(false)
    <!--<link rel="stylesheet" href="/plugins/wysiwyg/wysiwyg.css">
    <!--<link rel="stylesheet" href="/backend/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">-->
  @endif

  <link rel="stylesheet" href="/backend/dist/css/skins/skin-black.min.css">
  <link rel="stylesheet" href="/backend/css/admin-custom.css">
  @yield('extra_css')
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<!--
BODY TAG OPTIONS:
=================
Apply one or more of the following classes to get the
desired effect
|---------------------------------------------------------|
| SKINS         | skin-blue                               |
|               | skin-black                              |
|               | skin-purple                             |
|               | skin-yellow                             |
|               | skin-red                                |
|               | skin-green                              |
|---------------------------------------------------------|
|LAYOUT OPTIONS | fixed                                   |
|               | layout-boxed                            |
|               | layout-top-nav                          |
|               | sidebar-collapse                        |
|               | sidebar-mini                            |
|---------------------------------------------------------|
-->
<body class="hold-transition skin-black fixed sidebar-mini">
<div class="wrapper">

  <!-- Main Header -->
  <header class="main-header">

    <!-- Logo -->
    <a href="/admin/dashboard" class="logo">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini">{{ENV('APP_NAME')}}</span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><img src="/logo.png" width="80"></span>
    </a>

    <!-- Header Navbar -->
    <nav class="navbar navbar-static-top" role="navigation">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>
      <!-- Navbar Right Menu -->
      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <li><a href="/" target="_blank">HOME</a></li>
          <li class="dropdown user user-menu">
            <!-- Menu Toggle Button -->
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <!-- The user image in the navbar-->
              <img src="/backend/dist/img/profile.png" class="user-image" alt="User Image">
              <!-- hidden-xs hides the username on small devices so only the image appears. -->
              <span class="hidden-xs">{{ Auth::user()->name }}</span>
            </a>
            <ul class="dropdown-menu">

              <li class="user-header">
                <img src="/backend/dist/img/profile.png" class="img-circle" alt="User Image">
                <p>
                  {{ Auth::user()->name }}
                </p>
              </li>

              <li class="user-footer">
                <!--<div class="pull-left">
                  <a href="#" class="btn btn-default btn-flat">Profile</a>
                </div>-->
                <div class="pull-right">
                  <a href="/logout" class="btn btn-default btn-flat">Logout</a>
                </div>
              </li>
            </ul>
          </li>

        </ul>
      </div>
    </nav>
  </header>
  <!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">

      <!-- Sidebar user panel (optional) -->
      <div class="user-panel">
        <div class="pull-left image">
          <img src="/backend/dist/img/profile.png" class="img-circle" alt="User Image">
        </div>
        <div class="pull-left info">
          <p>{{ Auth::user()->name }}</p>
          <!-- Status -->
          <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
        </div>
      </div>

      <!-- Sidebar Menu -->
      <ul class="sidebar-menu">

        <li><a href="/admin/dashboard"><i class="fa fa-link"></i> <span>Dashboard</span></a></li>
        <li class="header" style="color:white; font-weight: bold;">CONTENUTI, SEZIONI e BANNER</li>
        <li><a href="/admin/news"><i class="fa fa-link"></i> <span>Crea news/News pubblicate</span></a></li>
        <li><a href="/admin/breaking_news"><i class="fa fa-link"></i> <span>Gestione Breaking News</span></a></li>
        @if(Auth::user()->level == 0)
        <li><a href="/admin/home"><i class="fa fa-link"></i> <span>Gestione primo piano</span></a></li>
          <li><a href="/admin/sections"><i class="fa fa-link"></i> <span>Gestione layout, news e banner</span></a></li>

          <li><a href="/admin/events"><i class="fa fa-link"></i> <span>Gestione pagine Eventi</span></a></li>
          <li><a href="/admin/pages"><i class="fa fa-link"></i> <span>Gestione Pagine Web</span></a></li>
          <li><a href="/admin/home_adv"><i class="fa fa-link"></i> <span>Gestione banner home-top</span></a></li>

          <li class="header" style="color:white; font-weight: bold;">CAMPIONATI</li>
          <li><a href="/admin/seasons"><i class="fa fa-link"></i> <span>Crea Stagione</span></a></li>
          <li><a href="/admin/calendars"><i class="fa fa-link"></i> <span>Crea calendario/import</span></a></li>
          <li><a href="/admin/categories"><i class="fa fa-link"></i> <span>Gestione Categorie/gironi</span></a></li>
          <li><a href="/admin/teams"><i class="fa fa-link"></i> <span>Modifica Squadre</span></a></li>

          <li class="header" style="color:white; font-weight: bold;">MULTIMEDIA</li>
          <li><a href="/admin/home_radio"><i class="fa fa-link"></i> <span>Gestione Webradio</span></a></li>
          <li><a href="/admin/videos"><i class="fa fa-link"></i> <span>Gestione Video homepage</span></a></li>

          <li class="header" style="color:white; font-weight: bold;">AMMINISTRAZIONE</li>
          <li><a href="/admin/users"><i class="fa fa-link"></i> <span>Gestione Utenti</span></a></li>
        @endif
      </ul>
      <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        @yield('title')
      </h1>
      <ol class="breadcrumb" style="min-width: 50%">
        @yield('breadcrumb')

      </ol>
    </section>

    <!-- Main content -->
    <section class="content">

      @if (Session::has('message'))
          <div class="alert alert-success alert-dismissable">
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
              {{ Session::get('message') }}
          </div>
      @endif

      @if (Session::has('error'))
          <div class="alert alert-danger alert-dismissable">
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
              {{ Session::get('error') }}
          </div>
      @endif

      @if ($errors->any())
          <div class="alert alert-danger alert-dismissable">
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
              @foreach ( $errors->all() as $error )
                  <p>{{ $error }}</p>
              @endforeach
          </div>
      @endif

      @yield('content')

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

  <!-- Main Footer -->
  <footer class="main-footer">
    <!-- To the right -->
    <div class="pull-right hidden-xs">

    </div>
    <!-- Default to the left -->
    <strong>Copyright &copy; {{date("Y")}} <a href="#">Calcio a 5 anteprima</a>.</strong> All rights reserved.
  </footer>
  <!-- /.control-sidebar -->
  <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->

</div>
<!-- ./wrapper -->

<!-- REQUIRED JS SCRIPTS -->

<!-- jQuery 2.2.3 -->
<script src="/backend/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="/backend/bootstrap/js/bootstrap.min.js"></script>
<!-- AdminLTE App -->
<script src="/backend/dist/js/app.min.js"></script>

@if(false)
  <script src="/plugins/wysiwyg/wysiwyg.js"></script>
  <script src="/backend/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
@endif
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/lang/summernote-it-IT.js"></script>

<script type="text/javascript">
  $('.onlyNumber').keyup(function () {
      this.value = this.value.replace(/[^0-9\.]/g,'');
  });
</script>

@yield('extra_js')
<script src="/backend/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>


<!-- Optionally, you can add Slimscroll and FastClick plugins.
     Both of these plugins are recommended to enhance the
     user experience. Slimscroll is required when using the
     fixed layout. -->
</body>
</html>
