@extends('webprofile.front.jollyany.master')

@section('meta')
<meta name="{{ Str::slug($setting['web_title']) }}" content="custom"/>
  <meta name="description" content="{{ $setting['web_title'] }}">
  @if(array_key_exists('default_keyword', $setting))
<meta name="keywords" content="{{ $setting['default_keyword'] }}">
  @endif
<meta name="author" content="{{ $setting['web_title'] }}">
@endsection

@section('slider')
  <section class="slider-wrapper">
      <div class="tp-banner-container">
          <div class="tp-banner" >
            <ul><!-- SLIDE  -->
              @foreach($slider as $value)
              <li data-transition="fade" data-slotamount="7" data-masterspeed="1500" >
                  @if ($setting['external_storage'] == 1)
                      <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/slider/' . $value->slider }}" data-bgfit="cover" data-bgposition="center center" data-bgrepeat="no-repeat" alt="{!! $value->title !!}">
                  @else
                      <img src="{{ url('/storage/slider/' . $value->slider) }}" data-bgfit="cover" data-bgposition="center center" data-bgrepeat="no-repeat" alt="{!! $value->title !!}">
                  @endif
              </li>
              @endforeach
            </ul>
            <div class="tp-bannertimer"></div>
          </div>
      </div>
  </section><!-- end slider-wrapper -->
@endsection

@section('content')

