<?php $__env->startSection('meta'); ?>
<title><?php echo e($gallery->album_name); ?></title>
<meta property="og:title" content="<?php echo e($gallery->album_name); ?>" />
<meta property="og:image" content="<?php echo e(asset('assets/images/image-album/'.$gallery->photo)); ?>" />
<?php $__env->stopSection(); ?>
<?php $__env->startSection('contents'); ?>

<?php
  $totalImages = 0;
  if($gallery->categories){
    foreach($gallery->categories as $cat){
      $totalImages += $cat->galleries->count();
    }
  }
  if($totalImages == 0 && $gallery->photo) $totalImages = 1;
?>

<!-- main div -->
<div class="mainDiv">
  <!-- mobile header categories -->
  <div class="bg2 marginT-15 marginB10 visible-xs">
    <div class="">
      <div class=" padding0">
        <div class="positionRelative" style="border-bottom: 3px solid #9b090d">
          <div class="mobileHeaderCategoryDiv">
            <a class="sidebarCatTitle colorBlack hoverBlue paddingLR15 textDecorationNone" aria-label="হোম"
              href="<?php echo e(route('frontend.index')); ?>"><strong>হোম</strong></a>
            <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <a class="sidebarCatTitle colorBlack hoverBlue paddingLR15 textDecorationNone" aria-label="<?php echo e($category->title); ?>"
                href="<?php echo e(route('frontend.category', $category->slug)); ?>"><strong><?php echo e($category->title); ?></strong></a>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- mobile header categories end -->

  <!-- desktop version start -->
  <div class="bgWHite hidden-xs" style="margin-top: 10px;">
    <div class="bgWHite paddingT20" style="padding-bottom: 30px;">
      <div class="container">
        <div class="borderC1-D2">
          <div class="row desktopFlexRow">
            <div class="col-md-9 col-lg-9 borderC1R2">
              <div>
                <!-- title section -->
                <div class="marginB20 marginT-15 text-center">
                  <p class="desktopDetailCat marginB30"><a class="bgBrand borderRadius5 colorWhite" style="padding: 3px 20px 0px 20px;border-bottom: none;" aria-label="ছবি" href="<?php echo e(url('/photos')); ?>"><strong>ছবি</strong></a></p>
                  <h1 class="desktopDetailHeadline marginT0"><strong><?php echo e($gallery->album_name); ?></strong></h1>
                </div>
              </div>
            </div>

            <div class="col-md-3">
              <!-- time section -->
              <div class="row">
                <div class="col-sm-12 col-md-12 marginT10 paddingR5">
                  <div class="padding10" style="height: 68px;padding-top: 5px !important;padding-bottom: 5px !important;">
                    <div class="displayInlineBlock">
                      <p class="desktopDetailReporter">অনলাইন ডেস্ক</p>
                      <p class="desktopDetailPTime color1">প্রকাশ:
                        <?php if($gallery->created_at): ?>
                          <?php
                            $bnDigits = ['০','১','২','৩','৪','৫','৬','৭','৮','৯'];
                            $enDigits = ['0','1','2','3','4','5','6','7','8','9'];
                            $bnMonths = ['Jan'=>'জানুয়ারি','Feb'=>'ফেব্রুয়ারি','Mar'=>'মার্চ','Apr'=>'এপ্রিল','May'=>'মে','Jun'=>'জুন','Jul'=>'জুলাই','Aug'=>'আগস্ট','Sep'=>'সেপ্টেম্বর','Oct'=>'অক্টোবর','Nov'=>'নভেম্বর','Dec'=>'ডিসেম্বর'];
                            $dateFormatted = $gallery->created_at->format('d M Y, h:i A');
                            $dateBn = str_replace($enDigits, $bnDigits, $dateFormatted);
                            foreach($bnMonths as $en => $bn) { $dateBn = str_replace($en, $bn, $dateBn); }
                            $dateBn = str_replace(['AM','PM'], ['এএম','পিএম'], $dateBn);
                          ?>
                          <?php echo e($dateBn); ?>

                        <?php endif; ?>
                      </p>
                    </div>
                  </div>
                </div>

                <!-- share -->
                <div class="col-sm-12 col-md-12 marginT10 paddingL5">
                  <div class="hidden-print padding10" style="height: 68px">
                    <div class="marginT5">
                      <div class="sharethis-inline-share-buttons st-right" style="text-align: left;"
                        data-title="<?php echo e($gallery->album_name); ?>"
                        data-url="<?php echo e(url()->current()); ?>"></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>

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

      <div class="container marginT0">
        <div class="row">

          <!-- news section -->
          <div class="col-md-9 col-lg-9">

            <!-- image counter -->
            <?php if($totalImages > 0): ?>
            <p class="title12 marginT10 marginB5"><span class="galleryImageCounter">১ / <?php echo e($totalImages); ?></span></p>
            <?php endif; ?>

            <!-- photo section -->
            <div class="desktopDetailPhotoDiv">
              <?php if($gallery->photo): ?>
              <div class="desktopDetailPhoto">
                <figure class="positionRelative">
                  <img src="<?php echo e(asset('assets/images/image-album/'.$gallery->photo)); ?>" class="w100P" alt="<?php echo e($gallery->album_name); ?>">
                </figure>
              </div>
              <?php endif; ?>
            </div>

            <!-- gallery images -->
            <?php if($gallery->categories && count($gallery->categories) > 0): ?>
            <div class="row marginT20">
              <?php $__currentLoopData = $gallery->categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php $__currentLoopData = $category->galleries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $img): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="col-sm-6 col-md-4 marginB15">
                  <div class="thumbnail borderRadius0 marginB0">
                    <a href="<?php echo e(asset('assets/images/image-gallery/'.$img->gallery)); ?>" target="_blank">
                      <img src="<?php echo e(asset('assets/images/image-gallery/'.$img->gallery)); ?>" class="img-responsive borderRadius0" alt="<?php echo e($category->name); ?>">
                    </a>
                    <?php if($category->name): ?>
                    <div class="caption">
                      <p class="title12 marginB0"><?php echo e($category->name); ?></p>
                    </div>
                    <?php endif; ?>
                  </div>
                </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
            <?php endif; ?>

            <!-- comments -->
            <div class="hidden-print marginT30 desktopSectionTitleSmall">
              <div class="desktopSectionTitleDiv2 marginT15">
                <p class="desktopSectionTitle marginB0 fontNormal" style="line-height: 5rem;"><span>মন্তব্য করুন</span></p>
              </div>
              <div class="commentsDiv borderC1-1 borderRadius5 marginT5">
                <div class="fb-comments" data-href="<?php echo e(url('/gallery-view/'.$gallery->id)); ?>" data-numposts="2" width="100%"></div>
              </div>
            </div>

          </div>

          <!-- sidebar -->
          <div class="col-md-3 col-lg-3 hidden-print">
            <!-- sidebar ads -->
            <div class="marginCenter w300 marginB20 marginT40">
              <?php echo $gs->sidebar_ads; ?>

            </div>

            <!-- latest popular news -->
            <div class="row latestPopularNewsDiv">
              <div class="col-sm-12 col-md-12 marginB20">
                <?php echo $__env->make('partial.front.sidebar-latest-popular', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
              </div>
            </div>
            <!-- latest popular news end -->
          </div>

        </div>
      </div>

    </div>
  </div>
  <!-- desktop version end -->

  <!-- mobile version start -->
  <div class="bgWHite visible-xs paddingT20">
    <div class="container">
      <div class="row">
        <!-- title section -->
        <div class="col-sm-12 col-md-12 paddingLR20">
          <div class="marginT-7">
            <p class="desktopDetailCat marginB20 text-center"><a class="bgBrand borderRadius5 paddingLR20 textDecorationNone colorWhite" style="padding: 5px 20px 2px 20px;" aria-label="ছবি" href="<?php echo e(url('/photos')); ?>"><strong>ছবি</strong></a></p>
            <div class="text-center">
              <h1 class="detailHeadline marginT0"><strong><?php echo e($gallery->album_name); ?></strong></h1>
            </div>
            <div class="displayInlineBlock">
              <p class="detailReporter text-center">অনলাইন ডেস্ক</p>
              <p class="detailPTime color1 text-center">প্রকাশ:
                <?php if($gallery->created_at): ?>
                  <?php
                    $bnDigits2 = ['০','১','২','৩','৪','৫','৬','৭','৮','৯'];
                    $enDigits2 = ['0','1','2','3','4','5','6','7','8','9'];
                    $bnMonths2 = ['Jan'=>'জানুয়ারি','Feb'=>'ফেব্রুয়ারি','Mar'=>'মার্চ','Apr'=>'এপ্রিল','May'=>'মে','Jun'=>'জুন','Jul'=>'জুলাই','Aug'=>'আগস্ট','Sep'=>'সেপ্টেম্বর','Oct'=>'অক্টোবর','Nov'=>'নভেম্বর','Dec'=>'ডিসেম্বর'];
                    $dateFormatted2 = $gallery->created_at->format('d M Y, h:i A');
                    $dateBn2 = str_replace($enDigits2, $bnDigits2, $dateFormatted2);
                    foreach($bnMonths2 as $en2 => $bn2) { $dateBn2 = str_replace($en2, $bn2, $dateBn2); }
                    $dateBn2 = str_replace(['AM','PM'], ['এএম','পিএম'], $dateBn2);
                  ?>
                  <?php echo e($dateBn2); ?>

                <?php endif; ?>
              </p>
            </div>
          </div>
        </div>

        <!-- image counter -->
        <?php if($totalImages > 0): ?>
        <div class="col-sm-12 col-md-12 paddingLR15">
          <p class="title12 marginT10 marginB5"><span class="galleryImageCounter">১ / <?php echo e($totalImages); ?></span></p>
        </div>
        <?php endif; ?>

        <!-- photo section -->
        <?php if($gallery->photo): ?>
        <div class="col-sm-12 col-md-12 detailPhotoDiv">
          <div class="detailPhoto">
            <figure class="positionRelative">
              <img src="<?php echo e(asset('assets/images/image-album/'.$gallery->photo)); ?>" class="w100P" alt="<?php echo e($gallery->album_name); ?>">
            </figure>
          </div>
        </div>
        <?php endif; ?>

        <!-- gallery images -->
        <?php if($gallery->categories && count($gallery->categories) > 0): ?>
        <div class="col-sm-12 col-md-12 marginT20 paddingLR15">
          <div class="row">
            <?php $__currentLoopData = $gallery->categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <?php $__currentLoopData = $category->galleries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $img): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <div class="col-xs-6 marginB15">
                <div class="thumbnail borderRadius0 marginB0">
                  <a href="<?php echo e(asset('assets/images/image-gallery/'.$img->gallery)); ?>" target="_blank">
                    <img src="<?php echo e(asset('assets/images/image-gallery/'.$img->gallery)); ?>" class="img-responsive borderRadius0" alt="<?php echo e($category->name); ?>">
                  </a>
                </div>
              </div>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
          </div>
        </div>
        <?php endif; ?>

        <!-- comments -->
        <div class="hidden-print marginT30 desktopSectionTitleSmall paddingLR15">
          <div class="desktopSectionTitleDiv2 marginT15">
            <p class="desktopSectionTitle marginB0 fontNormal" style="line-height: 5rem;"><span>মন্তব্য করুন</span></p>
          </div>
          <div class="commentsDiv borderC1-1 borderRadius5 marginT5">
            <div class="fb-comments" data-href="<?php echo e(url('/gallery-view/'.$gallery->id)); ?>" data-numposts="2" width="100%"></div>
          </div>
        </div>

      </div>
    </div>
  </div>
  <!-- mobile version end -->

</div>
<!-- main div end -->

<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script>
  // Convert gallery publish date to Bangla
  $(document).ready(function(){
    <?php if($gallery->created_at): ?>
      var dateStr = '<?php echo e($gallery->created_at->format("d M Y, h:i A")); ?>';
      if(typeof englishToBangla === 'function'){
        $('.galleryPublishDate').html(englishToBangla(dateStr));
      } else {
        $('.galleryPublishDate').html(dateStr);
      }
    <?php endif; ?>
  });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.front', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/istiakahmedsourav/Desktop/JAMUNABKP/project/resources/views/frontend/gallery_view.blade.php ENDPATH**/ ?>