@extends('layout.master')



@section('title',$PhotoGallery->name.' - '. config('settings.site_title', 'Varsayılan Başlık'))
@section('description',$PhotoGallery->short_description ?? config('settings.site_description', 'Varsayılan Başlık'))
@section('image',config('settings.site_url', 'Varsayılan Başlık').'/uploads/images/news/'.date("Y/m/d", strtotime($PhotoGallery->date)).'/'.$PhotoGallery->gallery_image)



@section('content')

<div class="news-page-custom custom-page-news"  id="site-content" style="background: #fff;padding-left:0px; padding-right: 0px;">
    
    <div class="newsPage container">
        <div class="container mt-5" style="margin-top:30px !important;padding-left:0px; padding-right: 0px;">
          <div class="section-header">
            <h2>FOTO GALERİLER</h2>
            <div class="line" style="background-color:#FF0000"></div>
          </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                    <nav aria-label="breadcrumb">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="/" title="Haberler">Foto Galeri</a></li>
                <li class="breadcrumb-item active" aria-current="page">{{$PhotoGallery->name}}</li>
            </ol>
        </nav>
            </div>
        </div>


        <div class="row">
            <div class="col-md-9">
                
 <div class="row">
        <div class="col-12">
            <div class="d-flex justify-content-between align-items-center">
                <div class="row" style="width:100%">
                    <div class="col-md-9">
                        <div class="article-title"><h1 class="article-title ">{{ltrim($PhotoGallery->name)}}</h1></div>

                    </div>                  
                </div>
            </div>
        </div>
    </div>


      <div class="row">
                            <div class="col-12">
                                <div class="article-sub-content">
                                    <h2 class="article-sub-content">{{$PhotoGallery->short_description}}</h2>
                                </div>
                            </div>
                        </div>
    <div class="row align-items-center">
    <!-- Tarih Bilgisi -->
    <div class="col-md-8 d-flex newsDates">
      <span>Giriş: {{$PhotoGallery->date}} {{$PhotoGallery->time}}</span>
    </div>

    <!-- Paylaşım Simgeleri -->
    <div class="col-md-4 text-end d-flex justify-content-end align-items-center">
      <span class="me-2 newsShare">Paylaş</span>
      <span class="divider"></span>
               <a href="https://www.facebook.com/sharer/sharer.php?u={{ url('foto-galeri/'.$PhotoGallery->slug) }}" target="_blank" class="mx-2 newsShareIcon">
    <i class="bi bi-facebook"></i>
</a>
<a href="https://twitter.com/intent/tweet?url={{ url('foto-galeri/'.$PhotoGallery->slug) }}" target="_blank" class="mx-2 newsShareIcon">
    <i class="bi bi-twitter"></i>
</a>
<a href="https://www.linkedin.com/shareArticle?url={{ url('foto-galeri/'.$PhotoGallery->slug) }}" target="_blank" class="mx-2 newsShareIcon">
    <i class="bi bi-linkedin"></i>
</a>
<a href="https://api.whatsapp.com/send?text={{ url('foto-galeri/'.$PhotoGallery->slug) }}" target="_blank" class="mx-2 newsShareIcon">
    <i class="bi bi-whatsapp"></i>
</a>
<a href="https://t.me/share/url?url={{ url('foto-galeri/'.$PhotoGallery->slug) }}" target="_blank" class="mx-2 newsShareIcon">
    <i class="bi bi-telegram"></i>