<section class="white-wrapper">
    <div class="container">
      {{--
        <div class="calloutbox">
            <div class="col-lg-10">
                <h2><MARquee><span style="color: yellow;">SIPENMARU</span>, penerimaan mahasiswa baru unesa 2022</MARquee></h2>
                <p style="text-transform: capitalize;">informasi pendaftaran, pengumuman, daftar ulang mahasiswa baru.</p>
            </div>
            <div class="col-lg-2">
                <a class="btn pull-right btn-dark btn-lg margin-top" href="https://sipenmaru.unesa.ac.id/" target="_blank">klik di sini!</a>
            </div>
        </div><!-- end messagebox -->
--}}
        <div class="clearfix"></div>

            <div class="general-title padding-top">  
              @if(isset($setting['ppid']) && strtolower($setting['ppid']) ==  'ult') 
                <h2 style="text-transform: uppercase; color: #ffffff;">berita {{$setting['web_title']}}</h2>
                @else
                <h2 style="text-transform: uppercase; color: #606160;">berita {{$setting['web_title']}}</h2>
                @endif
                <hr>
                <br>
            </div>
                <div class="shop_wrapper col-lg-12 col-md-12 col-sm-12 col-xs-12">
                @foreach($posthome as $value)
                    
                       <div class="general_row">
                        <div class="shop-left shop_item col-lg-6">
                            <div class="entry">
                            @if($value->thumbnail)
                                            @if ($setting['external_storage'] == 1)
                                                <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/thumbnail/' . $value->thumbnail }}" alt="" class="img-responsive">
                                            @else
                                                <img src="{{ url('/storage/thumbnail/' . $value->thumbnail) }}" alt="" class="img-responsive">
                                            @endif 
                                            @endif 
                            <div class="magnifier">
                                    <div class="buttons">
                                        <a class="st" rel="bookmark" href="{!! url('post/'.$value->slug) !!}"><i class="fa fa-link"></i></a>
                                    </div><!-- end buttons -->
                                </div><!-- end magnifier -->
                            </div><!-- entry --> 
                        </div><!-- end shop-left -->

                        <div class="shop-right col-lg-6">
                            <div class="title">  
                                <span class="price">
                                  
                                @if(isset($setting['ppid']) && strtolower($setting['ppid']) ==  'ult')  
                                <a href="{!! url('post/'.$value->slug) !!}"><h2 style="color: #ffffff;">{{$value->title}}</h2></a>          
                                </div><!-- end title -->
                                <div class="shop_desc">
                                    <p style="color: #ffffff;">{!! strip_tags(substr(html_entity_decode($value->content,ENT_COMPAT,"UTF-8"),0 , 250)) !!}</p>
                                </div><!-- end shop_desc -->
                                <div class="blog-carousel-meta">
                                      <span style="color: #ffffff;"><i class="fa fa-calendar"></i> {!! InseoHelper::tglbulanindo2($value->post_date) !!}</span>
                                      @if($value->comment_status)
                                      <span><i class="fa fa-comment"></i> <a href="#">{!! $value->comment_count !!} Comments</a></span>
                                      @endif
                                      <span><i class="fa fa-eye"></i> <a href="#" style="color: #ffffff;" >{!! $value->viewer !!} Views</a></span>
                                  </div><!-- end blog-carousel-meta -->
                                  <br>    
                                @else
                                <div class="blog-carousel-meta">
                                      <span><i class="fa fa-calendar"></i> {!! InseoHelper::tglbulanindo2($value->post_date) !!}</span>
                                      @if($value->comment_status)
                                      <span><i class="fa fa-comment"></i> <a href="#">{!! $value->comment_count !!} Comments</a></span>
                                      @endif
                                      <span><i class="fa fa-eye"></i> <a href="#">{!! $value->viewer !!} Views</a></span>
                                  </div><!-- end blog-carousel-meta -->
                                   <a href="{!! url('post/'.$value->slug) !!}"><h2>{{$value->title}}</h2></a>          
                                </div><!-- end title -->
                                <div class="shop_desc">
                                    <p>{!! strip_tags(substr(html_entity_decode($value->content,ENT_COMPAT,"UTF-8"),0 , 250)) !!}</p>
                                </div><!-- end shop_desc -->

                                @endif
                            </div><!-- end shop-right -->
                        </div><!-- end row -->
                  @endforeach     
                {{--
                <div class="clearfix"></div>
                <br>
                                <div class="carousel_wrapper">
                                <div class="margin-top">
                                      <div id="owl_shop_carousel" class="owl-carousel">
                                      @foreach($posts as $value)
                                        <div class="shop_carousel">
                                          <div class="shop_item">
                                            <div class="entry">
                                            @if($value->thumbnail)
                                            @if ($setting['external_storage'] == 1)
                                                <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/thumbnail/' . $value->thumbnail }}" alt="" class="img-responsive">
                                            @else
                                                <img src="{{ url('/storage/thumbnail/' . $value->thumbnail) }}" alt="" class="img-responsive">
                                            @endif 
                                            @endif
                                                <div class="magnifier">
                                                    <div class="buttons">
                                                        <a class="st" rel="bookmark" href="{!! url('post/'.$value->slug) !!}"><i class="fa fa-link"></i></a>
                                                    </div><!-- end buttons -->
                                                </div><!-- end magnifier -->
                                            </div><!-- end entry -->
                                            <div class="shop_desc">
                                                <div class="shop_title pull-left">
                                                    <a href=""><span>{{$value->title}}</span></a>
                                                    <p>{!! strip_tags(substr(html_entity_decode($value->content,ENT_COMPAT,"UTF-8"),0 , 250)) !!}</p>
                                                </div>
                                            </div><!-- end shop_desc -->
                                        </div><!-- end item -->
                                    </div><!-- end shop carousel -->
                                   @endforeach
                                   --}}
                                </div><!-- end owl_blog_three_line -->
                        <div class="shop_meta">
                            <div class="text-center">
                                <div class="btn-shop">
                                    <a href="{!! url('archive') !!}" class="btn woo_btn btn-primary">lihat berita selengkapnya</a> <a href="{!! url('archive') !!}"><span><i class="fa fa-angle-right"></i></span></a>
                                </div>
                            </div><!-- end pull-right -->
                        </div><!-- end shop meta -->
                    </div><!-- end padding-top -->
                </div><!-- end carousel_wrapper -->  
            </div><!-- end shop-wrapper -->
        </div>
    </section>

  
    {{-- Label Body Tambahan --}}
    @if ($body->count() != 0)
    <section class="panel-wrapper jt-shadow" style="padding-bottom: 25px;">
        @foreach ($body as $value)
        <div class="container">
            <div class="general-title">
                <h2>{!! $value->title_design !!}</h2>
                <hr>
            </div>
        </div>
        <!-- end container -->
        {!! $value->value_design !!}
        @endforeach
        <div class="clearfix"></div>
    </section>
    @endif

    {{-- Label Gallery --}}
    @if ($gallery->count() != 0)
    
    <section class="panel-wrapper jt-shadow">
        <div class="container">
            <div class="general-title">
                <h2>Galeri</h2>
                <hr>
            </div>
                   <div class="carousel_wrapper">
                                <div class="margin-top">
                                      <div id="owl_shop_carousel" class="owl-carousel">
                                      @foreach($gallery as $value)
                                        <div class="shop_carousel">
                                          <div class="shop_item">
                                            <div class="entry">
                                          
                                            @if ($setting['external_storage'] == 1)
                                                <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/gallery/' . $value->gallery }}" alt="" class="img-responsive">
                                            @else
                                                <img src="{{ url('/storage/gallery/' . $value->thumbnail) }}" alt="" class="img-responsive">
                                            @endif 
                                          
                                            <div class="magnifier">
                                            <div class="buttons">
                                              <a class="st btn btn-default" rel="bookmark" href="{{ $setting['url_static'] . '/' . $setting['directory'] . '/gallery/' . $value->gallery }}" target="_blank">
                                                View
                                              </a>
                                              <h3>{!! $value->title !!}</h3>
                                            </div><!-- end buttons -->
                                          </div><!-- end magnifier -->
                                            </div><!-- end entry -->
                                            
                                        </div><!-- end item -->
                                    </div><!-- end shop carousel -->
                                    @endforeach
                                    </div><!-- end padding-top -->
                </div><!-- end carousel_wrapper -->  
        </div>
       
        <!-- end container -->{{--
        <div class="portfolio_wrapper padding-top" style="position: relative; overflow: hidden; height: 372px;">
          <div class="portfolio_item" style="position: absolute; left: 0px; top: 0px; transform: translate(0px, 30px); width: 379px;">
            <div class="entry">
              <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/gallery/' . $gallery[0]->gallery }}" alt="" class="img-responsive">
              <div class="magnifier">
                <div class="buttons">
                  <a class="st btn btn-default" rel="bookmark" href="{{ $setting['url_static'] . '/' . $setting['directory'] . '/gallery/' . $gallery[0]->gallery }}" target="_blank">
                    View
                  </a>
                  <h3>{!! $gallery[0]->title !!}</h3>
                </div><!-- end buttons -->
              </div><!-- end magnifier -->
            </div><!-- end entry -->
          </div><!-- end portfolio_item -->
          @if(isset($gallery[1]))
          <div class="portfolio_item" style="position: absolute; left: 0px; top: 0px; transform: translate(379px, 30px); width: 379px;">
            <div class="entry">
              <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/gallery/' . $gallery[1]->gallery }}" alt="" class="img-responsive">
              <div class="magnifier">
                <div class="buttons">
                  <a class="st btn btn-default" rel="bookmark" href="{{ $setting['url_static'] . '/' . $setting['directory'] . '/gallery/' . $gallery[1]->gallery }}" target="_blank">
                    View
                  </a>
                  <h3>{!! $gallery[1]->title !!}</h3>
                </div><!-- end buttons -->
              </div><!-- end magnifier -->
            </div><!-- end entry -->
          </div><!-- end portfolio_item -->
          @endif
          @if(isset($gallery[2]))
          <div class="portfolio_item" style="position: absolute; left: 0px; top: 0px; transform: translate(758px, 30px); width: 379px;">
            <div class="entry">
              <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/gallery/' . $gallery[2]->gallery }}" alt="" class="img-responsive">
              <div class="magnifier">
                <div class="buttons">
                  <a class="st btn btn-default" rel="bookmark" href="{{ $setting['url_static'] . '/' . $setting['directory'] . '/gallery/' . $gallery[2]->gallery }}" target="_blank">
                    View
                  </a>
                  <h3>{!! $gallery[2]->title !!}</h3>
                </div><!-- end buttons -->
              </div><!-- end magnifier -->
            </div><!-- end entry -->
          </div><!-- end portfolio_item -->
          @endif
          @if(isset($gallery[3]))
          <div class="portfolio_item" style="position: absolute; left: 0px; top: 0px; transform: translate(1137px, 30px); width: 379px;">
            <div class="entry">
              <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/gallery/' . $gallery[3]->gallery }}" alt="" class="img-responsive">
              <div class="magnifier">
                <div class="buttons">
                  <a class="st btn btn-default" rel="bookmark" href="{{ $setting['url_static'] . '/' . $setting['directory'] . '/gallery/' . $gallery[3]->gallery }}" target="_blank">
                    View
                  </a>
                  <h3>{!! $gallery[3]->title !!}</h3>
                </div><!-- end buttons -->
              </div><!-- end magnifier -->
            </div><!-- end entry -->
          </div><!-- end portfolio_item -->
          @endif
        </div>--}}
        <div class="clearfix"></div>
    </section>
    @endif 

    <section class="make-bg-full">
      <div id="myCarousel" class="carousel slide" data-ride="carousel">
        <!-- Wrapper for slides -->
        <div class="carousel-inner">
            @foreach ($quote as $value)
                <div class="item @if($value->urutan == 1) active @endif">
                    <div class="calloutbox-full-mini nocontainer">
                        <div class="long-twitter">
                        @if($value->title_show == true)
                            <p class="lead">
                           
                            {!! $value->value_design !!}
                            <div style="text-align: center; font-size: 14pt;">{!! $value->title_design !!}</div>
                            </p>
                            @endif
                        </div>
                    </div>
                </div>
            @endforeach
        </div>
        <br>
        <br>
        <!-- Indicators -->
        <ol class="carousel-indicators">
            @for($i=0; $i<$quote->count(); $i++)
            <li data-target="#myCarousel" data-slide-to="{!! $i !!}" @if($i==0) class="active" @endif></li>
            @endfor
        </ol>
    </div>
  </section><!-- make bg -->
@endsection