list.blade.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. @extends('views.layouts.master')
  2. @section('content')
  3. <div class="sub_wrap blog movie">
  4. <div class="title">
  5. <h2>{{ $postType['C7'] }}</h2>
  6. </div>
  7. <div class="blog-grid">
  8. <div class="container">
  9. <!-- 탑 필터 -->
  10. <div class="row">
  11. <div class="col-lg-12">
  12. <div class="top-filter">
  13. <form class="filter-show" method="GET">
  14. <input type="hidden" name="page" value="1">
  15. <!--<label class="filter-label">Show :</label>-->
  16. <select class="form-select filter-select" name="limit" onchange="$(this).closest('form').submit()">
  17. @foreach([12, 24, 36] as $limit)
  18. <option value="{{ $limit }}" {{ request('limit') == $limit ? 'selected' : '' }}>{{ $limit }}</option>
  19. @endforeach
  20. </select>
  21. </form>
  22. <div class="blog_search">
  23. <form class="blog-widget-form" method="GET">
  24. <input type="hidden" name="page" value="1">
  25. @if(strpos($postType['C3'], 'youtube') !== false)
  26. <input type="text" placeholder="유튜브 검색" name="p">
  27. @else
  28. <input type="text" placeholder="블로그 검색" name="p">
  29. @endif
  30. <button class="icofont-search-1"><i class="fa-solid fa-magnifying-glass"></i></button>
  31. </form>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. <!--// 탑 필터 끝 -->
  37. <div id="post-list">
  38. <!-- 리스트 -->
  39. @switch($postType['C5'])
  40. @case('text')
  41. @include('views.bbs.text')
  42. @break
  43. @case('image')
  44. @include('views.bbs.img')
  45. @break
  46. @case('gallery')
  47. @case('movie')
  48. @include('views.bbs.gallery')
  49. @break
  50. @endswitch
  51. <!--// 리스트 끝 -->
  52. </div>
  53. <div class="row">
  54. <div class="col-lg-12">
  55. <div class="bottom-paginate">
  56. <p class="page-info"></p>
  57. {{ $postPage['Page']->appends(['limit' => request('limit')])->links() }}
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <!--// containr 끝 -->
  63. </div>
  64. <!--// blog-grid 끝 -->
  65. </div>
  66. @endsection
  67. @push('js')
  68. <script>
  69. var vm = new Vue({
  70. el: '#post-list',
  71. data: function () {
  72. return {
  73. design: @json($design),
  74. galleryWidth: 0,
  75. galleryHeight: 0,
  76. };
  77. },
  78. computed: {
  79. },
  80. mounted() {
  81. this.onResize()
  82. },
  83. created() {
  84. window.addEventListener('resize', this.onResize)
  85. },
  86. beforeDestroy() {
  87. window.removeEventListener('resize', this.onResize)
  88. },
  89. methods: {
  90. onResize() {
  91. // Mobile
  92. if (window.innerWidth <= 768) {
  93. this.galleryWidth = this.design['MoGalleryWidth']
  94. this.galleryHeight = this.design['MoGalleryHeight']
  95. } else {
  96. this.galleryWidth = this.design['PcGalleryWidth']
  97. this.galleryHeight = this.design['PcGalleryHeight']
  98. }
  99. }
  100. },
  101. });
  102. </script>
  103. @endpush