
<?php $__env->startSection('content'); ?>


     <main>
            <!--start gallery-pg-->
            <section class="gallery-pg">
                <div class="container">
                    <div class="text-heading text-center">
                        <h1><?php echo e(__('web.gallery')); ?></h1>
                        <span><?php echo e(__('web.gallery')); ?></span>
                        <p><?php echo e(__('web.welcome')); ?></p>
                    </div>
                    <div class="tabs-wrapper">
                        <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
                            <li class="nav-item" role="presentation">
                              <a class="nav-link active" onclick="category(this)" data-id="null" id="pills-tab1-tab" data-toggle="pill" href="#pills-tab1" role="tab" aria-controls="pills-tab1" aria-selected="true">All</a>
                            </li>
                            <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li class="nav-item" role="presentation">
                              <a class="nav-link" id="pills-tab2-tab"  onclick="category(this)" data-id="<?php echo e($row->id); ?>" data-toggle="pill" href="#pills-tab2" role="tab" aria-controls="pills-tab2" aria-selected="false"><?php echo e(categoryname($row->id)); ?></a>
                            </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </div>
                    <div class="tab-content" id="pills-tabContent">
                        <div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
                            <div class="cards-wrapper row" id="categories">
                                <?php $__currentLoopData = $galleries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="col-lg-4 col-md-6">
                                    <div class="card">
                                        <img src="<?php echo e(asset($row->image)); ?>" class="gallery-img">
                                        <div class="text">
                                            <h5><?php echo e(galleryname($row->id)); ?></h5>
                                            <i><?php echo e(categoryname($row->category_id)); ?></i>
                                            <a href="<?php echo e(asset($row->image)); ?>" data-fancybox="images" >
                                                <i class="fas fa-search-plus"></i>
                                            </a>
                                        </div>
                                    </div>
                                </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </main>
    <?php $__env->startPush('js'); ?>
   <script>
        function category(elem){
       
       var row = $(elem).attr('data-id');
    
      $.ajax({
          url : <?php echo json_encode(url(getCurrentLocale().'/categorydata/')); ?>+'/'+row,
          type : 'GET',
          data : 'nothing',
          dataType : 'json',
          success:function(data)
          {
           
            $('#categories').html(data);
             
          }
      
        })
        }
    </script>
   <?php $__env->stopPush(); ?>
   <?php $__env->stopSection(); ?>
<?php echo $__env->make('web.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/omaralyomhost/public_html/alhindi/resources/views/web/pages/gallery.blade.php ENDPATH**/ ?>