@version(2) @load('./lang') @load('../../assets/sinsunhan.css') @load('css/layout.css') @load('js/layout.js') @php $hr = $layout_info; $hr_width = (int)($hr->content_width ?? 1180) ?: 1180; $hr_scheme = $hr->color_scheme ?? 'auto'; $hr_point = trim((string)($hr->point_color ?? '')); $hr_menu = array_values($gnb->list ?? []); $hr_current = null; foreach ($hr_menu as $hr_m) { if (!empty($hr_m['selected']) || !empty($hr_m['open'])) { $hr_current = $hr_m; break; } } $hr_type = $hr->layout_type ?? 'sub'; $hr_class_map = ['m' => 'main', 'sl' => 'sub', 'sf' => 'sub_full']; $hr_selected_class = ''; foreach ($hr_menu as $hr_m) { if (empty($hr_m['selected']) && empty($hr_m['open'])) continue; $hr_selected_class = (string)($hr_m['class'] ?? ''); foreach ((array)($hr_m['list'] ?? []) as $hr_m2) { if (empty($hr_m2['selected']) && empty($hr_m2['open'])) continue; $hr_selected_class = (string)($hr_m2['class'] ?? '') ?: $hr_selected_class; foreach ((array)($hr_m2['list'] ?? []) as $hr_m3) { if (!empty($hr_m3['selected'])) { $hr_selected_class = (string)($hr_m3['class'] ?? '') ?: $hr_selected_class; } } } break; } $hr_has_class_type = false; foreach (preg_split('/\s+/', trim($hr_selected_class)) as $hr_token) { if (isset($hr_class_map[$hr_token])) { $hr_type = $hr_class_map[$hr_token]; $hr_has_class_type = true; break; } } $hr_module_info = \Context::get('current_module_info'); $hr_module_now = is_object($hr_module_info) ? (string)($hr_module_info->module ?? '') : ''; // 사이트 대문은 메뉴 클래스 지정이 없으면 메인(비주얼)으로 본다. // 대문에 sl/sf 클래스를 넣으면 그 지정이 우선한다. $hr_site_info = \Context::get('site_module_info'); $hr_home_mid = is_object($hr_site_info) ? (string)($hr_site_info->mid ?? '') : ''; $hr_now_mid = is_object($hr_module_info) ? (string)($hr_module_info->mid ?? '') : ''; if (!$hr_has_class_type && $hr_home_mid !== '' && $hr_now_mid === $hr_home_mid) { $hr_type = 'main'; } $hr_full_modules = ['member', 'communication', 'zittme_pay', 'integration_search']; if (!$hr_has_class_type && in_array($hr_module_now, $hr_full_modules, true)) { $hr_type = 'sub_full'; } // 신선한 테마는 서브페이지 LNB 를 쓰지 않는다 — 서브도 항상 본문 전체 폭 $hr_lnb = null; $hr_visuals = array_map(function($hr_nv) { return is_array($hr_nv) ? $hr_nv : (array)$hr_nv; }, array_values((array)($hr->visuals ?? []))); // 슬라이드를 하나도 등록하지 않았으면 상점(커머스) 홈 배너를 대문 슬라이더로 승계한다 if (!count($hr_visuals)) { $hr_shop_cfg = ModuleModel::getModuleConfig('commerce'); $hr_shop_bn = is_object($hr_shop_cfg) ? json_decode((string)($hr_shop_cfg->home_banners ?? ''), true) : null; foreach ((is_array($hr_shop_bn) ? $hr_shop_bn : []) as $hr_bv) { if (!is_array($hr_bv) || empty($hr_bv['image'])) { continue; } $hr_visuals[] = [ 'image' => (string)$hr_bv['image'], 'title' => (string)($hr_bv['title'] ?? ''), 'text' => (string)($hr_bv['text'] ?? ''), 'link_text' => '', 'link_url' => (string)($hr_bv['url'] ?? ''), 'align' => (string)($hr_bv['align'] ?? 'left'), ]; } } $hr_visual_mode = $hr->show_visual ?? 'main'; $hr_show_visual = count($hr_visuals) && $hr_visual_mode !== 'none' && ($hr_visual_mode === 'all' || $hr_type === 'main'); $hr_interval = max(0, (int)($hr->visual_interval ?? 6)); foreach (['logo_text', 'footer_about', 'footer_info', 'copyright'] as $hr_lang_field) { if (!empty($hr->$hr_lang_field)) { $hr->$hr_lang_field = \Context::replaceUserLang((string)$hr->$hr_lang_field); } } foreach ($hr_visuals as $hr_vk => $hr_vv) { foreach (['title', 'text', 'link_text'] as $hr_lang_field) { if (!empty($hr_vv[$hr_lang_field])) { $hr_visuals[$hr_vk][$hr_lang_field] = \Context::replaceUserLang((string)$hr_vv[$hr_lang_field]); } } } $hr_footer_info = array_values(array_filter(array_map('trim', explode("\n", (string)($hr->footer_info ?? ''))))); @endphp {{-- 창 스크롤바는 html 이 그린다. 점 색이 감싸는 요소에만 있으면 거기까지 닿지 않는다 --}} @if ($hr_point !== '')@endif
@include('_header') @if ($hr_show_visual) @include('_visual') @endif
@if ($hr_type === 'main') @include('_home') @endif
{!! $content !!}
@include('_footer') {{-- 모바일 하단 탭바 (860px 이하에서만 표시) --}} @php $hr_tab_shop = $ss_shop_mid ?? ''; @endphp {{-- 하단 탭바용 바텀시트: 상점 카테고리 / 상점 검색 --}}