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

    <section style="background: url(<?php echo e(url('/')); ?>/assets/images/<?php echo e($settings[0]->background); ?>) no-repeat center center; background-size: cover;">
        <div class="row" style="margin:0;background-color:rgba(0,0,0,0.7);">
            <div style="margin: 3% 0px 3% 0px;">
                <div class="text-center" style="color: #FFF;padding: 20px;">
                    <h1><?php echo e($language->campaigns); ?></h1>
                </div>
            </div>
        </div>
    </section>

    <!-- starting of Available Campaigns area -->
    <div class="section-padding available-campaign-wrapper">
        <div class="container">
            <div class="row">
                <?php $__currentLoopData = $campaigns; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $campaign): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                    <a href="<?php echo e(url('/')); ?>/campaign/<?php echo e($campaign->id); ?>" class="single-featured-item">
                        <div class="featured-img">
                            <img class="featured-img" src="<?php echo e(url('/assets/images/campaign')); ?>/<?php echo e($campaign->feature_image); ?>" alt="">
                        </div>

                        <div class="featured-text">
                            <h3><?php echo e($campaign->title); ?></h3>
                            <div class="featured-meta">
                                    <span>
                                        <?php if(((strtotime($campaign->end_date)-time())/86400) < 0): ?>
                                            <span><?php echo e(0); ?></span>
                                        <?php else: ?>
                                            <span><?php echo e(ceil((strtotime($campaign->end_date)-time())/86400)); ?></span>
                                        <?php endif; ?>
                                            <?php echo e($language->days_left); ?>

                                    </span>
                                <span class="pull-right"><span>$<?php echo e(\App\Donation::getFund($campaign->id)); ?></span> <?php echo e($language->funded); ?></span>
                            </div>
                            <div class="progress">
                                <div class="progress-bar" role="progressbar" aria-valuenow="28"
                                     aria-valuemin="0" aria-valuemax="100" style="width:<?php echo e(round(\App\Donation::getPercent($campaign->id))); ?>%">
                                    <?php echo e(round(\App\Donation::getPercent($campaign->id))); ?>%
                                </div>
                            </div>
                            <p><?php echo e(substr(strip_tags($campaign->description), 0, 120)); ?>...</p>
                            <div class="featured-meta-bottom">
                                <span class="featured-left"><?php echo e($language->donate); ?></span>
                                <span class="pull-right"><i class="fa fa-heart-o"></i> <?php echo e(\App\Donation::getDonations($campaign->id)); ?> <?php echo e($language->donations); ?></span>
                            </div>
                        </div>
                    </a>
                </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    </div>
    <!-- Ending of Available Campaigns area -->

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

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

<?php $__env->stopSection(); ?>
<?php echo $__env->make('includes.masterpage', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>