</a>
    </div>
  </div>
    <!-- Article Content -->

    <div class="row">
        <div class="col-12">
            <div class="article-content" id="photo">
                @if($currentpage!=$PhotoGalleryImagesCount)<a href="/foto-galeri/{{$PhotoGallery->slug}}/{{$currentpage+1}}#photo" title="{{$PhotoGallery->name}} Sıradaki Fotoğraf"> @else <a href="/foto-galeri/{{$PhotoGallery->slug}}/1#photo" title="{{$PhotoGallery->name}} İlk Fotoğraf"> @endif <img src="{{env('PANEL_URL')}}/uploads/images/news/{{ date("Y/m/d", strtotime($PhotoGallery->date)) }}/{{ $PhotoGalleryImages->image  }}" alt="{{$PhotoGallery->name}}" style="width:100%"></a>

                <p class="mt-5">{{$PhotoGalleryImages->short_description}}</p>
            </div>
        </div>
        <div class="col-md-12 mt-5">
        <nav aria-label="Page navigation example">
  <ul class="pagination justify-content-center" style="display:block;">
    @php 

    for($i=1;$i<=$PhotoGalleryImagesCount; $i++) {
    @endphp
    <li class="page-item @if($i==$currentpage) active @endif"><a class="page-link" href="/foto-galeri/{{$PhotoGallery->slug}}/{{$i}}#photo"  title="{{$PhotoGallery->name}} {{$i}}. Fotoğraf">{{$i}}</a></li>
    @php } @endphp
  </ul>
</nav>
        </div>
    </div>
<style type="text/css">
   .page-link{
    font-size: 18px;
    text-align: center;
        padding: 10px;
    width: 50px;
   }
   .page-item{
    margin-left:10px;
    margin-top:5px;
    float: left;
   }
</style>
    <!-- Article Footer -->


    <div class="row">
        <div class="col-12 article-footer">
    @if(isset($video->tag))
    @php 

    $tagParcala=explode(',',$video->tag);

    @endphp
            <div class="article-tags">
            @foreach($tagParcala as $tag)
                <a href="#">{{$tag}}</a>
                @endforeach
            </div>
            @endif
        </div>
    </div>

      <div class="container newseight" style="margin-top:20px">
            <div class="container mt-5">
        <div class="section-header">
            <h2>{{$category->name}}</h2>
            <div class="line" style="background-color:#{{$category->color}}"></div>
        </div>
    </div>
        <div class="row"  style="margin-top:20px">
           @foreach($categoryhaberlerNews as $ekonomikhaberNews)
            <div class="col-md-4">
                 <div class="news-card">
            <a href="/foto-galeri/{{$ekonomikhaberNews->slug}}"><img src="/uploads/images/news/{{ date("Y/m/d", strtotime($ekonomikhaberNews->date)) }}/{{ $ekonomikhaberNews->gallery_image  }}" alt="Yıkım" style="height:165px"></a>
            <div class="news-badge"style="background-color:#{{$ekonomikhaberNews->category->color}} !important;">{{$ekonomikhaberNews->category->name}}</div>
            <div class="card-body"><a href="/foto-galeri/{{$ekonomikhaberNews->slug}}"><div class="news-title">{{$ekonomikhaberNews->name}}</div></a></div>
        </div>
            </div>
                        @endforeach
            
           
        </div>
    </div>


            </div>
            <div class="col-md-3">
                <div class="row">
                    <div class="col-md-12 ads" >   {!! showAd('904') !!}</div>
                    <div class="col-md-12" style="margin-top:20px">
                        
                         <div class="row">
        <div class="col-12">
            <div class="section-header" style="display: contents;">
                    <h2>En Çok Görüntülenen Galeriler</h2>
                    <div class="line" style="background-color:#FF0000;     margin-top: 5px;"></div>
                  </div>
        </div>
    </div>
    <div class="row mt-3">
        <div class="col-12">
            @foreach($recentNews as $recentNew)
            <div class="most-read-item d-flex">
               
                 <a href="/foto-galeri/{{$recentNew->slug}}" title="{{$recentNew->name}}"><img src="/uploads/images/news/{{ date("Y/m/d", strtotime($recentNew->date)) }}/{{ $recentNew->gallery_image  }}" alt="{{$recentNew->name}}"></a>
                 <a href="/foto-galeri/{{$recentNew->slug}}" title="{{$recentNew->name}}"><h6>{{$recentNew->name}}</h6></a>
            
            </div>
      
            @endforeach
        </div>
    </div>


                    </div>
                    <div class="col-md-12" style="margin-top:20px">  </div>

                </div>


            </div>
        </div>
    </div>

</div>

@endsection

