@extends('layouts.app')
@section('metades')
<meta name="description" content="{{ $data['metaDescription'] }}" />
<meta name="author" content="Kultikri Teacher Training Institute of Higher Studies (KTTIHS)" />
<meta name="keywords" content="Kultikri Teacher Training Institute of Higher Studies (KTTIHS)" />
@endsection
@section('title')
<title>{{ $data['metaTitle'] }}</title>
@endsection
@section('content')
<section class="banner_slider_wrap">
    @foreach ($data['moduleItems'] as $item)
    @if ($item['id'] == 1646)


    <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
        <div class="carousel-inner">
            <div class="carousel-item active">
                <img class="d-block w-100" src="https://wip.tezcommerce.com:3304/admin/module/21/about (1).jpeg"  alt="First slide">
            </div>
            <div class="carousel-item">
                <img class="d-block w-100" src="https://www.kttihs.org/assets/image/about.jpeg" alt="Second slide">
            </div>
             <div class="carousel-item">
                <img class="d-block w-100" src="https://wip.tezcommerce.com:3304/admin/module/21/kul2.jpg" alt="Third slide">
            </div>
               <div class="carousel-item">
                <img class="d-block w-100" src="https://wip.tezcommerce.com:3304/admin/module/21/kul3.jpg" alt="Third slide">
            </div>
               <div class="carousel-item">
                <img class="d-block w-100" src="https://wip.tezcommerce.com:3304/admin/module/21/kul4.jpg" alt="Third slide">
            </div>
              <div class="carousel-item">
                <img class="d-block w-100" src="https://wip.tezcommerce.com:3304/admin/module/21/kul5.jpg" alt="Third slide">
            </div>
               <div class="carousel-item">
                <img class="d-block w-100" src="https://wip.tezcommerce.com:3304/admin/module/21/kul6.jpg" alt="Third slide">
            </div>
              <div class="carousel-item">
                <img class="d-block w-100" src="https://wip.tezcommerce.com:3304/admin/module/21/kul7.png" alt="Third slide">
            </div>
            <div class="carousel-item">
                <img class="d-block w-100" src="https://wip.tezcommerce.com:3304/admin/module/21/kul1.jpg" alt="Third slide">
            </div>
        </div>
        <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
    </div>



    <!-- <div class="banner_slide">
	         @if(count($item['dynamicSections']) > 0)
			@foreach($item['dynamicSections'] as $dynamicSection)
            <img src="{{ $dynamicSection['image'] }}" alt="$dynamicSection['title']">
			 @endforeach
             @endif
          </div>   -->
    @endif
    @endforeach

    <section class="banner_slider_wrap">
        @foreach ($data['moduleItems'] as $item)
        @if ($item['id'] == 1646)



     

        @endif
        @endforeach

        @foreach ($data['moduleItems'] as $item)
        @if ($item['slug'] == 'welcome-kultikri')
        <section class="features-box">
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-md-6 mb-sm-0 mb-3 d-flex">
                        <div class="bg-inner text-center">
                            <div class="w-100  title-bx1">
                                <h3 class="one8">{{ $item['title'] }}</h3>
                            </div>
                            <p>{{ $item['shortDescription'] }}.</p>
                            <a class="btn-n1" href="{{ url('/about-us-3') }}">read more</a>
                        </div>
                    </div>
                    <div class="col-md-4 mb-sm-0 mb-3 d-flex">
                        <div class="about-area6 text-center">
                            <img src="{{ asset('assets/image/about.jpeg') }}" alt="about">
                        </div>
                    </div>
                </div>
            </div>
        </section>
        @endif
        @if ($item['slug'] == 'notice')
    <section class="features-box features-box1">
        <div class="container">
            <div class="row">
                <div class="col-md-6 mb-sm-0 mb-3">
                    <div class="w-100 title-bx1">
                        <h3 class="one8">{{ $item['title'] }}</h3>
                    </div>
                    
                    @if (isset($item['dynamicSections']) && count($item['dynamicSections']) > 0)
                        @php
                            // Sort the dynamicSections by createdAt in descending order
                            $sortedSections = collect($item['dynamicSections'])->sortByDesc('id')->toArray();
                        @endphp

                    @foreach ($sortedSections as $dynamicSection)
          <div class="notice-part">
          <a href="{{ url('/noticedetails') }}/{{ $dynamicSection['slug'] }}">
             <h3>
                {{ $dynamicSection['title'] }} 
                 <a href="{{ $dynamicSection['file'] }}" target="_blank"></a> 
                <br>
                 {{ \Carbon\Carbon::parse($dynamicSection['createdAt'])->format('d M Y') }}
             </h3>
        </a>
          @if (\Carbon\Carbon::parse($dynamicSection['createdAt'])->gte(now()->subDays(15)->endOfDay()))
            <button class="btn-new">New</button>
          @endif
        </div>
       @endforeach
                    @endif
                    
                    <div class="col-md-12 px-0 text-center">
                        <a href="{{ url('/notice-3') }}" class="btn-n1">View More</a>
                    </div>
                </div>
                
                <div class="col-md-6 mb-sm-0 notice_cat">
                    <img src="{{ asset('assets/image/group88.png') }}" alt="group88">
                </div>
            </div>
        </div>
    </section>
