manual.blade.php 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!--- manual --->
  2. <div class="modal fade" id="modal-manual" aria-hidden="true" data-backdrop="static" style="z-index: 1050; overflow: auto;">
  3. <div class="modal-dialog m-auto pt-4" style="max-width: 768px !important;">
  4. <div class="modal-content">
  5. <div class="modal-header bg-warning-600">
  6. <h4 class="modal-title text-white" id="myModalLabel">매뉴얼</h4>
  7. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fas fa-times"></i></button>
  8. </div>
  9. <div class="modal-body p-2" style="background-color: #f5f5f5;">
  10. <div class="mt-2 card px-2">
  11. <ul class="nav nav-tabs nav-tabs-solid rounded my-2">
  12. @foreach ($manual['Text'] as $key => $data)
  13. @if ($key == 0)
  14. <li class="nav-item"><a href="{{ '#Text-'.$key }}" class="nav-link active" data-toggle="tab">{{ $data['Title'] }}</a></li>
  15. @else
  16. <li class="nav-item"><a href="{{ '#Text-'.$key }}" class="nav-link" data-toggle="tab">{{ $data['Title'] }}</a></li>
  17. @endif
  18. @endforeach
  19. @foreach ($manual['Images'] as $key => $data)
  20. <li class="nav-item"><a href="{{ '#Images-'.$key }}" class="nav-link" data-toggle="tab">{{ $data['Title'] }}</a></li>
  21. @endforeach
  22. @foreach ($manual['Movies'] as $key => $data)
  23. <li class="nav-item"><a href="{{ '#Movies-'.$key }}" class="nav-link" data-toggle="tab">{{ $data['Title'] }}</a></li>
  24. @endforeach
  25. </ul>
  26. <div class="tab-content">
  27. @foreach ($manual['Text'] as $key => $data)
  28. <div class="tab-pane fade {{ $key == 0 ? 'active show' : '' }}" id="{{ 'Text-'.$key }}"></div>
  29. @endforeach
  30. @foreach ($manual['Images'] as $key => $data)
  31. <div class="tab-pane fade mb-1" id="{{ 'Images-'.$key }}">
  32. <a href="/{{ $data['Path'] }}" target="_blank">
  33. <img src="/{{ $data['Path'] }}" class="w-100 h-100">
  34. </a>
  35. </div>
  36. @endforeach
  37. @foreach ($manual['Movies'] as $key => $data)
  38. <div class="tab-pane fade" id="{{ 'Movies-'.$key }}">
  39. <iframe width="100%" height="600" src="{{ $data['LinkUrl'] }}"></iframe>
  40. </div>
  41. @endforeach
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. @once
  49. <script>
  50. $('#modal-manual').on('show.bs.modal', function (event) {
  51. $('#modal-manual').draggable({ handle: ".modal-header" });
  52. })
  53. $(document).ready(async function() {
  54. const converter = new showdown.Converter()
  55. manual['Text'].forEach((data, key) => {
  56. const html = converter.makeHtml(data['Parameter'])
  57. $(`#Text-${key}`).append(html)
  58. });
  59. hljs.highlightAll();
  60. });
  61. const manual = {!! json_encode($manual) !!};
  62. </script>
  63. @endonce