GnbWeb2.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : GnbWeb.html
  7. * @desc : GNB
  8. *============================================================================
  9. * STYLE24
  10. * Copyright(C) 2020 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2021.01.28 gagamel 최초 작성
  15. *******************************************************************************
  16. -->
  17. <header id="header" th:fragment="gnb">
  18. <!-- head start -->
  19. <div class="common_header">
  20. <!-- 프로모션 띠 배너 등록 시 노출 -->
  21. <div class="hd_top_banner" style="background-color:#fd4801;">
  22. <a href="" class="t_bnr">
  23. <span style="margin:0 auto;height:60px;line-height:60px;font-size: 20px;font-weight: 600;letter-spacing: -.025em; color:#fff;">APP 수신동의 하면 1만 포인트 증정!</span>
  24. <!--<img src="ABC.jpg" alt="프로모션"/>-->
  25. </a>
  26. </div>
  27. <!-- //프로모션 띠 배너 등록 시 노출 -->
  28. <div class="area">
  29. <div class="logo">
  30. <a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">
  31. <h1>
  32. <i class="ico ico_logo"></i>
  33. <em class="blind">STYLE24</em>
  34. </h1>
  35. </a>
  36. </div>
  37. <div class="util_group">
  38. <span th:if="${sessionInfo == null}"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_LOGIN);" title="로그인 바로가기">로그인</a></span>
  39. <span th:if="${sessionInfo != null}"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_LOGOUT);" title="로그아웃">로그아웃</a></span>
  40. <span th:if="${sessionInfo == null}"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_CUSTOMER_JOIN_TYPE);" title="회원가입 바로가기">회원가입</a></span>
  41. <span><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MYPAGE);" title="마이페이지 바로가기">마이페이지</a></span>
  42. </div>
  43. </div>
  44. <div class="gnb">
  45. <!-- nav -->
  46. <div class="nav">
  47. <ul class="bundle btn_home">
  48. <li><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);" class="">홈</a></li>
  49. </ul>
  50. <ul class="bundle">
  51. <li class="has_depth">
  52. <a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_ALL_BRAND);">브랜드</a>
  53. <!-- 브랜드_depth -->
  54. <div class="depth_menu brand">
  55. <div class="head_category">
  56. <div class="tit">
  57. <p>브랜드</p>
  58. <a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_ALL_BRAND);" class="more">전체보기</a>
  59. </div>
  60. <div class="menu" id="divBrandGrp">
  61. </div>
  62. </div>
  63. </div>
  64. </li>
  65. </ul>
  66. <ul class="bundle" id="divCate">
  67. </ul>
  68. <ul class="bundle" id="category3">
  69. <li class="active" ><a href="#">베스트</a></li>
  70. <li><a href="#">핫딜</a></li>
  71. <li><a href="#">기획전</a></li>
  72. <li><a href="#">총알배송</a></li>
  73. <li class="has_depth">
  74. <a href="#">아울렛</a>
  75. <!-- depth_menu start -->
  76. <div class="depth_menu category">
  77. <div class="head_category">
  78. <div class="tit">
  79. <p>아울렛</p>
  80. <a href="" class="more">전체보기</a>
  81. </div>
  82. <div class="menu">
  83. <ul class="maintabs">
  84. <li><a href="javascript:;">티셔츠/셔츠</a></li>
  85. <li>
  86. <a href="javascript:;">여성</a>
  87. <!-- 2depth -->
  88. <ul class="box_depth2">
  89. <li>
  90. <a href="/">상의</a>
  91. </li>
  92. <li>
  93. <a href="/">하의</a>
  94. <!-- 3depth -->
  95. <ul class="box_depth3">
  96. <li><a href="/">상의</a></li>
  97. <li><a href="/">하의</a></li>
  98. <li><a href="/">세트</a></li>
  99. <li><a href="/">시즌스포츠의류</a></li>
  100. <li>
  101. <a href="/">스포츠잡화</a>
  102. <!-- 4depth -->
  103. <ul class="box_depth4">
  104. <li><a href="/">운동화/등산화</a></li>
  105. <li><a href="/">가방/모자/잡화</a></li>
  106. </ul>
  107. </li>
  108. </ul>
  109. </li>
  110. <li>
  111. <a href="/">세트</a>
  112. </li>
  113. <li>
  114. <a href="/">시즌스포츠의류</a>
  115. </li>
  116. <li>
  117. <a href="javascript:;">스포츠잡화</a>
  118. </li>
  119. </ul>
  120. </li>
  121. <li>
  122. <a href="">원피스/스커트</a>
  123. </li>
  124. <li><a href="">팬츠/레깅스</a></li>
  125. <li><a href="">데님</a></li>
  126. <li><a href="">자켓/점퍼/코트</a></li>
  127. <li><a href="">트레이닝/스포츠</a></li>
  128. <li><a href="">여성잡화</a></li>
  129. <li><a href="">언더웨어</a></li>
  130. </ul>
  131. </div>
  132. </div>
  133. <div class="head_banner">
  134. <div class="tit">
  135. <p>가을의 신상 만나기</p>
  136. </div>
  137. <div class="list">
  138. <ul class="clear event_con">
  139. <li>
  140. <a href="">
  141. <div class="ev_img"><img src="/images/pc/thumb/ev_list_img01.jpg" alt="ATTENTION! 20FW HOLIDAY TBJ 주목할 홀리데이 TBJ 컬렉션"></div>
  142. <div class="txt">
  143. <p class="tit">2020 FALL COLLECTION 가을에는 이 컬러 2020 FALL COLLECTION 가을에는 이 컬러</p>
  144. </div>
  145. </a>
  146. </li>
  147. <li>
  148. <a href="">
  149. <div class="ev_img"><img src="/images/pc/thumb/ev_list_img02.jpg" alt="단 48시간, 퓨어캐시미어 최대 80%세일 PURE CASHMERE 48H POP-UP">
  150. </div>
  151. <div class="txt">
  152. <p class="tit">FALL NEW ARRIVAL</p>
  153. </div>
  154. </a>
  155. </li>
  156. </ul>
  157. </div>
  158. </div>
  159. </div>
  160. <!-- //depth_menu end -->
  161. </li>
  162. <li><a href="#">룩북</a></li>
  163. <li><a href="#">이벤트/혜택</a></li>
  164. </ul>
  165. </div>
  166. <!-- // nav -->
  167. <div class="search">
  168. <div class="area">
  169. <form id="searchMainForm" name="searchMainForm">
  170. <fieldset>
  171. <legend>통합검색</legend>
  172. <input type="text" id="search" name="search" value="" placeholder="모이몰론, 남들보다 빠르게! 신상 check" class="search_input" title="검색어 입력" maxlength="100">
  173. <div class="search_group" id="ark" style="display: none;">
  174. <div id="ark_down" style="position: absolute; display: block; cursor: pointer; top: 3px; left: 366px;"></div>
  175. <div id="ark_up" style="position: absolute; display: none; cursor: pointer; top: 3px; left: 366px;"></div>
  176. <div class="area">
  177. <p class="blind">연관검색</p>
  178. <div class="search_list">
  179. <div id="ark_content_list" style="width: 410px;"></div>
  180. <div id="ark_category_list" class="category"></div>
  181. <div id="ark_event_list" class="exhibition"></div>
  182. <div id="ark_powerdeal_list"></div>
  183. </div>
  184. <div class="close">
  185. <a href="#" class="search_close">닫기<i class="ico ico_search_close_gray"><em>닫기</em></i></a>
  186. </div>
  187. </div>
  188. </div>
  189. <!-- 검색어 입력전 -->
  190. <div id="mykeyword" class="my_search_group sch_auto" style="display: none;">
  191. <p class="blind">인기 검색어 &amp; 최근 검색어</p>
  192. <div class="area">
  193. <div class="hot_search_list" id="popkeyword">
  194. <p>인기 검색어</p>
  195. <ul>
  196. <li>
  197. <a href="#"><span>1</span>나이키</a>
  198. </li>
  199. <li>
  200. <a href="#"><span>2</span>tamiya</a>
  201. </li>
  202. <li>
  203. <a href="#"><span>3</span>니콘 z6</a>
  204. </li>
  205. <li>
  206. <a href="#"><span>4</span>갤럭시 자켓</a>
  207. </li>
  208. <li>
  209. <a href="#"><span>5</span>아동운동화</a>
  210. </li>
  211. <li>
  212. <a href="#"><span>6</span>타미야</a>
  213. </li>
  214. <li>
  215. <a href="#"><span>7</span>널디</a>
  216. </li>
  217. <li>
  218. <a href="#"><span>8</span>호박목걸이</a>
  219. </li>
  220. <li>
  221. <a href="#"><span>9</span>제시뉴욕</a>
  222. </li>
  223. <li>
  224. <a href="#"><span>10</span>뉴에라</a>
  225. </li>
  226. </ul>
  227. </div>
  228. <div class="my_search_list" id="searchkeyword">
  229. <p>최근 검색어</p>
  230. <button type="button" onclick="removeMyKeyword();">최근 검색어 전체삭제<i class="ico ico_mysearch_delete"></i></button>
  231. </div>
  232. </div>
  233. <div class="close">
  234. <a href="#" class="search_close">닫기<i class="ico ico_search_close_gray"><em>닫기</em></i></a>
  235. </div>
  236. </div>
  237. <!-- // 검색어 입력전 -->
  238. <button type="button" class="close"><i class="ico ico_search_close"><em>닫기</em></i></button>
  239. <button type="button" class="sch_btn" onclick="goSearch();"><i class="ico ico_search"><em>검색</em></i></button>
  240. </fieldset>
  241. </form>
  242. </div>
  243. <a href="#" class="btn_ico btn_cart" title="장바구니 바로가기"><i class="ico ico_bag"></i><span class="circle_count">99+</span></a>
  244. </div>
  245. <!-- // search -->
  246. </div>
  247. </div>
  248. <!-- head end -->
  249. <script th:inline="javascript">
  250. /*<![CDATA[*/
  251. // 탭 > 브랜드 생성
  252. let fnCreateBrandGroup = function(brandGrpList) {
  253. let tag = '';
  254. if (brandGrpList.length > 0) {
  255. tag += '<div class="row">\n';
  256. tag += ' <p>캐주얼</p>\n';
  257. tag += ' <div class="brand_list swiper-container">\n';
  258. tag += ' <ul class="clear swiper-wrapper">\n';
  259. $.each(brandGrpList, function(idx, item) {
  260. tag += ' <li class="swiper-slide">\n';
  261. tag += ' <a href="javascript:void(0);" onclick="cfnGoToBrandMain(' + item.brandGroupNo + ');">\n';
  262. tag += ' <img src="' + _uploadDefaultUrl + item.logoFileNm + '" alt=""/>\n';
  263. tag += ' <span><em>' + item.brandGroupNm + '</em></span>\n';
  264. tag += ' </a>\n';
  265. tag += ' </li>\n';
  266. });
  267. tag += ' </ul>\n';
  268. tag += ' </div>\n';
  269. tag += '</div>\n';
  270. }
  271. return tag;
  272. }
  273. // 탭 > 카테고리 생성
  274. let fnCreateCategory = function(cateList) {
  275. let tag = '';
  276. if (cateList.length > 0) {
  277. $.each(cateList, function(idx1, cate1) {
  278. tag += '<li class="has_depth">\n'; //depth_menu 있을 시 has_depth 클래스 추가
  279. tag += ' <a href="javascript:void(0);" onclick="cfnGoToCategory(' + cate1.cate1Nm + ');">' + cate1.cate1Nm + '</a>\n';
  280. tag += ' <div class="depth_menu category">\n';
  281. tag += ' <div class="head_category">\n';
  282. tag += ' <div class="tit">\n';
  283. tag += ' <p>' + cate1.cate1Nm + '</p>\n';
  284. tag += ' <a href="javascript:void(0);" onclick="cfnGoToCategory(' + cate1.cate1No + ');" class="more">전체보기</a>\n';
  285. tag += ' </div>\n';
  286. if (cate1.leafYn == 'N' && cate1.cate2List.length > 0) {
  287. tag += ' <div class="menu">\n';
  288. tag += ' <ul class="maintabs">\n';
  289. $.each(cate1.cate2List, function(idx2, cate2) {
  290. tag += ' <li>\n';
  291. tag += ' <a href="javascript:void(0);" onclick="cfnGoToCategoryMain(\'' + cate2.cateGb + '\',\'' + cate2.cate1No + '\',\'' + cate2.cate2No + '\');">' + cate2.cate2Nm + '</a>\n';
  292. if (cate2.leafYn == 'N' && cate2.cate3List.length > 0) {
  293. tag += ' <ul class="box_depth2">\n';
  294. $.each(cate2.cate3List, function(idx3, cate3) {
  295. tag += ' <li>\n';
  296. tag += ' <a href="javascript:void(0);" onclick="cfnGoToCategoryMain(\'' + cate3.cateGb + '\',\'' + cate3.cate1No + '\',\'' + cate3.cate2No + '\',\'' + cate3.cate3No + '\');">' + cate3.cate3Nm + '</a>\n';
  297. if (cate3.leafYn == 'N' && cate3.cate4List.length > 0) {
  298. tag += ' <ul class="box_depth3">\n';
  299. $.each(cate3.cate4List, function(idx4, cate4) {
  300. tag += ' <li><a href="javascript:void(0);" onclick="cfnGoToCategoryMain(\'' + cate4.cateGb + '\',\'' + cate4.cate1No + '\',\'' + cate4.cate2No + '\',\'' + cate4.cate3No + '\',\'' + cate4.cate4No + '\');">' + cate4.cate4Nm + '</a></li>\n';
  301. });
  302. tag += ' </ul>\n';
  303. }
  304. tag += ' </li>\n';
  305. });
  306. tag += ' </ul>\n';
  307. }
  308. tag += ' </li>\n';
  309. });
  310. tag += ' </ul>\n';
  311. tag += ' </div>\n';
  312. tag += ' </div>\n';
  313. tag += ' </div>\n';
  314. }
  315. if (cate1.bannerList.length > 0) {
  316. tag += ' <div class="head_banner">\n';
  317. tag += ' <div class="tit">\n';
  318. tag += ' <p>가을의 신상 만나기</p>\n';
  319. tag += ' </div>\n';
  320. tag += ' <div class="list">\n';
  321. tag += ' <ul class="clear event_con">\n';
  322. tag += ' <li>\n';
  323. tag += ' <a href="">\n';
  324. tag += ' <div class="ev_img"><img src="/images/pc/thumb/ev_list_img01.jpg" alt="ATTENTION! 20FW HOLIDAY TBJ 주목할 홀리데이 TBJ 컬렉션"></div>\n';
  325. tag += ' <div class="txt">\n';
  326. tag += ' <p class="tit">2020 FALL COLLECTION 가을에는 이 컬러 2020 FALL COLLECTION 가을에는 이 컬러</p>\n';
  327. tag += ' </div>\n';
  328. tag += ' </a>\n';
  329. tag += ' </li>\n';
  330. tag += ' <li>\n';
  331. tag += ' <a href="">\n';
  332. tag += ' <div class="ev_img"><img src="/images/pc/thumb/ev_list_img02.jpg" alt="단 48시간, 퓨어캐시미어 최대 80%세일 PURE CASHMERE 48H POP-UP"></div>\n';
  333. tag += ' <div class="txt">\n';
  334. tag += ' <p class="tit">FALL NEW ARRIVAL</p>\n';
  335. tag += ' </div>\n';
  336. tag += ' </a>\n';
  337. tag += ' </li>\n';
  338. tag += ' </ul>\n';
  339. tag += ' </div>\n';
  340. tag += ' </div>\n';
  341. }
  342. tag += '</li>\n';
  343. });
  344. }
  345. return tag;
  346. }
  347. // 탭 목록
  348. let fnTapList = function() {
  349. $.getJSON('/display/tap/list'
  350. , function(result, status) {
  351. if (status == 'success') {
  352. $.each(result, function(idx, item) {
  353. if (item.contentsType == 'B') { // 컨텐츠유형:브랜드
  354. $('#divBrandGrp').html('');
  355. $('#divBrandGrp').append(fnCreateBrandGroup(item.casualBrandGroupList));
  356. $('#divBrandGrp').append(fnCreateBrandGroup(item.golfBrandGroupList));
  357. $('#divBrandGrp').append(fnCreateBrandGroup(item.kidsBrandGroupList));
  358. } else if (item.contentsType == 'C') { // 컨텐츠유형:카테고리
  359. $('#divCate').html('');
  360. $('#divCate').append(fnCreateCategory(item.cateList));
  361. }
  362. });
  363. }
  364. });
  365. }
  366. $(document).ready(function() {
  367. //검색창 호출
  368. $(".common_search").load("sch_layer_pop.html");
  369. // GNB toggle
  370. $(document).on('mouseenter','.common_header .gnb .nav > ul > li',function(e){
  371. if(!$(this).hasClass('has_depth')){
  372. $('.black_screen').hide();
  373. $('.common_header .gnb .depth_menu').hide();
  374. } else if($(this).hasClass('has_depth')){
  375. $('.black_screen').show();
  376. $(this).find('.depth_menu').show();
  377. $(this).parents('ul').siblings('ul').find('li.has_depth .depth_menu').hide();
  378. $(this).siblings('li.has_depth').find('.depth_menu').hide();
  379. }
  380. }).on('mouseleave','.common_header .gnb',function(e){
  381. $('.black_screen').hide();
  382. $('.common_header .gnb .depth_menu').hide();
  383. });
  384. // GNB 하위메뉴
  385. $(document).on('mouseenter','.common_header .maintabs li',function(e){
  386. if($(this).find('> ul').length > 0){
  387. $(this).addClass('on');
  388. }
  389. $(this).find('> ul').show();
  390. $(this).siblings('li').find('> ul').hide();
  391. });
  392. // GNB 더보기
  393. $(document).on('click','.more_category .btn_more_cate',function(e){
  394. $(this).parent('.more_category').toggleClass('on');
  395. $(this).parent('.more_category').find('.cate_list').toggle();
  396. return false;
  397. });
  398. // GNB - 슬라이드 > 브랜드_GNB
  399. var brand_gnb_slide = new Swiper('#header .gnb .brand_list', {
  400. observer: true,
  401. observeParents: true,
  402. centeredSlides: false,
  403. slidesPerView: 'auto',
  404. freeMode:true,
  405. });
  406. //통합검색 - 슬라이드 > 지금 고객님들이 많이 보고 있어요
  407. var realtimeItemSwiper = new Swiper('.common_search .realtime_slider .swiper-container', {
  408. observer: true,
  409. observeParents: true,
  410. slidesPerView: 5,
  411. spaceBetween: 20,
  412. autoplay: {
  413. delay: 2500,
  414. disableOnInteraction:false,
  415. },
  416. navigation: {
  417. nextEl: '.common_search .realtime_slider .swiper-button-next',
  418. prevEl: '.common_search .realtime_slider .swiper-button-prev',
  419. },
  420. pagination: {
  421. el: '.common_search .realtime_slider .swiper-pagination',
  422. clickable: true,
  423. },
  424. });
  425. fnTapList();
  426. });
  427. /*]]>*/
  428. </script>
  429. </header>
  430. </html>