app.blade.php 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <!DOCTYPE html>
  2. <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
  3. <head>
  4. <meta charset="utf-8"/>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  6. <meta name="apple-mobile-web-app-title" content="{{ config('meta_application_name') }}"/>
  7. @if($metaViewport = config('meta_viewport'))
  8. <meta name="viewport" content="{{ $metaViewport }}"/>
  9. @else
  10. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  11. @endif
  12. @if($metaRobots = config('meta_robots'))
  13. <meta name="robots" content="{{ $metaRobots }}"/>
  14. @endif
  15. @if($metaAuthor = config('meta_author'))
  16. <meta name="author" content="{{ $metaAuthor }}"/>
  17. @endif
  18. @if($metaKeywords = config('meta_keywords'))
  19. <meta name="keywords" content="{{ $metaKeywords }}"/>
  20. @endif
  21. @if($metaDescription = config('meta_description'))
  22. <meta name="description" content="{{ $metaDescription }}"/>
  23. @endif
  24. {!! config('meta_adds_info') !!}
  25. <!-- CSRF Token -->
  26. <meta name="csrf-token" content="{{ csrf_token() }}"/>
  27. <title>{{ config('site_title', config('app.name')) }}</title>
  28. @if($siteFavicon = config('site_favicon'))
  29. <link rel="icon" type="image/x-icon" href="{{ asset($siteFavicon) }}"/>
  30. <link rel="shortcut icon" type="image/x-icon" href="{{ asset($siteFavicon) }}"/>
  31. @endif
  32. @vite(['resources/sass/app.scss', 'resources/js/app.js'])
  33. <link rel="stylesheet" href="{{ asset('css/desktop/layout.css') }}"/>
  34. @stack('styles')
  35. <script>
  36. // 자바스크립트에서 사용하는 전역변수 선언
  37. var BASE_URL = "{{ BASE_URL }}";
  38. var FULL_URL = "{{ FULL_URL }}";
  39. var ADMIN_URL = "{{ ADMIN_URL }}";
  40. var CHARSET = "{{ CHARSET }}";
  41. var DATE = "{{ DATE }}";
  42. var DATETIME = "{{ DATETIME }}";
  43. var IP_ADDRESS = "{{ IP_ADDRESS }}";
  44. var REFERER = "{{ REFERER }}";
  45. var USER_AGENT = "{{ USER_AGENT }}";
  46. var DEVICE = "{{ DEVICE }}";
  47. var PLATFORM = "{{ PLATFORM }}";
  48. var BROWSER = "{{ BROWSER }}";
  49. var IS_USER = {{ IS_USER }};
  50. var IS_ADMIN = {{ IS_ADMIN }};
  51. var IS_FRONT = 1;
  52. var CSRF = "{{ csrf_token() }}";
  53. </script>
  54. <!--[if lt IE 9]>
  55. <script src="{{ asset('js/common/html5shiv.min.js') }}" defer></script>
  56. <script src="{{ asset('js/common/respond.min.js') }}" defer></script>
  57. <script src="{{ asset('js/common/ie8-responsive-file-warning.js') }}" defer></script>
  58. <![endif]-->
  59. <script src="{{ asset('/js/common/common.js') }}" defer></script>
  60. <script src="{{ asset('/js/common/jquery.validate.extension.js') }}" defer></script>
  61. <script src="{{ asset('/js/front.js') }}" defer></script>
  62. <!-- Google tag (gtag.js) -->
  63. <script async src="https://www.googletagmanager.com/gtag/js?id=G-RPBF1M8JNY"></script>
  64. <script>
  65. window.dataLayer = window.dataLayer || [];
  66. function gtag(){dataLayer.push(arguments);}
  67. gtag('js', new Date());
  68. gtag('config', 'G-RPBF1M8JNY');
  69. </script>
  70. </head>
  71. <body id="app">
  72. {{-- 상단 --}}
  73. <header id="header" class="container-fluid">
  74. {{-- 로고 --}}
  75. <article>
  76. <a href="/" type="text/html" rel="noreferrer" referrerpolicy="no-referrer">
  77. {{ strtoupper(config('app.name')) }}
  78. </a>
  79. </article>
  80. {{-- 검색 --}}
  81. <article>
  82. <form name="f_keyword_search" id="fKeywordSearch" method="get" action="{{ route('movie.search.index') }}" autocomplete="on" accept-charset="UTF-8">
  83. <input type="search" name="keyword" id="keyword" value="{{ old('keyword') }}" maxlength="255" placeholder="영화 제목"/>
  84. <button type="submit">
  85. <i class="fas fa-search"></i>
  86. </button>
  87. </form>
  88. </article>
  89. {{-- 로그인, 회원가입 --}}
  90. <article>
  91. <ul class="nav">
  92. @guest
  93. @if (Route::has('login'))
  94. <li class="nav-item">
  95. <a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
  96. </li>
  97. @endif
  98. <li><span class="vr"></span></li>
  99. @if (Route::has('register'))
  100. <li class="nav-item">
  101. <a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
  102. </li>
  103. @endif
  104. @else
  105. <li class="nav-item">
  106. <div class="dropdown">
  107. <a href="#" id="account" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-bs-offset="-5,1">
  108. {{ $user->nickname ?: $user->name }}님 <span class="caret"></span>
  109. </a>
  110. <div class="dropdown-menu dropdown-menu-right">
  111. @admin
  112. <a href="{{ route('admin.index') }}" class="dropdown-item" target="_blank">관리자</a>
  113. @endadmin
  114. <a href="{{ route('account.profile') }}" class="dropdown-item">내 정보</a>
  115. <div class="dropdown-divider"></div>
  116. <a href="{{ route('logout') }}" class="dropdown-item">{{ __('Logout') }}</a>
  117. <form id="logoutForm" class="hide" action="{{ route('logout') }}" method="POST">@csrf</form>
  118. </div>
  119. </div>
  120. </li>
  121. @endguest
  122. </ul>
  123. </article>
  124. </header>
  125. {{-- 상단 메뉴 --}}
  126. <aside id="aside" class="container-fluid">
  127. <nav id="nav">
  128. @if($topMenu)
  129. @php
  130. $buildSubMenu = function ($categories) use (&$buildSubMenu, $subMenu) {
  131. $html = '<ul>';
  132. foreach ($categories as $cate) {
  133. $meta = $subMenu[$cate->id];
  134. $hasClass = "";
  135. if($meta->hasChildren) {
  136. $hasClass = 'class="has-children"';
  137. }
  138. $html .= sprintf('<li %s><a href="%s" class="dropdown-item" target="%s" %s>%s</a>', $hasClass, $meta->url, $meta->target, $meta->custom, $meta->name);
  139. $html .= $buildSubMenu($cate->children);
  140. $html .= '</li>';
  141. }
  142. $html .= '</ul>';
  143. return $html;
  144. };
  145. @endphp
  146. @foreach($topMenu[0] as $row)
  147. <a href="{{ $row->url }}" target="{{ $row->target }}" {{ $row->custom }} class="nav-link @if(!$row->isLeaf) dropdown-toggle @endif"
  148. @if(!$row->isLeaf) data-bs-toggle="dropdown" role="button" aria-expanded="false" data-bs-offset="10,-5" @endif>
  149. {{ $row->name }}
  150. </a>
  151. @if($row->hasChildren)
  152. <ul class="dropdown-menu">
  153. @foreach($row->children as $mn)
  154. @php $meta = $subMenu[$mn->id]; @endphp
  155. <li @if($meta->hasChildren) class="has-children" @endif>
  156. <a href="{{ $meta->url }}" class="dropdown-item" target="{{ $meta->target }}" {{ $meta->custom }}>{{ $meta->name }}</a>
  157. @if($meta->hasChildren)
  158. @php echo $buildSubMenu($mn->children) @endphp
  159. @endif
  160. </li>
  161. @endforeach
  162. </ul>
  163. @endif
  164. @endforeach
  165. @endif
  166. </nav>
  167. </aside>
  168. {{-- 컨텐츠 --}}
  169. <main id="main">
  170. @yield('content')
  171. </main>
  172. {{-- -하단 --}}
  173. <footer id="footer">
  174. <div class="ad-coupang">
  175. <iframe src="https://coupa.ng/cdLzPn" width="100%" height="75" frameborder="0" scrolling="no" referrerpolicy="unsafe-url"></iframe>
  176. <iframe src="https://ads-partners.coupang.com/widgets.html?id=630891&template=carousel&trackingCode=AF0305179&subId=&width=200&height=150" width="100%" height="150" frameborder="0" scrolling="no" referrerpolicy="unsafe-url"></iframe>
  177. <small>
  178. 쿠팡 파트너스의 활동은 공정거래위원회의 심사지침에 따라 추천, 보증인인 파트너스 회원과 당사의 경제적 이해관계에 대하여 공개하여야 합니다.
  179. </small>
  180. </div>
  181. <address>
  182. &copy; 2023~{{ date('Y') }} {{ config('company_name') }}. All rights reserved.
  183. </address>
  184. <br/>
  185. </footer>
  186. @stack('scripts')
  187. @include('component.loading')
  188. @include('component.popup')
  189. @include('component.alert')
  190. </body>
  191. </html>