File manager - Edit - /home/u300416816/domains/recipeseasy.online/public_html/storage/framework/views/e3e8bf2eddd77584aab1ffc2cf1d54b9.php
Back
<?php $__env->startSection('content'); ?> <div class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h1 class="m-0">New Post</h1> </div><!-- /.col --> </div><!-- /.row --> </div><!-- /.container-fluid --> </div> <!-- /.content-header --> <!-- Main content --> <section class="content"> <div class="container-fluid"> <form action="<?php echo e(route('admin.blog.posts.store')); ?>" method="POST" enctype="multipart/form-data"> <?php echo csrf_field(); ?> <div class="row"> <!-- left column --> <div class="col-md-8"> <!-- general form elements --> <div class="card card-primary"> <div class="card-body"> <!-- Game Name field --> <div class="form-group"> <label for="name">Post Title</label> <input type="text" class="form-control" id="name" name="name" placeholder="Enter post Title" required> </div> <!-- Description field with professional custom text editor --> <div class="form-group"> <label for="description">Content</label> <!-- Text editor toolbar with icons --> <div class="toolbar"> <div class="btn-group"> <button type="button" class="btn btn-light" onclick="execCmd('bold')" title="Bold"><i class="fas fa-bold"></i></button> <button type="button" class="btn btn-light" onclick="execCmd('italic')" title="Italic"><i class="fas fa-italic"></i></button> <button type="button" class="btn btn-light" onclick="execCmd('underline')" title="Underline"><i class="fas fa-underline"></i></button> <button type="button" class="btn btn-light" onclick="execCmd('strikethrough')" title="Strikethrough"><i class="fas fa-strikethrough"></i></button> </div> <div class="btn-group"> <button type="button" class="btn btn-light" onclick="execCmd('insertUnorderedList')" title="Bullet List"><i class="fas fa-list-ul"></i></button> <button type="button" class="btn btn-light" onclick="execCmd('insertOrderedList')" title="Numbered List"><i class="fas fa-list-ol"></i></button> </div> <div class="btn-group"> <button type="button" class="btn btn-light" onclick="execCmd('justifyLeft')" title="Align Left"><i class="fas fa-align-left"></i></button> <button type="button" class="btn btn-light" onclick="execCmd('justifyCenter')" title="Align Center"><i class="fas fa-align-center"></i></button> <button type="button" class="btn btn-light" onclick="execCmd('justifyRight')" title="Align Right"><i class="fas fa-align-right"></i></button> <button type="button" class="btn btn-light" onclick="execCmd('justifyFull')" title="Justify"><i class="fas fa-align-justify"></i></button> </div> <div class="btn-group"> <button type="button" class="btn btn-light" onclick="execCmd('createLink', prompt('Enter URL', 'http://'))" title="Insert Link"><i class="fas fa-link"></i></button> <button type="button" class="btn btn-light" onclick="execCmd('unlink')" title="Remove Link"><i class="fas fa-unlink"></i></button> </div> <div class="btn-group"> <button type="button" class="btn btn-light" onclick="execCmd('insertImage', prompt('Enter Image URL', 'http://'))" title="Insert Image"><i class="fas fa-image"></i></button> </div> <div class="btn-group"> <select class="form-select btn-light" onchange="execCmd('fontSize', this.value)" title="Font Size"> <option value="3" selected>Font Size</option> <option value="1">Small</option> <option value="2">Medium</option> <option value="4">Large</option> <option value="5">X-Large</option> <option value="6">XX-Large</option> <option value="7">XXX-Large</option> </select> </div> </div> <!-- Contenteditable div for the editor content --> <div id="editor" contenteditable="true" class="custom-editor"></div> <!-- Hidden textarea to store the editor's content --> <textarea id="description" name="description" style="display:none;"></textarea> </div> <!-- Meta Title field --> <div class="form-group"> <label for="meta_title">Meta Title (Optional)</label> <input type="text" class="form-control" id="meta_title" name="meta_title" placeholder="Enter Meta Title"> </div> <!-- Meta Description field --> <div class="form-group"> <label for="meta_description">Meta Description (Optional)</label> <textarea class="form-control" id="meta_description" name="meta_description" placeholder="Enter Meta Description" rows="3"></textarea> </div> </div> </div> <!-- /.card --> </div> <div class="col-md-4"> <!-- general form elements --> <div class="card card-primary"> <div class="card-body"> <!-- Image Drag-and-Drop field --> <div class="form-group"> <label for="image">Featured Image</label> <div id="image-drop-area" class="drop-area"> <p>Drag & drop an image here or click to select a file</p> <img id="image-preview" src="#" alt="Image Preview" style="display: none; max-width: 100%; height: auto; margin-top: 10px;"> <input type="file" class="form-control-file" id="image" name="image" accept="image/*" hidden> </div> </div> <!-- Category field --> <div class="form-group"> <label for="tags">Category (Optional)</label> <select class="form-control form-select" name="category_id" id="category_id"> <?php $__currentLoopData = $blogcategory; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($category->id); ?>"> <?php echo e($category->name); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <!-- Tags field --> <div class="form-group"> <label for="tags">Keywords (Optional)</label> <input type="text" class="form-control" id="tags" name="tags" placeholder="Enter Keywords (comma separated)"> </div> <div class="form-group"> <label for="status">Status</label> <select class="form-control" name="status" id="status" required> <option value="1">Publish</option> <option value="0">Draft</option> </select> </div> </div> <div class="card-footer text-right"> <button type="submit" class="btn btn-primary" onclick="submitForm()">Submit</button> </div> </div> <!-- /.card --> </div> </div> </form> </div><!--/. container-fluid --> </section> <!-- Editor and general styling --> <style> .custom-editor { border: 1px solid #ddd; min-height: 200px; padding: 10px; background-color: #777676; margin-bottom: 15px; font-size: 16px; overflow-y: auto; } .toolbar { margin-bottom: 10px; } .toolbar .btn-group { margin-right: 5px; } .toolbar .btn-light { border: 1px solid #ccc; border-radius: 4px; padding: 6px 10px; } .toolbar .form-select { padding: 6px; border-radius: 4px; border: 1px solid #ccc; height: auto; } .drop-area { border: 2px dashed #ccc; padding: 20px; text-align: center; cursor: pointer; transition: border-color 0.3s ease; } .drop-area.drag-over { border-color: #007bff; } .drop-area p { margin: 0; font-size: 16px; } </style> <script> // Execute command on the contenteditable area function execCmd(command, value = null) { document.execCommand(command, false, value); } // Sync content from the contenteditable div to the textarea before form submission function submitForm() { var editorContent = document.getElementById('editor').innerHTML; document.getElementById('description').value = editorContent; } document.addEventListener('DOMContentLoaded', function () { function initDragAndDrop(dropAreaId, inputId, previewId) { let dropArea = document.getElementById(dropAreaId); let input = document.getElementById(inputId); let preview = document.getElementById(previewId); dropArea.addEventListener('dragover', (event) => { event.preventDefault(); dropArea.classList.add('drag-over'); }); dropArea.addEventListener('dragleave', () => { dropArea.classList.remove('drag-over'); }); dropArea.addEventListener('drop', (event) => { event.preventDefault(); dropArea.classList.remove('drag-over'); input.files = event.dataTransfer.files; if (input.files.length > 0) { const file = input.files[0]; const reader = new FileReader(); reader.onload = function(e) { preview.src = e.target.result; preview.style.display = 'block'; }; reader.readAsDataURL(file); } }); dropArea.addEventListener('click', () => { input.click(); }); input.addEventListener('change', () => { if (input.files.length > 0) { const file = input.files[0]; const reader = new FileReader(); reader.onload = function(e) { preview.src = e.target.result; preview.style.display = 'block'; }; reader.readAsDataURL(file); } }); } initDragAndDrop('image-drop-area', 'image', 'image-preview'); }); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('backend.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\Laravel Codester\gaming_zone\resources\views/backend/blog-post/create.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings