@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')
@if(isset($setting['body_position']) && strtolower($setting['body_position']) == 'atas')
@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">
            @if($value->rDe)
                <h2>{!! $value->rDe->title_design !!}</h2>
                <hr>
                @endif
            </div>
        </div>
        <!-- end container -->
        @if($value->rDe)
        {!! $value->rDe->value_design !!}
        @endif
        @endforeach
        <div class="clearfix"></div>
    </section>
    @endif
    @endif
  <section class="blog-wrapper">
  	<div class="container">
      	<div id="content" class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
          	<div class="title">
                <h2>Neuesten Nachrichten
                  <div style="font-size:12px; float:right"><a href="{!! url('archive') !!}" class="btn btn-box"><i class="fa fa-chevron-circle-right"></i> Siehe vollständige Nachrichten</a></div>
                </h2>
              </div><!-- end title -->

              <div class="row">
                 <div class="blog-masonry">
                    <?php $e=1; ?>
                    @foreach($posts as $value)
                      <div class="col-lg-6 @if($e%2 != 0) first @else last @endif">
                          <div class="blog-carousel">
                              <div class="entry">
                                  @if($value->thumbnail)
                                    <center>
                                        @if ($setting['external_storage'] == 1)
                                        <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/thumbnail/' . $value->thumbnail }}" alt="" class="img-responsive" style="height: 150px; width: auto;">
                                        @else
                                        <img src="{{ url('/storage/thumbnail/' . $value->thumbnail) }}" alt="" class="img-responsive" style="height: 150px; width: auto;">
                                        @endif
                                    </center>
                                  @endif
                              </div>
                              <div class="blog-carousel-header">
                                  @if ($value->rDe)
                                  <h3><a title="{!! $value->title !!}" href="{!! url('post/'.$value->slug) !!}">{!! $value->rDe->title !!}</a></h3>
                                  @endif
                                  <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 -->
                              </div><!-- end blog-carousel-header -->
                              <div class="blog-carousel-desc">
                                  {{-- <p>{!! substr(html_entity_decode($value->content),0 , 250) !!}</p> --}}
                                  @if ($value->rDe)
                                  <p>{!! strip_tags(substr(html_entity_decode($value->rDe->content,ENT_COMPAT,"UTF-8"),0 , 250)) !!}</p>
                                  @endif
                                  {{-- <p>{!! $value->content !!}</p> --}}
                              </div><!-- end blog-carousel-desc -->
                          </div><!-- end blog-carousel -->
                      </div><!-- end col-lg-4 -->
                      <?php $e++; ?>
                    @endforeach
                  </div><!-- end blog-masonry -->

                  <div class="clearfix"></div>

                  <hr>

                  <div class="pagination_wrapper">
                      <!-- Pagination Normal -->
                      <ul class="pagination">
                          {!! $posts->render() !!}
                      </ul>
                  </div><!-- end pagination_wrapper -->

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

      	<div id="sidebar" class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
            {{-- <div class="widget">
                <div id="google_translate_element"></div>
                <script>
                function googleTranslateElementInit() {
                    new google.translate.TranslateElement({
                        pageLanguage: 'id'
                    }, 'google_translate_element');
                }
                </script>
                <script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
            </div> --}}
            
          	<div class="widget">
            	<div class="title">
                <h2>AGENDA</h2>
              </div><!-- end title -->
              <ul class="recent_posts_widget">
                  @foreach($agenda as $value)
                  <li>
                    <a href="{!! url('agenda/'.$value->slug) !!}"><img src="https://www.unesa.ac.id/assets/demos/logounesa.png" alt="">@if ($value->rDe) {!! $value->rDe->title !!} @endif</a>
                    <a class="readmore" href="#">{!! InseoHelper::tglbulanindo2($value->event_date) !!}</a>
                  </li>
                  @endforeach
              </ul>
              <a href="{!! url('agendas') !!}" class="btn btn-primary">Siehe vollständige Agenda</a>
            </div><!-- end widget -->


            <div class="widget">
            	<div class="title">
                <h2>Information</h2>
              </div><!-- end title -->
              <ul class="recent_posts_widget">
                  @foreach($info as $value)
                  <li>
                    <a href="{!! url('information/'.$value->slug) !!}"><img src="https://www.unesa.ac.id/assets/demos/logounesa.png" alt="">@if ($value->rDe) {!! $value->rDe->title !!} @endif</a>
                    <a class="readmore" href="#">{!! InseoHelper::tglbulanindo2($value->event_date) !!}</a>
                  </li>
                  @endforeach
              </ul>
              <a href="{!! url('informations') !!}" class="btn btn-primary">Siehe vollständige Informationen</a>
            </div><!-- end widget -->          	
            
            
            <div class="widget">
              <div id="tabbed_widget" class="tabbable">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#recent" data-toggle="tab">Neueste</a></li>
                    <li><a href="#new" data-toggle="tab">Beliebt</a></li>
                </ul>
                <div class="tab-content">
                    <div class="tab-pane active" id="recent">
                        <ul class="recent_posts_widget">
                            @foreach($resend as $value)
                            <li>
                              <a href="{!! url('post/'.$value->slug) !!}">
                                @if($value->thumbnail)
                                @if ($setting['external_storage'] == 1)
                                <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/thumbnail/' . $value->thumbnail }}" alt="">
                                @else
                                <img src="{{ url('/storage/thumbnail/' . $value->thumbnail) }}" alt="">
                                @endif
                                @endif @if ($value->rDe) {!! $value->rDe->title !!} @endif
                              </a>
                              <a class="readmore" href="{!! url('post/'.$value->slug) !!}">{!! InseoHelper::tglbulanindo2($value->post_date) !!}</a>
                            </li>
                            @endforeach
                        </ul><!-- recent posts -->
                    </div>
                    <div class="tab-pane" id="new">
                        <ul class="recent_posts_widget">
                          @foreach($hot as $value)
                          <li>
                            <a href="{!! url('post/'.$value->slug) !!}">@if($value->thumbnail)@if ($setting['external_storage'] == 1)
                            <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/thumbnail/' . $value->thumbnail }}" alt="" class="img-responsive" style="height: 150px; width: auto;">
                            @else
                            <img src="{{ url('/storage/thumbnail/' . $value->thumbnail) }}" alt="" class="img-responsive" style="height: 150px; width: auto;">
                            @endif
                            @endif @if ($value->rDe) {!! $value->rDe->title !!} @endif</a>
                            <a class="readmore" href="{!! url('post/'.$value->slug) !!}">{!! InseoHelper::tglbulanindo2($value->post_date) !!}</a>
                          </li>
                          @endforeach
                        </ul><!-- recent posts -->
                    </div>
                </div><!-- end tab content -->
              </div><!-- end tab pane -->
            </div><!-- end widget -->

            @foreach ($widget_right as $vwidget_right)
            <div class="widget">
            	<div class="title">
                    <h2>{!! $vwidget_right->title_design !!}</h2>
                </div><!-- end title -->
                {!! $vwidget_right->value_design !!}
            </div><!-- end widget --> 
            @endforeach
          </div><!-- end content -->
  	</div><!-- end container -->
  </section><!--end white-wrapper -->

    {{-- Label Body Tambahan --}}
    @if(!isset($setting['body_position']) || strtolower($setting['body_position']) == 'bawah')
    @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">
            @if($value->rDe)
                <h2>{!! $value->rDe->title_design !!}</h2>
                <hr>
                @endif
            </div>
        </div>
        <!-- end container -->
        @if($value->rDe)
        {!! $value->rDe->value_design !!}
        @endif
        @endforeach
        <div class="clearfix"></div>
    </section>
    @endif
    @endif
    {{-- Label Gallery --}}
    @if(!isset($setting['gallery']) || strtolower($setting['gallery']) == '1' || strtolower($setting['gallery']) == 'on')
   
    @if ($gallery->count() != 0)
    <section class="panel-wrapper jt-shadow">
        <div class="container">
            <div class="general-title">
                <h2>Galerie</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 
   @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">
                            <p class="lead">
                            @if($value->rDe)
                            {!! $value->rDe->value_design !!}
                            <div style="text-align: center; font-size: 14pt;">{!! $value->rDe->title_design !!}</div>
                            @endif
                            </p>
                        </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