edit.blade.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. @extends('layouts.idara.panel')
  2. @section('content')
  3. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
  4. @include('backend.partials.features')
  5. <div class="container">
  6. <div class="card">
  7. <h5 class="card-header">Modifier la présentation</h5>
  8. <div class="card-body">
  9. <form action="{{url('presentation/'.$article->id)}}" method="post">
  10. <input type="hidden" name="_method" value="PUT">
  11. @csrf
  12. <div class="form-group">
  13. <label for="exampleFormControlInput1">Titre</label>
  14. <input type="text" class="form-control" name="titre" placeholder="" value="{{$article->titre}}" required>
  15. </div>
  16. <div class="form-group mt-4">
  17. <label for="exampleFormControlTextarea1">Presentation</label>
  18. <textarea class="form-control" id="presentation" name="texte" rows="3">{!! html_entity_decode ($article->texte)!!}</textarea>
  19. </div>
  20. <div class="form-group mt-4">
  21. <label for="exampleFormControlTextarea1">Resume</label>
  22. <textarea class="form-control" id="details" name="details" rows="3">{!! html_entity_decode ($article->details)!!}</textarea>
  23. </div>
  24. <div class="form-group add mt-4">
  25. <button type="submit" class="btn btn-danger" value="">Modifier</button>
  26. </div>
  27. </form>
  28. </div>
  29. </div>
  30. </div>
  31. <style>
  32. .presentation {
  33. padding-top: 127px;
  34. margin: -1px 0 0 41px;
  35. }
  36. .clean {
  37. padding: 16px 9px 19px 15px;
  38. margin-top: -30px;
  39. font-size: 19px;
  40. font-weight: 600;
  41. color: #764b4b;
  42. }
  43. .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
  44. border-color: var(--ck-color-base-border);
  45. height: 232px !important;
  46. }
  47. </style>
  48. <script src="https://cdn.ckeditor.com/ckeditor5/36.0.0/classic/ckeditor.js"></script>
  49. <script>
  50. ClassicEditor
  51. .create(document.querySelector('#presentation'))
  52. .then(editor => {
  53. window.editor = editor;
  54. })
  55. .catch(error => {
  56. console.error('There was a problem initializing the editor.', error);
  57. });
  58. ClassicEditor
  59. .create(document.querySelector('#details'))
  60. .then(editor => {
  61. window.editor = editor;
  62. })
  63. .catch(error => {
  64. console.error('There was a problem initializing the editor.', error);
  65. });
  66. </script>
  67. @endsection