<?php $__env->startSection('title'); ?>
    STAKEGAINS | Blogger
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page'); ?>
    New Blog Post
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <div class="col" style="min-height: 323px;;">
        <br><br>
        <?php
        $date = new dateTime();
        $d = $date->format('j F, Y');
        $t = $date->format('h:ia');
        $sn = $date->format('hia');
        ?>

        <?php if(isset($success)): ?>
            <script>
                alert('<?php echo e($success); ?>');
            </script>
        <?php endif; ?>
        <form method="POST" action="<?php echo e(url('/nblog')); ?>" id="" enctype="multipart/form-data">

            <div class="row" style="margin-top: -20px;">
                <div class="col-md-8">
                    <div class="form-group col-sm-12">
                        <input type="hidden" name="date" value="<?php echo e($d); ?>">
                        <input type="hidden" name="time" value="<?php echo e($t); ?>">
                        <input type="hidden" name="sn" value="<?php echo e($sn); ?>">
                        <label>BLOG TITLE</label>
                        <input type="text" name="title" class="form-control" required>
                    </div>
                    <div class="form-group col-sm-12">
                        <label>CATEGORY</label>
                        <select class="form-control" name="category" required>
                            <option value="">Select Category</option>
                            <option value="Sport News">Sport News</option>
                            <option value="Updates">Website Updates</option>
                            <option value="Notification">Notification</option>
                        </select>
                    </div>

                    <div class="form-group col-sm-12">
                        <label>PUBLISH STATUS</label>
                        <select class="form-control" name="status" required>
                            <option value="Publish">Publish Now</option>
                            <option value="Draft">Save as Draft</option>
                        </select>
                    </div>
                </div>
                <div class="col-md-4">

                    <div class="col-sm-12">
                        <div class="input-field col-md-12">
                            <label>COVER IMAGE</label>
                            <div class="fileupload fileupload-new" data-provides="fileupload">
                                <div class="fileupload-new thumbnail" style="width: 200px; height: 150px;"><img src="<?php echo e(asset('images/demoUpload.jpg')); ?>" alt="" /></div>
                                <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 160px; max-height: 150px; line-height: 20px;"></div>
                                <div>
                <span class="btn btn-sm btn-file btn-default"><span class="fileupload-new">SELECT IMAGE</span><span class="fileupload-exists">Change</span>
                <input type="file" name="file" required/></span>
                                    <a href="#" class="btn btn-sm btn-danger fileupload-exists" data-dismiss="fileupload">Remove</a>
                                </div>
                            </div>
                        </div>
                    </div>

                    <?php echo csrf_field(); ?>


                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-12">
                        <label for="moreoption">BLOG CONTEXT</label>
                        <textarea name="content" id="moreoption" class="form-control"></textarea>
                    </div>

                    <div id="bstatus" class="col-xs-6"></div>
                    <div class="form-group col-sm-12">
                        <button class="btn btn-md btn-success" name="submit" id="blogbtn">SUBMIT POST</button>
                    </div>
                </div>
            </div>
        </form>
    </div>


    <script>
        tinymce.init({
            selector:'textarea',
            setup: function (editor) {
                editor.on('change', function () {
                    editor.save();
                });
            },
            forced_root_block : "",
            force_br_newlines : true,
            force_p_newlines : false,
            menubar: false,
            statusbar: false,
            toolbar: 'styleselect | bold italic | link image | alignleft aligncenter alignright | bullist | numlist',
            height : 40

        });</script>

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

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