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

<!-- <?php echo e(url('/assets/images/package')); ?>/<?php echo e($campaign->feature_image); ?> -->

    <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: 4% 0px 4% 0px;">
                <div class="text-center" style="color: #FFF;padding: 20px;">
                    <h1><?php echo e($campaign->title); ?></h1>
                </div>
            </div>

        </div>
    </section>

<!-- Starting of Campign Details area -->
<div class="section-padding">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-md-8 col-sm-7 col-xs-12">
                <div class="campign-details-content">
                    <h3><?php echo e($language->campaign_details); ?></h3>
                    <hr/>
                    <div class="campign-img">
                        <img src="<?php echo e(url('/assets/images/campaign/'.$campaign->feature_image)); ?>" alt="Campign img">
                    </div>
                    <?php if($campaign->video_link != ""): ?>
                        <div class="campign-video">
                            <?php echo \App\Campaign::getVideo($campaign->id); ?>

                        </div>
                    <?php endif; ?>
                    <div class="campign-text">
                        <?php echo $campaign->description; ?>

                    </div>
                </div>
            </div>
            <div class="col-lg-4 col-md-4 col-sm-5 col-xs-12">
                <div class="donate-area">
                    <h3>Donate</h3>

                    <hr/>
                    <?php if(Session::has('pmail')): ?>
                        <div class="alert alert-success"> <?php echo e(Session::get('pmail')); ?> </div>
                    <?php endif; ?>

                    <div class="donate-user-info">

                        <p><?php echo e($language->created_by); ?>: </p>
                        <p class="colored"><?php echo e($campaign->createdby->name); ?></p>
                        <p><?php echo e($campaign->createdby->country); ?></p>
                    </div>
                    <p><strong><?php echo e($settings[0]->currency_sign); ?><?php echo e($donations); ?></strong> <?php echo e($language->funded); ?> of <strong><?php echo e($settings[0]->currency_sign); ?><?php echo e($campaign->goal); ?></strong> <?php echo e($language->goal); ?></p>
                    <div class="progress">
                        <div class="progress-bar" role="progressbar" aria-valuenow="18"
                             aria-valuemin="0" aria-valuemax="100" style="width:<?php echo e(round($percent)); ?>%">
                            <?php echo e(round($percent)); ?>%
                        </div>
                    </div>

                    <div class="pull-left">
                             <?php if(((strtotime($campaign->end_date)-time())/86400) < 0): ?>
                                <strong><?php echo e(0); ?></strong>
                            <?php else: ?>
                                <strong><?php echo e(ceil((strtotime($campaign->end_date)-time())/86400)); ?></strong>
                            <?php endif; ?>
                            <?php echo e($language->days_left); ?>

                    </div>
                    <div class="pull-right"><strong><?php echo e(\App\Donation::getDonations($campaign->id)); ?></strong> <?php echo e($language->donations); ?></div>

                    <hr class="campign-hr">

                    <div class="campign-social-links">
                        <div class="profile-group">
                            <!-- AddToAny BEGIN -->
                            <div class="a2a_kit a2a_kit_size_40 a2a_default_style">
                                <a class="a2a_button_facebook"></a>
                                <a class="a2a_button_twitter"></a>
                                <a class="a2a_button_google_plus"></a>
                                <a class="a2a_button_linkedin"></a>
                                <a class="a2a_dd" href="https://www.geniusocean.com"></a>
                            </div>
                            <script async src="https://static.addtoany.com/menu/page.js"></script>
                            <!-- AddToAny END -->
                        </div>
                    </div>

                    <form action="<?php echo e(action('FrontEndController@donate' , ['id'=>$campaign->id])); ?>" method="post">
                        <?php echo e(csrf_field()); ?>

                        <div class="form-group">
                            <label for="donation"><?php echo e($language->donate); ?> <?php echo e($language->amount); ?>(<?php echo e($settings[0]->currency_code); ?>):</label>
                            <input type="text" class="form-control"  pattern="[0-9]+(\.[0-9]{0,2})?%?"
                                   title="Price must be a numeric or up to 2 decimal places." name="amount" id="donation" required>
                        </div>
                        <?php if($campaign->preloaded_amount != ""): ?>
                            <div class="form-group">
                                <ul>
                                    <?php $__empty_1 = true; $__currentLoopData = explode(',',$campaign->preloaded_amount); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $preload): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                        <li><a href="javascript:;" class="pre" id="<?php echo e($preload); ?>">$<?php echo e($preload); ?></a></li>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <?php endif; ?>
                                </ul>
                            </div>
                        <?php endif; ?>
                        <div class="form-group text-center">
                            <button class="donate-submit"><?php echo e($language->donate); ?></button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Ending of Campign Details area -->

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

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

    $(".pre").click(function () {
        var val = parseFloat($(this).attr('id'));
        $("#donation").val(val);
    })


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