@extends('admin.layouts.app')

@section('header-script')
@include('admin.layouts.dashboard-header-script')
@endsection


@section('content')


<!-- Page-Title -->
<div class="row">
    <div class="col-sm-12">
        <!--
						<ul class="nav nav-pills nav-pills-custom display-xs-none pull-right m-t-25">
                            <li role="presentation"><a href="#">Today</a></li>
                            <li role="presentation" class="active"><a href="#">Yesterday</a></li>
                            <li role="presentation"><a href="#">Last Week</a></li>
                        </ul>
                          -->
        <h4 class="page-title"><span>Welcome</span> <span
                style="color: #fe6271 ;text-transform: uppercase;">{{ Auth::user()->name }}</span> To <span
                style="color: red;">Rajtextile</span> <span>School</span></h4>
    </div>
</div>
</div>

<div class="container">

    @foreach($allepisodes->chunk(3) as $chunk)
    <div class="row" style="width: 100%;">

        @foreach($chunk as $episode)
        <div style="width: 30%; float:left; border:1px solid #000000; margin-left:10px; margin-top:10px; ">

            <div style="width:100%">
                <img class="card-img-top" style="width:100%;"
                    src="{{url('/public/images')}}/{{$episode->image_episode}}" alt="image not found">
            </div>
            <div style="font-size:20px; text-align:center; background-color:white; color:red;">
                রাউন্ডের নাম: {{$episode->section_one}}

            </div>
            <div style="font-size:20px; text-align:center; background-color:green; color:#ffffff; line-height:40px;">
                সেকশনের নাম: {{$episode->section_one}}
            </div>
            @if($episode->section_two)
            <div style="font-size:20px; text-align:center; background-color:red; color:#ffffff; line-height:40px;">
                সেকশনের নাম: {{$episode->section_two}}
            </div>
            @else
            <div style="font-size:20px; text-align:center; background-color:red; color:red; line-height:40px;">
                এই রাউন্ডে একটি সেশন মাত্র
            </div>
            @endif
            <div style="font-size:20px; text-align:center; background-color:green; color:#ffffff; line-height:40px;">
                অংশগ্রহনে: {{$episode->number}}
            </div>
            <div>
                <a style="width: 49%;" href="{{url('admin/allepisode')}}/{{$episode->id}}/edit"
                    class="btn btn-info btn-sm">
                    <span class="glyphicon glyphicon-edit"> </span> Edit Episode Info
                </a>


                <a style="width: 50%;" href="{{url('admin/allepisode')}}/{{$episode->id}}/show"
                    class="btn btn-info btn-sm">
                    <span class="glyphicon glyphicon-details"> </span> Details Episode
                </a>
            </div>

        </div>

        @endforeach
    </div>
    @endforeach

</div>

</div>
</div>
</div><!-- end col -->

</div>
<!-- end row -->


<!-- Footer -->
@section('footer')
@include('admin.layouts.footer')
@endsection
<!-- End Footer -->

@endsection

@section('footer-script')
@include('admin.layouts.dashboard-footer-script')
@endsection