<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
    @foreach($tentang as $ttg)
    <link rel="shortcut icon" href="{{asset('mystyle/image/'.$ttg->favicon)}}">
    <title>{{$ttg->judul_website}} | Admin - @yield('title')</title>
    @endforeach

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

    <link rel="stylesheet" href="{{ asset('mystyle/css/style.css') }}">
    <link rel="stylesheet" href="{{ asset('mystyle/css/landingstyle.css') }}">
    <link rel="stylesheet" href="{{ asset('mystyle/css/adminstyle.css') }}">
    
    <link rel="stylesheet" type="text/css" href="{{ asset('owlCarousel/docs/assets/owlcarousel/assets/owl.carousel.min.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ asset('owlCarousel/docs/assets/owlcarousel/assets/owl.theme.default.min.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ asset('fontawesome/css/all.min.css') }}">

    <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js" integrity="sha512-AA1Bzp5Q0K1KanKKmvN/4d3IRKVlv9PYgwFPvm32nPO6QS8yH1HO7LbgB1pgiOxPtfeg5zEn2ba64MUcqJx6CA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>
<body>
    <header class="fixed fixed-top border-bottom border-light">
        <div class="black topbar text-landinglight">
            <div class="container pt-1 pb-1">
                <div>
                    <div class="float-end col-lg-6 col-md-6 col-12 text-lg-end text-md-end text-center">
                        <a href="/admin/logout" class="text-light ms-2 d-lg-block d-md-block d-none"><i class="fas fa-right-from-bracket me-1"></i> Logout</a>
                    </div>
                    <div class="clearfix d-lg-none d-md-none"></div>
                    <div class="float-start col-lg-6 col-md-6 col-12 text-lg-end text-md-end text-center d-lg-none d-md-none">
                        <a href="/admin/logout" class="ms-2 text-light"><i class="fas fa-right-from-bracket me-1"></i> Logout</a>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </header>
    <div class="mt-3">  
        <button class="togle oren" onclick="coba()"><i class="fas fa-burger"></i></button>
        <div id="sidebar" class="sidebar on pt-lg-1 pt-md-1 pt-3 float-start black">
            <div class="pt-5">
                <ul>
                    <a href="/admin/home" class="oren"><li class="oren me-3 mt-2 p-2 rounded"><i class="fas fa-home me-2"></i> Home</li></a>
                    <a href="/admin/about" class="oren"><li class="oren me-3 mt-2 p-2 rounded"><i class="fas fa-info-circle me-2"></i> About</li></a>
                    <a href="/admin/achievement" class="oren"><li class="oren me-3 mt-2 p-2 rounded"><i class="fa-solid fa-trophy me-2"></i> Achievement</li></a>
                    <a href="/admin/portfolio" class="oren"><li class="oren me-3 mt-2 p-2 rounded"><i class="fa-solid fa-list me-2"></i> Portfolio</li></a>
                    <a href="/admin/testimoni" class="oren"><li class="oren me-3 mt-2 p-2 rounded"><i class="fa-solid fa-vial-circle-check me-2"></i> Testimoni</li></a>
                    <a href="/admin/pesan" class="oren"><li class="oren me-3 mt-2 p-2 rounded"><i class="fa-solid fa-message me-2"></i> Message</li></a>
                    <a href="/admin/blog" class="oren"><li class="oren me-3 mt-2 p-2 rounded"><i class="fa-solid fa-newspaper me-2"></i> Blog</li></a>
                </ul>
            </div>
        </div>
        <div id="content-admin" class="content-admin d-lg-block d-md-block d-none on float-start oren"> 
            <div class="ms-2 me-2"> 
    	       @yield('main')
            </div>
        </div>
    </div>
    <div class="clearfix"></div>

    @if ($message = Session::get('success'))
        <script type="text/javascript">
            swal('Berhasil', 'Anda berhasil login', 'success')
        </script>
    @endif
    @if ($message = Session::get('info'))
        <script type="text/javascript">
            swal('Berhasil', 'Data berhasil diupdate', 'success')
        </script>
    @endif
    @if ($message = Session::get('infoerror'))
        <script type="text/javascript">
            swal('Gagal', 'Data gagal diupdate', 'error')
        </script>
    @endif
    @if ($message = Session::get('primary'))
        <script type="text/javascript">
            swal('Berhasil', 'Data berhasil ditambahkan', 'success')
        </script>
    @endif
    @if ($message = Session::get('primaryerror'))
        <script type="text/javascript">
            swal('Gagal', 'Data gagal diupdate', 'error')
        </script>
    @endif
    @if ($message = Session::get('danger'))
        <script type="text/javascript">
            swal('Berhasil', 'Data berhasil dihapus', 'success')
        </script>
    @endif
    @if ($message = Session::get('danger'))
        <script type="text/javascript">
            swal('Gagal', 'Data gagal dihapus', 'error')
        </script>
    @endif

    <script type="text/javascript" src="{{ asset('mystyle/js/script.min.js') }}"></script>
    <script type="text/javascript" src="{{ asset('jquery/jquery.min.js') }}"></script>
    <script type="text/javascript" src="{{ asset('owlCarousel/docs/assets/owlcarousel/owl.carousel.min.js') }}"></script>
    <script type="text/javascript" src="{{ asset('bootstrap/js/bootstrap.bundle.min.js') }}"></script>
    <script type="text/javascript" src="{{ asset('bootstrap/js/bootstrap.min.js') }}"></script>
    <script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
    <script src="https://cdn.datatables.net/1.12.1/js/dataTables.bootstrap5.min.js"></script>
    <script type="text/javascript" src="{{asset('ckeditor/ckeditor.js')}}"></script>
    @yield('script')
</body>
</html>