list.blade.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. <input type="text" placeholder="블로그 검색" name="p">
  26. <button class="icofont-search-1"><i class="fa-solid fa-magnifying-glass"></i></button>
  27. </form>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. <!--// 탑 필터 끝 -->
  33. <div id="post-list">
  34. <!-- 리스트 -->
  35. @switch($postType['C5'])
  36. @case('text')
  37. @include('dbrbbs.text')
  38. @break
  39. @case('image')
  40. @include('dbrbbs.img')
  41. @break
  42. @case('gallery')
  43. @case('movie')
  44. @include('dbrbbs.gallery')
  45. @break
  46. @endswitch
  47. <!--// 리스트 끝 -->
  48. </div>
  49. <div class="row">
  50. <div class="col-lg-12">
  51. <div class="bottom-paginate">
  52. <p class="page-info"></p>
  53. {{ $postPage['Page']->appends(['limit' => request('limit')])->links() }}
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. <!--// containr 끝 -->
  59. </div>
  60. <!--// blog-grid 끝 -->
  61. </div>
  62. @endsection
  63. @push('js')
  64. <script>
  65. var vm = new Vue({
  66. el: '#post-list',
  67. data: function () {
  68. return {
  69. design: @json($design),
  70. galleryWidth: 0,
  71. galleryHeight: 0,
  72. };
  73. },
  74. computed: {
  75. },
  76. mounted() {
  77. this.onResize()
  78. },
  79. created() {
  80. window.addEventListener('resize', this.onResize)
  81. },
  82. beforeDestroy() {
  83. window.removeEventListener('resize', this.onResize)
  84. },
  85. methods: {
  86. onResize() {
  87. // Mobile
  88. if (window.innerWidth <= 768) {
  89. this.galleryWidth = this.design['MoGalleryWidth']
  90. this.galleryHeight = this.design['MoGalleryHeight']
  91. } else {
  92. this.galleryWidth = this.design['PcGalleryWidth']
  93. this.galleryHeight = this.design['PcGalleryHeight']
  94. }
  95. }
  96. },
  97. });
  98. </script>
  99. @endpush