@endif

        @if ($item['slug'] == 'admission')
        <section class="admissionForms collage-area">
            <div class="container">
                <div class="w-100 title-bx1">
                    <h3 class="one8">{{ $item['title'] }}</h3>
                    <p class="headTag">{{ $item['shortDescription'] }}</p>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <ul class="admFormsList">
                            @if (count($item['dynamicSections']) > 0)
                            @foreach ($item['dynamicSections'] as $dynamicSection)
                            <li><a href="{{ url('/admission-form-3') }}">
                                    <h6>{{ $dynamicSection['title'] }}</h6>
                                    <p>{{ $dynamicSection['description'] }}</p>
                                    <span>Apply Now</span>
                                </a></li>
                            @endforeach
                            @endif
                        </ul>
                    </div>
                </div>
            </div>
        </section>
        @endif
        @if ($item['slug'] == 'chairmans-quote')
        <section class="chairmainQuote">
            <div class="container">
                <div class="w-100 title-bx1">
                    <h3 class="one8">{{ $item['title'] }}</h3>
                    <p class="headTag">{{ $item['shortDescription'] }}</p>
                </div>
                <div class="Testimonials">
                    <div class="item">
                        <div class="row">
                            <div class="col-md-5 pl-md-5 text-center">
                                <span class="radius-box-img">
                                    <img src="{{ asset('assets/image/01.jpg') }}" alt="01.png">
                                </span>
                            </div>
                            <div class="col-md-7 pera-dtls">
                                <span class="icon"><img src="{{ asset('assets/image/cup.png') }}" alt="cup" /></span>
                                <h5>We Offer You a <span>Bright Future</span></h5>
                                <p>
                                    {{ $item['longDescription'] }}
                                </p>
                                <span class="signature">Mihir Kumar Barik</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        @endif
        @if ($item['slug'] == 'ourmission-vission')
        <section class="missionVision">
            <div class="container">
                <div class="row">
                    <div class="col-md-6 mvSide">
                        <h5>Our Mission & <span>Vision</span></h5>
                        <p class="introPara"> {{ $item['shortDescription'] }}</p>
                        <p>{{ $item['longDescription'] }}</p>
                        <a href="{{ url('/contact-us-3') }}" class="btn-n1">Contact Us</a>
                    </div>
                    <div class="col-md-6 eventsSide">
                        <h5>Upcoming <span>Events</span></h5>
                        <ul class="eventsList">
                            @if (count($item['dynamicSections']) > 0)
                            @foreach ($item['dynamicSections'] as $dynamicSection)
                            <li>
                                <div class="dateSide">{{ $dynamicSection['title'] }}</div>
                               <div class="matrSide">
    {!! strip_tags($dynamicSection['description'], '<p><b><strong><i><ul><li><br>') !!}
</div>
                            </li>
                            @endforeach
                            @endif

                        </ul>
                    </div>
                </div>
            </div>
        </section>
        @endif
        @if ($item['slug'] == 'collegefacilities')
        <section class="collegeFacilities">
            <div class="container">
                <div class="w-100 title-bx1">
                    <h3 class="one8">{{ $item['title'] }}</h3>
                    <p class="headTag">{{ $item['shortDescription'] }}</p>
                </div>
                <div class="row">
                    @if (count($item['dynamicSections']) > 0)
                    @foreach ($item['dynamicSections'] as $dynamicSection)
                    <div class="col-md-4">
                        <img src="{{ $dynamicSection['image'] }}" alt="head-img" />
                        <span>{{ $dynamicSection['title'] }}</span>
                    </div>
                    @endforeach
                    @endif
                </div>
            </div>
        </section>
        @endif
        @if ($item['slug'] == 'gallery-videos')
        <section class="testimonials-bx">
            <div class="container">
                <div class="w-100 title-bx1">
                    <h3 class="one8">Gallery</h3>
                    <p class="headTag">Some Best moments and memories of our Institute</p>
                </div>
                <div data-id="{{ count($item['dynamicSections']) }}">
                    @if (count($item['dynamicSections']) > 0)
                    <div id="owl-demo2" class="owl-carousel owl-theme">
                        @foreach ($item['dynamicSections'] as $dynamicSection)
                        <div class="item">
                            <div class="count_icon">
                                <iframe width="220" height="95" src="{{$dynamicSection['link']}}"></iframe>
                            </div>

                        </div>
                        @endforeach
                    </div>
                    @endif
                </div>
            </div>
        </section>
        @endif
        <script src="https://www.rabedc.com/js/slick/slick.js"></script>
        <!-- <script type="text/javascript">
    $(document).ready(function() {
        $('.banner_slide').slick({
            infinite: true,
            slidesToShow: 1,
            slidesToScroll: 1,
            autoplay: true,
            autoplaySpeed: 2000
        });
    });
</script> -->
        @endforeach
        @endsection