
<?php $__env->startSection('title'); ?>
    admin | Design
<?php $__env->stopSection(); ?>
<?php $__env->startSection('extra_css'); ?>
    <style>
        .btn-height{
            height: 43px;
            box-shadow: unset !important;
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
            color: white !important;
        }
        .input-group-btn .btn-height{
            cursor:pointer;
        }
        #plusBtn{
            margin-top: 32px;
            height: 44px;
        }
        .removeBtn{
            margin-top: 32px;
            height: 44px;
        }
    </style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <main>
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-lg-12">
                    <div class="card shadow-lg border-0 rounded-lg mt-5 mb-5">
                        <div class="card-header">
                            <div class="pg__name float-left">
                                <h4 class="font-weight-light my-1">Add New Design</h4>
                            </div>
                            <div class="pg__btn float-right">
                                <a href="<?php echo e(route('design.index')); ?>" class="btn btn-primary">View All</a>
                            </div>
                        </div>
                        <div class="card-body">
                            <form role="form" method="post" action="<?php echo e(route('design.store')); ?>">

                                <?php echo e(csrf_field()); ?>


                                <div class="form-group">
                                    <label class="mb-1" for="title">Title</label>
                                    <input type="text" id="title" name="title" class="form-control" maxlenght="200" required="required">
                                </div>

                                <div class="form-group">
                                    <label>feature image</label>
                                    <div class="input-group">
                                        <input id="featured_image" class="form-control" type="text" name="featured_image">
                                            <span class="input-group-btn">
                                                <a id="lfm" data-input="featured_image" data-preview="holder"
                                                   class="btn btn-primary btn-height">
                                                  <i class="fa fa-image"></i> Choose
                                                </a>
                                            </span>
                                    </div>
                                </div>


                                <div class="row">
                                    <div class="col-md-10">
                                        <div class="form-group">
                                            <label>Thumbnail</label>
                                            <div class="input-group">
                                                <input id="thumbnail" class="form-control" maxlenght="250" type="text"
                                                       name="thumbnail[]">
                                                <span class="input-group-btn"> <a id="FChild" data-input="thumbnail"
                                                                                  data-preview="holder"
                                                                                  class="btn btn-primary btn-height"> <i
                                                                class="fa fa-image"></i> Choose </a> </span>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label>Content</label>
                                            <div class="input-group">
                                                <textarea class="form-control" id="caption" name="caption[]"
                                                          style="height: auto !important;" rows="5"></textarea>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-md-2">
                                        <button id="plusBtn" class="btn btn-primary">+</button>
                                    </div>
                                </div>

                                <div id="append-content"> </div>

                                <div class="form-group mt-4 mb-0 float-right">
                                    <button type="submit" class="btn btn-primary submit">Create</button>
                                </div>


                            </form>
                        </div>

                    </div>
                </div> <!--col-->

            </div>
        </div>
    </main>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('extra_js'); ?>
    <script>
        $(document).ready(function () {
            $('#FChild').filemanager('image');
            let DID = 0;
            $("#plusBtn").click(function (ele) {
                ele.preventDefault();
                DID++;
                $("#append-content").append('<div id="containerbox"><div class="row"> <div class="col-md-10"><label>Thumbnail</label><div class="form-group"><div class="input-group"><input id="thumbnail' + DID + '" class="form-control" maxlenght="250" type="text" name="thumbnail[]"><span class="input-group-btn"> <a  id="lfm'+DID+'" data-input="thumbnail' + DID + '" data-preview="holder" class="btn btn-primary btn-height"> <i class="fa fa-image"></i> Choose </a> </span></div></div> <label for="caption">Content</label><textarea class="form-control" id="caption" name="caption[]" rows="5"></textarea> </div><div class="col-md-2"><button class="btn btn-danger removeBtn">-</button></div></div></div>')
                $("#lfm"+DID).filemanager('image');
            })

            $(document).on('click', '.removeBtn', function () {
                $(this).closest('#containerbox').remove();
                // alert('om');
            });
        });
    </script>

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

<?php echo $__env->make('layouts.backend', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/hotelier/public_html/resources/views/back/design/create.blade.php ENDPATH**/ ?>